Ghost/apps/comments-ui/test
Kevin Ansfield 5b6d8fb7a8
Added lazy-loading to comments (#19769)
closes ENG-678

The comments block is typically shown at the bottom of a post so it doesn't make sense to eagerly fetch comments from the API when we don't know if the comments block will even be viewed. By lazy-loading the data only when the comments block comes into view we can reduce both data usage for visitors and load on the site.

- uses IntersectionObserver API to delay comments app initialisation until the comments block has scrolled into view
- updated all iframe-related components to forward a `ref` so we can use the `<iframe>` element reference inside the `App` component
2024-02-28 12:52:24 +00:00
..
e2e Added lazy-loading to comments (#19769) 2024-02-28 12:52:24 +00:00
unit
utils Added lazy-loading to comments (#19769) 2024-02-28 12:52:24 +00:00