Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
fa08546
Use client entrypoint in TypeScript
tassoevan Mar 23, 2021
f1550b9
Migrate polyfills to TypeScript
tassoevan Mar 24, 2021
ce7a507
Migrate some startup scripts
tassoevan Mar 24, 2021
9afe330
Migrate some startup modules to TypeScript
tassoevan Mar 24, 2021
81a1f9a
Convert reactAdapters module to TypeScript
tassoevan Mar 25, 2021
38d05e2
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 25, 2021
885faa0
Migrate routes module to TypeScript
tassoevan Mar 25, 2021
fce79b4
Move more initialization modules
tassoevan Mar 25, 2021
5f8b0d4
Migrate some startup modules to TypeScript
tassoevan Mar 25, 2021
7e3efdf
Add custom eslint config to startup and Prettier
tassoevan Mar 26, 2021
4d77782
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 26, 2021
2679910
Convert last startup modules to TypeScript
tassoevan Mar 26, 2021
67cd663
Promote eslint configuration to the entire client/ directory
tassoevan Mar 26, 2021
29af9ed
Mount React root at startup
tassoevan Mar 26, 2021
a58d677
Render BlazeLayout as a React component
tassoevan Mar 26, 2021
9008c15
Add custom eslint config to /ee/client
tassoevan Mar 26, 2021
5844784
Move AppRoot
tassoevan Mar 26, 2021
25dc120
Warn against multiples components per module
tassoevan Mar 27, 2021
6fd679c
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 27, 2021
1f0c32e
Update React and Storybook
tassoevan Mar 27, 2021
8d9d7cc
Move startup modules away from import/
tassoevan Mar 27, 2021
2cd9e19
Use react-hooks eslint rules in TypeScript
tassoevan Mar 27, 2021
19a8778
Aggregate templates created from components
tassoevan Mar 27, 2021
bb6959e
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 27, 2021
1407aba
Remove async reference to react and react-dom
tassoevan Mar 27, 2021
f425e36
Split some components
tassoevan Mar 27, 2021
3d78649
Split some components
tassoevan Mar 27, 2021
7c6064d
Replace React.memo with memo
tassoevan Mar 27, 2021
6288a1f
Replace React.forwardRef with forwardRef
tassoevan Mar 27, 2021
ba6438b
Remove last usages `React` as namespace
tassoevan Mar 27, 2021
f161f87
Split some components
tassoevan Mar 27, 2021
7ed5547
Split some components
tassoevan Mar 28, 2021
1bf5cc4
Convert barrel exports to TypeScript
tassoevan Mar 28, 2021
157ef43
Split some components
tassoevan Mar 28, 2021
63c90f2
Split some components
tassoevan Mar 28, 2021
6ad5791
Split some components
tassoevan Mar 28, 2021
1695ef5
Split some components
tassoevan Mar 28, 2021
b1ae795
Split some components
tassoevan Mar 28, 2021
59fbb51
Split some components
tassoevan Mar 28, 2021
dc30d3b
Split some components
tassoevan Mar 28, 2021
8185380
Split some components
tassoevan Mar 28, 2021
9903f06
Split some components
tassoevan Mar 28, 2021
6f9dc38
Split some components
tassoevan Mar 28, 2021
53e4c1d
Split some components
tassoevan Mar 28, 2021
0552af5
Split some components
tassoevan Mar 28, 2021
26ce796
Split some components
tassoevan Mar 28, 2021
1eebcde
Split some components
tassoevan Mar 28, 2021
aa0097d
Split some components
tassoevan Mar 28, 2021
32f0ecd
Fix wrong import path
tassoevan Mar 28, 2021
d886a7d
Split some components
tassoevan Mar 28, 2021
62342cb
Split some components
tassoevan Mar 28, 2021
12bdcab
Split some components
tassoevan Mar 28, 2021
ba155bc
Split some components
tassoevan Mar 28, 2021
4dc163a
Split some components
tassoevan Mar 28, 2021
694ad7e
Split some components
tassoevan Mar 28, 2021
5fab54b
Split some components
tassoevan Mar 28, 2021
6a1c17e
Split some components
tassoevan Mar 28, 2021
6f69a52
Split some components
tassoevan Mar 28, 2021
4bfb7c8
Split some components
tassoevan Mar 28, 2021
23d92cf
Split some components
tassoevan Mar 28, 2021
c7186b5
Split some components
tassoevan Mar 28, 2021
ffd2282
Split some components
tassoevan Mar 28, 2021
97f26f7
Split some components
tassoevan Mar 28, 2021
5f51713
Split some components
tassoevan Mar 28, 2021
dd85d80
Warn about missing display name for components
tassoevan Mar 28, 2021
b4007d2
Fix some missing components' display names
tassoevan Mar 28, 2021
7090399
Split some components
tassoevan Mar 28, 2021
25d9c17
Split some components
tassoevan Mar 28, 2021
5c6ea37
Split some components
tassoevan Mar 28, 2021
a706d4a
Split some components
tassoevan Mar 28, 2021
3e60617
Split some components
tassoevan Mar 28, 2021
cde6249
Split some components
tassoevan Mar 28, 2021
a2287c3
Split some components
tassoevan Mar 28, 2021
8bae492
Split some components
tassoevan Mar 28, 2021
3ba2b2d
Split some components
tassoevan Mar 28, 2021
d9e5242
Fix some missing components' display names
tassoevan Mar 28, 2021
023b050
Split some components
tassoevan Mar 28, 2021
088adda
Split some components
tassoevan Mar 28, 2021
82e5f45
Split some components
tassoevan Mar 28, 2021
717594a
Split some components
tassoevan Mar 28, 2021
4817397
Split some components
tassoevan Mar 28, 2021
2e8bd71
Fix some missing components' display names
tassoevan Mar 28, 2021
8d051d0
Refactor UserAutoComplete
tassoevan Mar 28, 2021
fca004d
Refactor BurgerIcon
tassoevan Mar 28, 2021
d8c0eb1
Split some components
tassoevan Mar 28, 2021
96064f2
Split some components
tassoevan Mar 28, 2021
2f9da21
Split some components
tassoevan Mar 28, 2021
74e28d4
Split some components
tassoevan Mar 28, 2021
7148ecb
Split some components
tassoevan Mar 28, 2021
9503b67
Split some components
tassoevan Mar 28, 2021
7f5b4b8
Split some components
tassoevan Mar 28, 2021
d31ab67
Split some components
tassoevan Mar 28, 2021
4f4c86d
Split some components
tassoevan Mar 28, 2021
04d880d
Fix some missing components' display names
tassoevan Mar 28, 2021
a88d14a
Split some components
tassoevan Mar 28, 2021
54266d2
Split some components
tassoevan Mar 28, 2021
5a3ff29
Fix some missing components' display names
tassoevan Mar 28, 2021
d1b463b
Split some components
tassoevan Mar 28, 2021
3008947
Split some components
tassoevan Mar 28, 2021
adc012a
Split some components
tassoevan Mar 28, 2021
fd016f5
Split some components
tassoevan Mar 29, 2021
32fc11f
Split some components
tassoevan Mar 29, 2021
388101e
Split some components
tassoevan Mar 29, 2021
27e47d3
Split some components
tassoevan Mar 29, 2021
48febe0
Split some components
tassoevan Mar 29, 2021
a338a74
Split some components
tassoevan Mar 29, 2021
6dc4dfe
Split some components
tassoevan Mar 29, 2021
158d378
Split some components
tassoevan Mar 29, 2021
af48661
Split some components
tassoevan Mar 29, 2021
76c67c6
Split some components
tassoevan Mar 29, 2021
91d8333
Split some components
tassoevan Mar 29, 2021
6d129ad
Split some components
tassoevan Mar 29, 2021
8193321
Split some components
tassoevan Mar 29, 2021
16a05fa
Split some components
tassoevan Mar 29, 2021
385baad
Split some components
tassoevan Mar 29, 2021
6a57518
Split some components
tassoevan Mar 29, 2021
f3bfa3f
Use stricter eslint rules
tassoevan Mar 29, 2021
813498b
Lint over missing named imports
tassoevan Mar 29, 2021
587703c
Fix accidental case change
tassoevan Mar 29, 2021
58b0cd2
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 29, 2021
66279c2
Refactor RemoveUsersModal
tassoevan Mar 29, 2021
2956fa5
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 29, 2021
96eefbe
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 30, 2021
891901e
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Mar 30, 2021
953e70e
Fix stylelint issue
tassoevan Mar 30, 2021
775c4ad
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 1, 2021
5bdb651
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 1, 2021
031d0e2
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 5, 2021
5b0f2e2
Fix broken reference
tassoevan Apr 5, 2021
e0e3ffb
Fix Storybook webpack config
tassoevan Apr 5, 2021
ba40aa4
Use Fuselage's package typings
tassoevan Apr 5, 2021
32d9d8d
Properly handle unmounts on BlazeLayoutWrapper
tassoevan Apr 6, 2021
9d98ece
Fix sidebar avatars
tassoevan Apr 6, 2021
d19fc0a
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 6, 2021
77c3469
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 6, 2021
1ac5891
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 6, 2021
85ae02d
Refactor OmnichannelProvider to avoid children remounting
tassoevan Apr 6, 2021
5a3705f
Replace connection status bar
tassoevan Apr 7, 2021
c359eb9
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 7, 2021
837c9bc
Merge branch 'develop' into perf/client-init
tassoevan Apr 7, 2021
3dff30a
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 7, 2021
2ba0f67
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
tassoevan Apr 7, 2021
70cd421
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into perf…
ggazzo Apr 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ imports/client/
!/.storybook/
ee/server/services/dist/**
!/.mocharc.js
!/client/.eslintrc.js
!/ee/client/.eslintrc.js
69 changes: 69 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const path = require('path');

const webpack = require('webpack');

module.exports = {
stories: [
'../app/**/*.stories.js',
Expand All @@ -6,5 +10,70 @@ module.exports = {
],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-postcss',
],
webpackFinal: async (config) => {
const cssRule = config.module.rules.find(({ test }) => test.test('index.css'));

cssRule.use[2].options = {
...cssRule.use[2].options,
postcssOptions: {
plugins: [
require('postcss-custom-properties')({ preserve: true }),
require('postcss-media-minmax')(),
require('postcss-selector-not')(),
require('postcss-nested')(),
require('autoprefixer')(),
require('postcss-url')({ url: ({ absolutePath, relativePath, url }) => {
const absoluteDir = absolutePath.slice(0, -relativePath.length);
const relativeDir = path.relative(absoluteDir, path.resolve(__dirname, '../public'));
const newPath = path.join(relativeDir, url);
return newPath;
} }),
],
},
};

config.module.rules.push({
test: /\.info$/,
type: 'json',
});

config.module.rules.push({
test: /\.html$/,
use: '@settlin/spacebars-loader',
});

config.module.rules.push({
test: /\.(ts|tsx)$/,
use: [
{
loader: 'ts-loader',
options: {
compilerOptions: {
noEmit: false,
},
},
},
],
});

config.resolve.extensions.push('.ts', '.tsx');

config.plugins.push(
new webpack.NormalModuleReplacementPlugin(
/^meteor/,
require.resolve('./mocks/meteor.js'),
),
new webpack.NormalModuleReplacementPlugin(
/(app)\/*.*\/(server)\/*/,
require.resolve('./mocks/empty.js'),
),
);

config.mode = 'development';
config.optimization.usedExports = true;

return config;
},
};
65 changes: 0 additions & 65 deletions .storybook/webpack.config.js

This file was deleted.

1 change: 0 additions & 1 deletion app/authorization/client/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { hasAllPermission, hasAtLeastOnePermission, hasPermission, userHasAllPermission } from './hasPermission';
import { hasRole } from './hasRole';
import { AuthorizationUtils } from '../lib/AuthorizationUtils';
import './usersNameChanged';
import './requiresPermission.html';
import './startup';

Expand Down
18 changes: 0 additions & 18 deletions app/authorization/client/usersNameChanged.js

This file was deleted.

4 changes: 1 addition & 3 deletions app/channel-settings/client/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import './startup/messageTypes';
import './startup/tabBar';
import './views/Multiselect';
import './tabBar';

export { ChannelSettings } from './lib/ChannelSettings';
67 changes: 0 additions & 67 deletions app/channel-settings/client/startup/messageTypes.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, lazy, LazyExoticComponent } from 'react';

import { addAction } from '../../../../client/views/room/lib/Toolbox';
import { addAction } from '../../../client/views/room/lib/Toolbox';

addAction('channel-settings', {
groups: ['channel', 'group'],
Expand All @@ -9,6 +9,6 @@ addAction('channel-settings', {
full: true,
title: 'Room_Info',
icon: 'info-circled',
template: lazy(() => import('../../../../client/views/room/contextualBar/Info')) as LazyExoticComponent<FC>,
template: lazy(() => import('../../../client/views/room/contextualBar/Info')) as LazyExoticComponent<FC>,
order: 7,
});
12 changes: 0 additions & 12 deletions app/channel-settings/client/views/Multiselect.js

This file was deleted.

3 changes: 1 addition & 2 deletions app/chatpal-search/client/route.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

import * as BlazeLayout from '../../../client/lib/portals/blazeLayout';
import { registerAdminRoute } from '../../../client/views/admin';
import { t } from '../../utils';

Expand Down
2 changes: 1 addition & 1 deletion app/livechat/client/tabBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ addAction('room-info', {
id: 'room-info',
title: 'Room_Info',
icon: 'info-circled',
template: lazy(() => import('../../../client/omnichannel/chats/contextualBar')),
template: lazy(() => import('../../../client/views/omnichannel/directory/chats/contextualBar/ChatsContextualBar')),
order: 0,
});

Expand Down
6 changes: 3 additions & 3 deletions app/livestream/client/tabBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useMemo } from 'react';
import React, { ReactNode, useMemo } from 'react';
import { Option, Badge } from '@rocket.chat/fuselage';

import { useSetting } from '../../../client/contexts/SettingsContext';
Expand All @@ -19,10 +19,10 @@ addAction('livestream', ({ room }) => {
icon: 'podcast',
template: 'liveStreamTab',
order: isLive ? -1 : 15,
renderAction: (props): React.ReactNode => <Header.ToolBoxAction {...props}>
renderAction: (props): ReactNode => <Header.ToolBoxAction {...props}>
{isLive ? <Header.Badge title={t('Livestream_live_now')} variant='danger'>!</Header.Badge> : null}
</Header.ToolBoxAction>,
renderOption: ({ label: { title, icon }, ...props }: any): React.ReactNode => <Option label={title} title={title} icon={icon} {...props}>
renderOption: ({ label: { title, icon }, ...props }: any): ReactNode => <Option label={title} title={title} icon={icon} {...props}>
{isLive ? <Badge title={t('Livestream_live_now')} variant='danger'>!</Badge> : null }
</Option>,
} : null), [enabled, isLive, t]);
Expand Down
3 changes: 2 additions & 1 deletion app/mail-messages/client/router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

import * as BlazeLayout from '../../../client/lib/portals/blazeLayout';

FlowRouter.route('/mailer/unsubscribe/:_id/:createdAt', {
name: 'mailer-unsubscribe',
Expand Down
3 changes: 2 additions & 1 deletion app/message-snippet/client/router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

import * as BlazeLayout from '../../../client/lib/portals/blazeLayout';

FlowRouter.route('/snippet/:snippetId/:snippetName', {
name: 'snippetView',
Expand Down
2 changes: 1 addition & 1 deletion app/oauth2-server-config/client/oauth/oauth2-client.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Meteor } from 'meteor/meteor';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { Template } from 'meteor/templating';
import { Accounts } from 'meteor/accounts-base';
import { ReactiveVar } from 'meteor/reactive-var';

import * as BlazeLayout from '../../../../client/lib/portals/blazeLayout';
import { APIClient } from '../../../utils/client';

FlowRouter.route('/oauth/authorize', {
Expand Down
4 changes: 2 additions & 2 deletions app/otr/client/rocketchat.otr.room.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { Random } from 'meteor/random';
import { EJSON } from 'meteor/ejson';
import { Tracker } from 'meteor/tracker';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { TAPi18n } from 'meteor/rocketchat:tap-i18n';
import { TimeSync } from 'meteor/mizzao:timesync';
import _ from 'underscore';
Expand All @@ -14,6 +13,7 @@ import { Notifications } from '../../notifications';
import { modal } from '../../ui-utils';
import { getUidDirectMessage } from '../../ui-utils/client/lib/getUidDirectMessage';
import { Presence } from '../../../client/lib/presence';
import { goToRoomById } from '../../../client/lib/goToRoomById';

OTR.Room = class {
constructor(userId, roomId) {
Expand Down Expand Up @@ -189,7 +189,7 @@ OTR.Room = class {
this.generateKeyPair().then(() => {
this.importPublicKey(data.publicKey).then(() => {
this.firstPeer = false;
FlowRouter.goToRoomById(data.roomId);
goToRoomById(data.roomId);
Meteor.defer(() => {
this.established.set(true);
this.acknowledge();
Expand Down
3 changes: 2 additions & 1 deletion app/search/client/provider/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { MessageAction, RoomHistoryManager } from '../../../ui-utils';
import { messageArgs } from '../../../ui-utils/client/lib/messageArgs';
import { Rooms } from '../../../models/client';
import { getCommonRoomEvents } from '../../../ui/client/views/app/lib/getCommonRoomEvents';
import { goToRoomById } from '../../../../client/lib/goToRoomById';

Meteor.startup(function() {
MessageAction.addButton({
Expand All @@ -35,7 +36,7 @@ Meteor.startup(function() {
return RoomHistoryManager.getSurroundingMessages(message, 50);
}

FlowRouter.goToRoomById(message.rid);
goToRoomById(message.rid);
// RocketChat.MessageAction.hideDropDown();

if (window.matchMedia('(max-width: 500px)').matches) {
Expand Down
Loading