0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/apps/comments-ui/test/e2e
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
..
actions.test.ts 🎨 Admin X - Offers (#19520) 2024-01-25 12:41:54 +00:00
auth-frame.test.ts Fixed comments MockedApi and tests 2024-02-28 07:38:22 +07:00
cta.test.ts Moved old comment tests to Playwright (#17750) 2023-08-17 12:47:08 +02:00
editor.test.ts Converted Comments-UI App to TypeScript and React hooks (#17760) 2023-08-18 13:30:59 +00:00
lazy-loading.test.ts Added lazy-loading to comments (#19769) 2024-02-28 12:52:24 +00:00
options.test.ts Converted Comments-UI App to TypeScript and React hooks (#17760) 2023-08-18 13:30:59 +00:00
pagination.test.ts Fixed comments MockedApi and tests 2024-02-28 07:38:22 +07:00