Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable lazy loading skip on custom sections (#2654)
## What's the purpose of this pull request? Enable the store to decide if a new custom section will skip lazy loading. It's important because otherwise all sections are inside the `LazyLoadingSection` and `ViewportObserver` for performance purposes, which makes the section structure not show on the first HTML - that being said, sometimes it's important to appear on the first HTML for SEO purposes. ## How it works? If the section has a property called `skipLazyLoadingSection` set to `true` it'll bypass `LazyLoadingSection`. ## How to test it? I've added a custom section called `Custom H1` in the `playground.store`, this section is composed by a simple h1 that shows the collection name. It's already added to the PLP template on hCMS there, so you can test it through https://sfj-6854f82--playground.preview.vtex.app/just-arrived - a collection page on `playground`. | | | | ---- | ---- | | Custom section with `skipLazyLoadingSection` property |  | | Custom section example |  | | Custom section added to PLP template on hCMS |  | | Custom section structure being shown on the 1st HTML |  | ### Starters Deploy Preview https://sfj-6854f82--playground.preview.vtex.app/ ([PR](vtex-sites/playground.store#134)) ## References - [Jira task](https://vtex-dev.atlassian.net/browse/SFS-2089) ## Checklist **Documentation** - Opened a [doc request](https://vtex.slack.com/archives/C01664JGV43/p1738258909141509) with Mari
- Loading branch information