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: add *ishLazyBrowserView directive #1654

Merged
merged 2 commits into from
May 10, 2024

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented May 8, 2024

PR Type

[X] Feature
[X] Refactoring (no functional changes, no API changes)

What Is the New Behavior?

Added *ishBrowserLazyView directive to lazy load content when it is in the viewport on the browser side. This helps limiting requests made in the SSR process.

Does this PR Introduce a Breaking Change?

[ ] Yes
[X] No

Other Information

AB#96475

@dhhyi dhhyi added feature New feature or request performance Performance improvements labels May 8, 2024
@dhhyi dhhyi self-assigned this May 8, 2024
@dhhyi dhhyi force-pushed the feat/browser-lazy-view-directive branch from 2c2f1d5 to f602982 Compare May 8, 2024 11:16
@dhhyi dhhyi changed the title feat: add ishLazyBrowserView directive feat: add *ishLazyBrowserView directive May 8, 2024
@dhhyi dhhyi removed their assignment May 8, 2024
@dhhyi dhhyi marked this pull request as ready for review May 8, 2024 11:52
@shauke shauke added this to the 5.2 milestone May 10, 2024
@shauke shauke self-assigned this May 10, 2024
@shauke
Copy link
Collaborator

shauke commented May 10, 2024

@dhhyi Just for clarification; the recently viewed component is not an example for "limiting requests made in the SSR process", right? There should not be any recently information on the SSR side that would result in any requests.
It is still a good idea to do the recently required REST requests on the client side only when they come in the viewport though.

@dhhyi
Copy link
Collaborator Author

dhhyi commented May 10, 2024

the recently viewed component is not an example for "limiting requests made in the SSR process", right?

Yes, recently doesn't do any REST requests. On SSR it should not do anything at all as it relates on cookies or session storage. But it's a good example for something that should be lazy loaded on the client as it always is below the fold. The jest test also shows how the directive has to be used in tests to trigger the rendering.

@shauke shauke force-pushed the feat/browser-lazy-view-directive branch from f602982 to 4353322 Compare May 10, 2024 08:00
@shauke shauke merged commit 0a27c17 into develop May 10, 2024
13 checks passed
@shauke shauke deleted the feat/browser-lazy-view-directive branch May 10, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request performance Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants