8000 fix(scroll): upgrade gix to restore infinite scrolling by yhabib · Pull Request #6857 · dfinity/nns-dapp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 10 commits into from

Conversation

yhabib
Copy link
Contributor
@yhabib yhabib commented May 21, 2025

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

  • Upgrade the GIX component library to the latest version.
  • Update the consumers of InfiniteScroll to the new interface.

Tests

  • Pipeline should work as before.
  • Manually tested in devenv.

Todos

  • Add entry to changelog (if necessary).

@yhabib yhabib force-pushed the yhabib/chore/upgrade-gix branch from 9432167 to b341c43 Compare May 21, 2025 13:13
@yhabib yhabib changed the base branch from main to yhabib/chore/upgrade-gix-prework May 21, 2025 13:13
@yhabib yhabib changed the title upgrade gix fix(scroll): upgrade gix to restore infinite scrolling May 21, 2025
@yhabib yhabib requested review from Copilot and mstrasinskis May 21, 2025 13:27
Copy link
Contributor
@Copilot Copilot AI left a 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 return Promise<void>
  • Replace legacy on:nnsIntersect with the new onIntersect 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 other loadNext* patterns. Consider renaming it (e.g., loadMoreBallots) to keep naming consistent across infinite-scroll handlers.
const showMore = async () => {

@yhabib yhabib force-pushed the yhabib/chore/upgrade-gix branch 2 times, most recently from 849c531 to e5bd510 Compare May 21, 2025 13:35
@yhabib yhabib marked this pull request as ready for review May 21, 2025 13:44
@yhabib yhabib force-pushed the yhabib/chore/upgrade-gix branch from 435a6fe to 2c73610 Compare May 21, 2025 13:47
Copy link
Contributor
@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Base automatically changed from yhabib/chore/upgrade-gix-prework to main May 21, 2025 19:59
@yhabib yhabib requested a review from a team as a code owner May 21, 2025 19:59
@yhabib yhabib force-pushed the yhabib/chore/upgrade-gix branch from 2c73610 to 9c21f66 Compare May 22, 2025 06:54
@yhabib yhabib added this pull request to the merge queue May 22, 2025
Any commits made after this event will not be merged.
@mstrasinskis mstrasinskis removed this pull request from the merge queue due to a manual request May 22, 2025
@mstrasinskis mstrasinskis added this pull request to the merge queue May 22, 2025
Any commits made after this event will not be merged.
github-merge-queue bot pushed a commit that referenced this pull request May 22, 2025
# 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0