-
Notifications
You must be signed in to change notification settings - Fork 47
fix(scroll): upgrade gix to restore infinite scrolling #6857
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
Conversation
9432167
to
b341c43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the Gix component library and refactors all InfiniteScroll consumers to match the new Svelte 5 interface.
- Upgrade Gix dependency and adjust
InfiniteScroll
API usage - Refactor all
loadNext*
functions to returnPromise<void>
- Replace legacy
on:nnsIntersect
with the newonIntersect
prop binding
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
frontend/src/lib/pages/SnsProposals.svelte | Updated loadNextPage signature and prop binding |
frontend/src/lib/pages/NnsWallet.svelte | Switched to new loadNextTransactions prop shorthand |
frontend/src/lib/pages/NnsProposals.svelte | Renamed findNextProposals and updated handler binding |
frontend/src/lib/components/sns-proposals/SnsProposalsList.svelte | Refactored InfiniteScroll usage and event handler |
frontend/src/lib/components/proposals/UniverseWithActionableProposals.svelte | Added no-op onIntersect stub to disabled scroll |
frontend/src/lib/components/proposals/NnsProposalsList.svelte | Refactored InfiniteScroll usage and handler binding |
frontend/src/lib/components/neuron-detail/Ballots/Ballots.svelte | Made showMore async and switched to onIntersect |
frontend/src/lib/components/accounts/UiTransactionsList.svelte | Introduced loadNextTransactions prop and updated InfiniteScroll |
frontend/src/lib/components/accounts/IcrcWalletTransactionsList.svelte | Switched to new shorthand loadNextTransactions prop |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
frontend/src/lib/components/neuron-detail/Ballots/Ballots.svelte:29
- [nitpick] The
showMore
function name is inconsistent with otherloadNext*
patterns. Consider renaming it (e.g.,loadMoreBallots
) to keep naming consistent across infinite-scroll handlers.
const showMore = async () => {
frontend/src/lib/components/sns-proposals/SnsProposalsList.svelte
Outdated
Show resolved
Hide resolved
frontend/src/lib/components/proposals/UniverseWithActionableProposals.svelte
Show resolved
Hide resolved
849c531
to
e5bd510
Compare
435a6fe
to
2c73610
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
2c73610
to
9c21f66
Compare
# Motivation We want to upgrade the version of Gix in the nns-dapp to address an issue with Infinite Scrolling. The latest version of GIX introduced a breaking change to `InfiniteScroll` when migrating it to Svelte 5. This PR builds on top of #6859 and refactors how these components consume the `InfiniteScroll`. Note: This upgrade fixes the issue of all lists not fetching next pages. Before: Not all votes are being loaded: https://github.com/user-attachments/assets/4b71cf51-d18f-427e-a9f7-97f67adc4fa4 Not all proposals for a project are being loaded by scrolling: https://github.com/user-attachments/assets/b81273ff-3d87-4b7d-a881-4fe0cb39c2b9 After: All votes are being loaded: https://github.com/user-attachments/assets/bcf125c9-f567-48d7-9d30-b3b4c29b0291 All proposals for a project are being loaded by scrolling: https://github.com/user-attachments/assets/6d9ba8f7-db19-414a-bcb8-24e0b7048159 # Changes - Upgrade the GIX component library to the latest version. - Update the consumers of `InfiniteScroll` to the new interface 73D5 . # Tests - Pipeline should work as before. - Manually tested in [devenv](https://qsgjb-riaaa-aaaaa-aaaga-cai.yhabib-ingress.devenv.dfinity.network/portfolio/). # Todos - [x] Add entry to changelog (if necessary).
Motivation
We want to upgrade the version of Gix in the nns-dapp to address an issue with Infinite Scrolling. The latest version of GIX introduced a breaking change to
InfiniteScroll
when migrating it to Svelte 5.This PR builds on top of #6859 and refactors how these components consume the
InfiniteScroll
.Note: This upgrade fixes the issue of all lists not fetching next pages.
Before:
Not all votes are being loaded:
Screen.Recording.2025-05-21.at.15.21.42.mov
Not all proposals for a project are being loaded by scrolling:
Screen.Recording.2025-05-21.at.15.25.33.mov
After:
All votes are being loaded:
Screen.Recording.2025-05-21.at.15.28.04.mov
All proposals for a project are being loaded by scrolling:
Screen.Recording.2025-05-21.at.15.29.26.mov
Changes
InfiniteScroll
to the new interface.Tests
Todos