Skip to content

Publisher pages lazy imports, pt1#5460

Merged
edisile merged 4 commits intopublisher-lazy-importfrom
publisher-lazy-import-1
Nov 18, 2025
Merged

Publisher pages lazy imports, pt1#5460
edisile merged 4 commits intopublisher-lazy-importfrom
publisher-lazy-import-1

Conversation

@edisile
Copy link
Copy Markdown
Contributor

@edisile edisile commented Nov 18, 2025

(removed Cypress because otherwise the PR can't be deployed and tested since the package can't be downloaded due to Cloudflare being unstable, I will add it back before merging)

Done

  • added importComponent helper for lazy loading components inside a Suspense boundary
  • added tests for importComponent helper
  • lazy load account details page

How to QA

  • visit demo
  • log in
  • open dev tools' network tab and filter by JS
  • go to the account page
    • in your network tab you should see a GET request for a JS chunk
    • you should see a "Loading" spinner, then the account details will load
  • go to another page and back to account
    • there should be no JS network request and no "Loading" spinner

Testing

  • This PR has tests
  • No testing required (explain why):

@webteam-app
Copy link
Copy Markdown

@edisile edisile force-pushed the publisher-lazy-import-1 branch from de9c099 to b54eb6d Compare November 18, 2025 15:26
Copy link
Copy Markdown
Contributor

@steverydz steverydz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@edisile edisile force-pushed the publisher-lazy-import-1 branch from b54eb6d to ec46572 Compare November 18, 2025 17:22
@edisile edisile merged commit f1a4d4b into publisher-lazy-import Nov 18, 2025
30 of 54 checks passed
@edisile edisile deleted the publisher-lazy-import-1 branch November 18, 2025 17:27
edisile added a commit that referenced this pull request Nov 25, 2025
* Publisher pages lazy imports, pt1 (#5460)

* feature: lazy Suspense wrapper component

* feature: lazy import AccountDetails

* fix: linting

* feature: importComponent test

* feature: lazy import snap management pages (#5461)

* Publisher pages lazy import, pt3 (#5465)

* chore: restructure snaps management pages layout

* feature: test SnapsManagementLayout

* chore: cleanup

* fix: old broken tests

* feature: better coverage for tabs and breadcrumbs

* fix: comments to explain TODO items

* Publisher pages lazy import, pt4 (#5471)

* feature: lazy import account snaps and name registration pages

* fix: use Link components for SPA navigation

* Publisher pages lazy import, pt5 (#5476)

* fix: use Link components for SPA navigation

* feature: lazy import models, model details and policies pages

* chore: refactor model page layout to fix ugly rerender

* fix: use default loader

* fix: bad useQuery key (fix #5452)

* fix: test that now fails

* Publisher pages lazy import, pt6 (#5477)

* feature: lazy load more brand store pages

* fix: ignore AbortError when using AbourController.abort()

* feature: lazy load validations sets and keys pages (#5478)

* fix: /admin page redirect
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.

3 participants