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

fix: removes useUI() dependents sections from LazyLoadingSection #2602

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

eduardoformiga
Copy link
Member

@eduardoformiga eduardoformiga commented Dec 19, 2024

What's the purpose of this pull request?

This removes the logic that dynamically loads the sections that depend on the useUI() hook: CartSidebar and RegionModal. We decided to try to load them at another moment (//TODO: create a task for it) instead of on click.

How to test it?

Try to load the respective sections CartSidebar and RegionModal using the preview link.
You can see that both sections are being loaded in the initial loading now. Instead of loading after clicking on the respective buttons that trigger the sections.

Starters Deploy Preview

Copy link

vercel bot commented Dec 19, 2024

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 6:58pm

Copy link

codesandbox-ci bot commented Dec 19, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@eduardoformiga eduardoformiga changed the title fix: removes useUI dependents sections from LazyLoadingSection fix: removes useUI() dependents sections from LazyLoadingSection Dec 19, 2024
@eduardoformiga eduardoformiga marked this pull request as ready for review December 19, 2024 15:29
@eduardoformiga eduardoformiga requested a review from a team as a code owner December 19, 2024 15:29
@pedromtec
Copy link
Contributor

pedromtec commented Dec 20, 2024

@eduardoformiga . Some js files are loaded when I open the cart sidebar. is it normal? Example:
https://sfj-2714681--starter.preview.vtex.app/_next/static/chunks/EmptyCart.2f8960179104c38c.js

@eduardoformiga
Copy link
Member Author

@eduardoformiga . Some js files are loaded when I open the cart sidebar. is it normal? Example: https://sfj-2714681--starter.preview.vtex.app/_next/static/chunks/EmptyCart.2f8960179104c38c.js

yes, that's because some internal components are being loaded dynamically.

Copy link
Contributor

@hellofanny hellofanny left a comment

Choose a reason for hiding this comment

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

I've tried via preview link and LGTM.
At least I haven't faced any issue when testing the CartSidebar and RegionModal.

@eduardoformiga eduardoformiga merged commit 1953438 into main Dec 20, 2024
9 checks passed
@eduardoformiga eduardoformiga deleted the fix/out-of-viewport-sections-with-use-ui branch December 20, 2024 20:37
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.

4 participants