Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 Replace loadable package with react's built-in lazy and add top-level Suspense boundary #6052

Merged
merged 6 commits into from
Aug 16, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Aug 11, 2023

WHAT

🤖 Generated by Copilot at e5f406c

This pull request replaces the @loadable/component library with the native React.lazy function for code splitting and lazy loading components in various files of the project. This improves the performance, maintainability, and TypeScript compatibility of the code. It also imports the correct types from react for some components' props in src/CAREUI/display.

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at e5f406c

  • Remove @loadable/component and @types/loadable__component dependencies and use React.lazy instead for code splitting and lazy loading components (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Import FC and lazy from react and use FC type for App component in src/App.tsx (link)
  • Import HTMLAttributes and ReactNode from react and use them for props types in src/CAREUI/display/Card.tsx (link)
  • Import ReactNode from react and use it for prefix prop type in src/CAREUI/display/RecordMeta.tsx (link)
  • Import lazy from react in various files and use it for loading components asynchronously (link, link, link, link, link, link)
  • Remove unused loadable imports from various files (link, link, link, link, link, link, link, link, link, link, link)
  • Import SyntheticEvent from react and use it for event parameter type in handleSubmit functions in src/Components/Facility/AddBedForm.tsx and src/Components/Facility/AddLocationForm.tsx (link, link, link, link)
  • Import RefObject and createRef from react and use them for creating refs for form fields in src/Components/Facility/AssetCreate.tsx (link, link)

@rithviknishad rithviknishad requested a review from a team August 11, 2023 07:18
@rithviknishad rithviknishad requested a review from a team as a code owner August 11, 2023 07:18
@vercel
Copy link

vercel bot commented Aug 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 16, 2023 8:39am

@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 95ac841
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64dc8b1ccd13e60008e579a2
😎 Deploy Preview https://deploy-preview-6052--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rithviknishad rithviknishad marked this pull request as ready for review August 11, 2023 07:28
@rithviknishad rithviknishad changed the title Replace loadable package with react's built-in lazy Replace loadable package with react's built-in lazy and add top-level Suspense boundary Aug 11, 2023
@rithviknishad rithviknishad changed the title Replace loadable package with react's built-in lazy and add top-level Suspense boundary 🧹 Replace loadable package with react's built-in lazy and add top-level Suspense boundary Aug 11, 2023
@github-actions github-actions bot added cypress failed pull request with cypress test failure cypress passed and removed cypress failed pull request with cypress test failure labels Aug 11, 2023
@github-actions github-actions bot added cypress failed pull request with cypress test failure and removed cypress passed labels Aug 11, 2023
@github-actions github-actions bot added cypress passed and removed cypress failed pull request with cypress test failure labels Aug 14, 2023
@nihal467
Copy link
Member

LGTM

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Aug 16, 2023
@github-actions
Copy link

👋 Hi, @rithviknishad,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@rithviknishad rithviknishad removed the merge conflict pull requests with merge conflict label Aug 16, 2023
@khavinshankar khavinshankar merged commit 95c377f into develop Aug 16, 2023
24 checks passed
@khavinshankar khavinshankar deleted the react-lazy branch August 16, 2023 09:03
@github-actions
Copy link

@rithviknishad We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

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

Successfully merging this pull request may close these issues.

remove loadable package and use the the built-in React.lazy instead
4 participants