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

feat(orders-table): trim pagination up to 14 pages #3895

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Feb 21, 2024

Summary

Fixes #3683

I mainly copied the solution from https://taiga-ui.dev/navigation/pagination.
I'm limited pagination up to 14 pages because it matches max width of the orders table.
There is also one PR on top of this with small refactoring: #3896

image
pagin-demo.mov

To Test

Safe with a huge TWAP order: https://app.safe.global/apps/open?safe=sep:0xF568A3a2dfFd73C000E8E475B2D335A4A3818EBa&appUrl=https://swap-dev-git-fix-3683-cowswap.vercel.app/

  1. When an order contains <= 14 pages there should not be additional controls
  2. For orders with > 14 pages we add trimming and arrows

@shoom3301 shoom3301 requested review from elena-zh and a team February 21, 2024 12:46
@shoom3301 shoom3301 self-assigned this Feb 21, 2024
Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos 🔄 Building (Inspect) Visit Preview Feb 22, 2024 11:47am
explorer-dev 🔄 Building (Inspect) Visit Preview Feb 22, 2024 11:47am
swap-dev 🔄 Building (Inspect) Visit Preview Feb 22, 2024 11:47am
widget-configurator 🔄 Building (Inspect) Visit Preview Feb 22, 2024 11:47am

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Great jib, thank you!

@anxolin
Copy link
Contributor

anxolin commented Feb 28, 2024

I've got this error testing this PR

I created an order of 10,000 parts:

Screen.Recording.2024-02-28.at.14.28.41.mov

I also created the issue:
#3945

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TWAP page is too wide when place an order with >30 parts
4 participants