Paginate states, cultures, religions, rivers & routes editors#3
Merged
Conversation
…ionism for pagination
…ginated sort/footer/CSV are correct
… gutter The pager was appended into the editor footer, and the dialogs size with fit-content (max-content of children). For narrow tables like Rivers the footer+pager became the widest child and stretched the dialog, leaving an empty gutter beside the rows. Make the footer fill the table-driven width without contributing to it (width:0 + min-width:100%) and let the pager wrap to its own line (flex-wrap).
|
Changes look great and would help for large-scale maps a lot! |
✅ Deploy Preview for bazgaars-fmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds page-by-page rendering (200 rows/page) to the five list editors that bog down on large maps — States, Cultures, Religions, Rivers, Routes. The States editor was effectively unusable at 1k+ states because it renders a coat-of-arms per row; it now only renders the COA for the current page.
editors.js:getActiveSort,sortDataByActiveHeader,getEditorPage,renderEditorPagination,bindEditorSortReset(+EDITOR_PAGE_SIZE).applySorting), computes footer totals over the full set, renders only the current page, and drawsPage n of Ncontrols.randomizeStatesExpansionguarded.name/lengthpopulated for the full set so sort/footer/CSV stay correct across pages.fit-contentwidth (width:0; min-width:100%, pager wraps) so narrow dialogs (Rivers) don't get an empty gutter..claude/(unblocks biome pre-commit hook); cache-bust?v=bumps for changed scripts.Spec:
docs/superpowers/specs/2026-06-08-editor-pagination-design.mdPlan:
docs/superpowers/plans/2026-06-08-editor-pagination.mdTest Plan
npx vitest run— 137/137 passnpm run build— clean