Implemented lazy loading to desired components#671
Closed
tazsq wants to merge 2 commits intoRocketChat:developfrom
Closed
Implemented lazy loading to desired components#671tazsq wants to merge 2 commits intoRocketChat:developfrom
tazsq wants to merge 2 commits intoRocketChat:developfrom
Conversation
Author
|
@Spiral-Memory @sidmohanty11 please review |
Collaborator
|
Hey @tazsq We'll have to see if we need lazy loadings here.. maybe we aren't looking for it right now.. still I'll look into it and let you know |
Author
Hey @Spiral-Memory @sidmohanty11 can you revert on this issue? |
2ef2985 to
8f3bb40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #383
Brief Title
implemented lazy loading
Acceptance Criteria fulfillment
#Fixes Issue #383
PR Test Details
I have used react lazy, and suspense to ensure the components are rendered upon there first render and the initial bundle size is reduced
This pull request introduces code-splitting and lazy loading for several components across different parts of the application to improve performance by reducing the initial load time. The changes primarily involve the use of React's
lazyandSuspensefor dynamic imports.Lazy loading and code-splitting:
packages/layout_editor/src/views/ChatHeader/ChatHeader.jsx: Added lazy loading for theMenucomponent and wrapped its usage withSuspense. [1] [2] [3]packages/layout_editor/src/views/Message/Message.jsx: Added lazy loading for theMessageToolboxcomponent and wrapped its usage withSuspense. [1] [2]packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js: Added lazy loading for theEmojiPickerandAudioMessageRecordercomponents and wrapped their usage withSuspense. [1] [2] [3] [4] [5]packages/react/src/views/Message/Message.js: Added lazy loading for theAttachmentsandMessageToolboxcomponents and wrapped their usage withSuspense. [1] [2] [3] [4] [5] [6] [7]Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace
<pr_number>with the actual PR number.