Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Mar 26, 2021

Proposed changes (including videos or screenshots)

This small PR does the following:

  • Now React is the web client's first-class citizen, being loaded before Blaze. Thus, BlazeLayout calls render templates inside of a React component (BlazeLayoutWrapper);
  • Main client startup code, including polyfills, is written in TypeScript;
  • At the moment, routes are treated as regular startup code; it's expected that FlowRouter will be deprecated in favor of a new routing library;
  • React was updated to major version 17, deprecating the usage of React as namespace (e.g. use memo() instead of React.memo());
  • The client/ and ee/client/ directory are linted with a custom ESLint configuration that includes:
    • Prettier;
    • react-hooks/* rules for TypeScript files;
    • react/no-multi-comp, enforcing the rule of one single React component per module;
    • react/display-name, which enforces that React components must have a name for debugging;
    • import/named, avoiding broken named imports.
  • A bunch of components were refactored to match the new ESLint rules.

Issue(s)

Steps to test or reproduce

Further comments

Target browser changes:

-and_chr 84
-and_ff 68
+and_chr 89
+and_ff 86
 and_qq 10.4
 and_uc 12.12
-android 81
+android 89
 baidu 7.12
 bb 10
 bb 7
-chrome 84
-chrome 83
-edge 84
-edge 83
-firefox 79
-firefox 78
+chrome 89
+chrome 88
+edge 89
+edge 88
+firefox 87
+firefox 86
 ie 11
 ie 10
 ie_mob 11
 ie_mob 10
-ios_saf 13.4-13.5
-ios_saf 13.3
+ios_saf 14.0-14.5
+ios_saf 13.4-13.7
 kaios 2.5
 op_mini all
-op_mob 46
+op_mob 62
 op_mob 12.1
-opera 69
-opera 68
+opera 73
+opera 72
+safari 14
 safari 13.1
-safari 13
+samsung 13.0
 samsung 12.0
-samsung 11.1-11.2

tassoevan and others added 21 commits March 30, 2021 18:00
@ggazzo ggazzo changed the title New set of rules for client code [NEW] New set of rules for client code Apr 8, 2021
@ggazzo ggazzo merged commit d8a24b0 into develop Apr 8, 2021
@ggazzo ggazzo deleted the perf/client-init branch April 8, 2021 04:21
@ankar84
Copy link

ankar84 commented Apr 8, 2021

Great job @tassoevan and @ggazzo you guys rocks!

gabriellsh added a commit that referenced this pull request Apr 15, 2021
…user_info

* 'develop' of github.com:RocketChat/Rocket.Chat: (40 commits)
  [FIX] Typos/missing elements in the French translation (#21525)
  [FIX] Archive permissions for room moderator (#21563)
  [FIX] Checking 'start-discussion' Permission for MessageBox Actions (#21564)
  [FIX] Correcting the case there are no result in admin users list (#21556)
  [FIX] Don't allow whitespace on bold, italic and strike (#21483)
  [FIX] Message Block ordering (#21464)
  [IMPROVE] Add proxy for data export (#20998)
  [FIX] Updating a message causing URLs to be parsed even within markdown code (#21489)
  Bump version to 3.13.2
  [FIX] Fix the bugs opening discussions (#21557)
  A React-based replacement for BlazeLayout (#21527)
  Language update from LingoHub 🤖 on 2021-04-12Z (#21530)
  Chore: Increase testing coverage on password policy class (#21482)
  Chore: Meteor update to 2.1.1 (#21494)
  Chore: Do not stop animations on Test Mode (#21484)
  Chore: Remove control character from room model operation (#21493)
  [NEW] New set of rules for client code (#21318)
  Bump version to 3.13.1
  [FIX] Header component breaking if user is not part of teams room (#21465)
  [FIX] Admin Users list pagination (#21469)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Apr 28, 2021
@pythoneer
Copy link

@tassoevan @ggazzo it is a little bit unclear which versions this pull request have affected. This PR possibly broke functionality explained at #22098 (if the analysis from OP is right) but its hard to rollback to a version which is not affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants