Skip to content
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

Namadillo: Add proposals table pagination, fix pagination bugs #929

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

emccorson
Copy link
Collaborator

@emccorson emccorson commented Jul 15, 2024

Note for testing: Needs the latest version of namada-indexer including anoma/namada-indexer#75.


Changed

  • Bump indexer to 0.0.17 to get the all proposals endpoint.
  • Refactor TableWithPaginator to not create its own pages. It now just receives pages of items and lets its parent handle creating pages.

Added

  • Add pagination to the All Proposals table.

Fixed

  • Fix proposal count by counting all proposals, not just one page of proposals. These numbers are shown on the right panel of the Governance page under "Total Proposals", "Proposals in Voting Period" etc.
  • Fetch all validators, not just the first page.

Copy link

github-actions bot commented Jul 15, 2024

@github-actions github-actions bot temporarily deployed to pull request July 15, 2024 02:33 Inactive
@emccorson emccorson marked this pull request as ready for review July 15, 2024 09:07
Copy link
Contributor

@pedrorezende pedrorezende left a comment

Choose a reason for hiding this comment

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

LGTM! Just a small comment, maybe we could think of a way to reuse the pagination somehow, but it looks really good o/

apps/namadillo/src/atoms/validators/services.ts Outdated Show resolved Hide resolved
@pedrorezende
Copy link
Contributor

This one also closes #916

Copy link
Collaborator

@jurevans jurevans left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions github-actions bot temporarily deployed to pull request July 21, 2024 23:52 Inactive
- Fix proposal count by counting all proposals, not one page of proposals
- Add pagination to the All Proposals table
- Bump indexer to 0.0.17 to get all proposals endpoint
- Refactor TableWithPaginator to not create its own pages

Closes #916.
@emccorson emccorson merged commit 2f5eb29 into main Jul 22, 2024
6 checks passed
@github-actions github-actions bot temporarily deployed to pull request July 22, 2024 00:32 Inactive
@mateuszjasiuk mateuszjasiuk deleted the use-indexer-pagination branch September 13, 2024 09:38
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.

3 participants