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

feat: split the global sections in own file #2554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eduardoformiga
Copy link
Member

@eduardoformiga eduardoformiga commented Nov 12, 2024

What's the purpose of this pull request?

This PR is part of the performance initiative and aims to split the global sections into its own file.

Let's initially separate the components of each page type into their own files; this will help organize the import of components by page type (in other tasks) and opens up the possibility of only importing customized components based on the page type in the future, instead of all components, as we currently do.

The idea is to stop using the GlobalSections component in the tree of each page, but since we are not doing this for all pages yet, we’ll keep it temporarily. We will only remove the use of this component on the homepage (in another task). Once we’ve done this for all pages, we can remove this component entirely, but we will keep the function getGlobalSectionsData. (packages/core/src/components/cms/GlobalSections.tsx). Global sections will now be imported into the sections file of each page and passed directly to RenderSections.

Starters Deploy Preview

Preview
https://sfj-923b60d--starter.preview.vtex.app/

References

POC PR

@eduardoformiga eduardoformiga added the performance Pull requests related to perfomance issues label Nov 12, 2024
Copy link

vercel bot commented Nov 12, 2024

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

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 4:13pm

@eduardoformiga eduardoformiga marked this pull request as ready for review November 12, 2024 16:13
@eduardoformiga eduardoformiga requested a review from a team as a code owner November 12, 2024 16:13
@eduardoformiga eduardoformiga requested review from hellofanny and renatomaurovtex and removed request for a team November 12, 2024 16:13
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Pull requests related to perfomance issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant