Skip to content

fix(states-editor): painter pagination, merge sort, visible province demotion#8

Merged
barrulus merged 1 commit into
mainfrom
fix/states-merge-painter-batch
Jun 10, 2026
Merged

fix(states-editor): painter pagination, merge sort, visible province demotion#8
barrulus merged 1 commit into
mainfrom
fix/states-merge-painter-batch

Conversation

@barrulus

Copy link
Copy Markdown
Owner

Addresses tester feedback on the state merge + demote-to-province workflow.

Changes

  1. State painter couldn't select states past page 1 (e.g. Kingdom of Levarois). The editor list is paginated at 200 and the pager is hidden in paint mode, so any state beyond the first page had no clickable row to select as the brush target. Now renders the full state set while in manual-assignment mode (customization === 2).

  2. Merge dialog ignored the editor's sort. It always listed states by state id. Now applies sortDataByActiveHeader, so the merge list mirrors whatever column the editor is sorted by (culture, name, etc.).

  3. "Merge down to provinces" could look like a plain merge. Root cause was visual: the new province was only drawn if the provinces layer happened to be on. States force their own layer on; provinces didn't. Now forces the provinces layer on when demoting, so the demoted territory is always visible as a province. (This also covers "former territory should become a new province" — the province existed but was invisible.)

  4. Demoting a state now keeps its government form. A merged Duchy becomes <name> Duchy instead of <name> Province (falls back to "Province" when the state has no form name).

Bumps the states-editor cache-bust token to 1.122.15.

Verification

  • node --check passes on both touched files.
  • TypeScript diagnostics shown locally are pre-existing deprecation noise in untouched lines.
  • Not yet browser-verified interactively on a >200-state map — recommend a quick manual check before relying on it.

…vince demotion

Addresses tester feedback on the state merge + demote-to-province workflow:

- State painter (manual assignment) only let you select states on the first
  page: the editor list is paginated at 200 and the pager is hidden in paint
  mode, so any state beyond page 1 had no clickable row. Render the full set
  while customization === 2 so every state is selectable.

- Merge dialog listed states by state id regardless of the editor's active
  sort. Apply sortDataByActiveHeader so the list mirrors the column the user
  sorted by (culture, name, etc.).

- "Merge down to provinces" could look like a plain merge: the new province
  was only drawn if the provinces layer happened to be on. Force the provinces
  layer on (matching how states force their own layer) so the demoted
  territory is always visible as a province.

- Demoting a state now keeps its government form: a merged Duchy becomes
  "<name> Duchy" instead of "<name> Province" (falls back to "Province" when
  the state has no form name).

Bump states-editor cache-bust token to 1.122.15.
@barrulus barrulus merged commit 8064805 into main Jun 10, 2026
2 checks passed
@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for bazgaars-fmg ready!

Name Link
🔨 Latest commit aa04d78
🔍 Latest deploy log https://app.netlify.com/projects/bazgaars-fmg/deploys/6a292559fef87f0008d1ad69
😎 Deploy Preview https://deploy-preview-8--bazgaars-fmg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant