-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Implement pagination for the new home page. #41905
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
|
Looking like a good start!
|
695c1ea to
964bb73
Compare
I made a simple grep in the repo and couldn't find something related to ui_api . Can you please point me to the code so that I can use the same? |
|
I have added pagination, page number buttons along with making pagination a separate component since I feel it will be useful in other table oriented pages in future like dagruns, task instances etc. Demo : vlc-record-2024-08-31-11h14m35s-simplescreenrecorder-2024-08-31_11.08.40.mp4-.mp4 |
We haven't integrated it yet. That can happen later, I'm just saying that's how we should eventually do it. I think this PR is a good start! Let's change our hard-coded limit from 10 to 25 or 50 and I think you could mark this as ready for review. We're going to refactor a lot over time anyway. |
964bb73 to
004b48a
Compare
|
Thanks @bbovenzi , I changed it to 50 and it looks like default value is 100. I noticed the UI PRs from @pierrejeambrun setting up UI API in #41798. I will follow the development along and make changes once the changes are in. |
004b48a to
4044460
Compare
4044460 to
6708afe
Compare
|
Fixed PR comments and rebased with latest changes 6708afe |
Thanks @bbovenzi for the new UI page and contribution docs. Looks really nice with built in dark mode from ground up. New build system using Vite and HMR is really nice. I don't need to reload for changes and enables a faster feedback loop with state intact. I tried implementing basic pagination for the new UI page. I opened this PR for initial feedback and some questions on trying out the implementation in new UI. I guess it serves as a good point to discuss and improve upon.
Questions
Pagination Ref :
https://tanstack.com/table/latest/docs/guide/pagination#manual-server-side-pagination
https://medium.com/@aylo.srd/server-side-pagination-and-sorting-with-tanstack-table-and-react-bd493170125e
Screenshot : (first page, previous page, next page, last page)