Paginate burgs, states, cultures, religions, rivers & routes editors - #1469
Paginate burgs, states, cultures, religions, rivers & routes editors#1469barrulus wants to merge 1 commit into
Conversation
|
Much needed changes for maps with complex and large numbers of states.Greatly aids performance and quality! |
f5926b4 to
f8045f0
Compare
|
Good idea, but I don't like the code, has to be "un-vibed". |
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Use the idea, don't use the code |
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Should it be open for a while? We can integrate it when the migration is done. |
|
Happy to keep it open but also happy to redo it once the uk updates are complete. The code is here whether it is open or not! |
|
do you want me to resolve these conflicts now or later? |
5513666 to
efe827a
Compare
Large editors render every row into the DOM at once, which is slow on big maps. Each editor now renders at most one page (100 rows) via a headless table core (src/components/dialog/table.ts): sorting and footer totals cover the full dataset, the page resets on open/filter/sort, and the footer pager fills the table width without widening fit-content dialogs. Full-dataset sorting helpers extend src/components/dialog/sorting.ts. No window globals; helpers are imported.
efe827a to
f9d4b49
Compare
|
Rebuilt on current master now that the editor migration is complete. The shared helpers moved out of the deleted |
|
Do we close it, @barrulus? |
…1469/Azgaar#1564) Ports the paginated-table column show/hide stack onto the fork's customized editors: burgs keeps megalopolis badges, the skyburg button, GL label rebuild hooks and the altitude CSV column; states keeps the brush/demote/merge panel. The fork's older per-editor pagination scaffolding is replaced by the shared table.ts helpers. Dialog widths use the fork's fitContent() helper for Firefox.
Renders large editor lists 200 rows at a time so they stay responsive on big maps. The States editor in particular was effectively unusable at 1k+ states because it renders a coat-of-arms per row; it now renders the COA only for the current page.
What changed
editors.js:getActiveSort,sortDataByActiveHeader,getEditorPage,renderEditorPagination,bindEditorSortReset.applySorting), computes footer totals/averages over the full set, then renders only the current page and drawsPage n of Ncontrols in the footer.randomizeStatesExpansionare guarded against rows that aren't on the current page.fit-contentwidth, so narrow dialogs (e.g. Rivers) don't get an empty gutter.Notes
masterbefore this change.Test plan