-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global styles revisions: add pagination #53621
Comments
Thanks for the help on direction folks. The first task I believe is to ensure that the core data store can handle and manage the incoming revision entities and related pagination queries. I'm going to take a look at this. |
Sounds good to me. We could have a threshold, e.g., when the pages hit |
Yep, it can be tweaked to what fits. E.g. at most 5 items between the ellipses:
|
Looks good, and makes sense to start simple with it. 👍 |
Conversation about state and how to fetch post type revisions going on over in: |
UpdateGetting closer to finalizing the core data API in #54046, which will enable this feature. I might build the UI on top of that PR to demonstrate the designs. Cheers! |
The underlying API works fine 👍🏻 2023-10-11.17.28.35.mp4Slight speed bump: we're adding 2 x extra revision items on the frontend: an "unsaved" state at the start of the revisions array, and a "default theme" state at the end. This means we'll have to take these into account when building pages from the API response, and recalculate the offsets 🤔 |
@pablohoneyhoney @mtias You'd talked about now wanting to use numbers in the pagination for style revisions. Should we move forward with a "Load More" style pagination for this? |
I know it's not all about me 🤣 but the "Load more" approach would effectively side-step the pagination recalculation mania I came up against in testing. |
One argument for pagination is if users want to go to the start of history, and they have many revisions, they can immediately. Users may need to click multiple times to get to older content with a "Load more" button. We "could" offer both, i.e., a component that lets the user choose between "Load more" and "Pagination" and "X" view/filter. Maybe I'm saying this because I've just been playing with dataviews. 😄 Or, if we go with pagination initially, a dropdown menu to choose the number of items to display per page. |
Have a WIP idea going on in: 2023-12-07.19.02.33.mp4 |
Latest from #56799 2023-12-14.19.22.51.mp4 |
Another version @apeatling with the Apply button inline now: 2023-12-15.11.30.33.mp4 |
What problem does this address?
Pagination capability was added to the Global styles revisions endpoint in #52095
At the moment the maximum amount of Global styles revisions we display in the site editor UI is
100
.It's conceivable that sites will have more than this, and therefore would find pagination helpful.
What is your proposed solution?
n
amount of global styles revisions in the UI.The text was updated successfully, but these errors were encountered: