Loading
Replace infinite scroll with Load more button in logs list
What does this MR do and why?
Replaces GlInfiniteScroll with a Load more button in LogsList, following the Pajamas Design System guidance for "Loading more". Infinite scroll is deprecated for accessibility reasons (see linked epic), and the migration path was agreed in the issue discussion.
This also fixes a bug where nextPageToken was never cleared once the API stopped returning a token, causing the UI to keep refetching the same final page indefinitely instead of correctly hiding the load action.
Changes
- Replace
GlInfiniteScrollwith aGlButton(size="small" category="tertiary" variant="confirm"), shown only while there are more pages to load, mirroring the same pattern recently used for the What's New drawer. - Rename
bottomReached→loadMore. - Fix
nextPageTokenhandling so it's cleared (?? null) when the API no longer returns one. - Remove now-unused
listHeightheight-tracking (was only needed to constrainGlInfiniteScroll's scroll container). - Update
logs_list_spec.jsaccordingly.
References
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Enable the
observability_featuresfeature flag (http://127.0.0.1:3000/rails/features/) - Navigate to Project > Monitor > Logs
- Confirm a
Load morebutton appears at the bottom of the list instead of infinite scroll, and that it disappears once all pages have loaded
Screencast
Edited by Dakota Dux