Skip to content

fix: strip zoom auto-visibility display from migrated label group styles - #66

Merged
barrulus merged 1 commit into
mainfrom
fix/label-style-display-harvest-fork
Sep 5, 2026
Merged

fix: strip zoom auto-visibility display from migrated label group styles#66
barrulus merged 1 commit into
mainfrom
fix/label-style-display-harvest-fork

Conversation

@barrulus

@barrulus barrulus commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Fork port of Azgaar#1802 (upstream issue Azgaar#1773). Cherry-pick of d98dcb8; the only fork-side difference is the package version 1.151.2-fork.1.

Problem

Pre-1.140 zoom auto-visibility hid burg label tiers with an inline display: none, and a map saved while zoomed out carries it in the group's style attribute. The 1.140 migration harvested it verbatim into the persisted label group style, the 1.150 store migration kept it, and since the store is applied over the saved svg on load, those tiers never render again at any zoom.

Fix

  • stripDisplay() in styles-legacy.ts, applied in labelStyleFromLegacy, the single funnel for both the 1.140 svg harvest and the 1.150 store migration.
  • A pass in auto-update.ts gated on isOlderThan("1.151.2") that strips display from every stored label group style, for maps saved by 1.150-1.151.1.
  • VERSION bumped to 1.151.2 with a changelog entry, since the gate has to sit above the current version.

Verification

  • 4 new unit tests; 962 tests pass on the fork, tsc --noEmit and Biome clean.
  • Headless load of the reporter's 1.139.4 original and its 1.150.0 re-save on this branch: all 18 label groups render, no display in the DOM or the store, no page errors. The unfixed baseline hides hamlet, village, trading post, monastery and fort on both files.

Pre-1.140 zoom auto-visibility hid burg label tiers with an inline
display: none, and a map saved while zoomed out carried it in the group's
style attribute. The 1.140 migration harvested it verbatim into the
persisted label group style, the 1.150 store migration kept it, and since
the store is applied over the saved svg on load, those tiers never rendered
again at any zoom.

Strip display in labelStyleFromLegacy, the funnel for both harvests, and
add a 1.151.2 pass over the stored label group styles for maps saved by
1.150-1.151.1, which already carry the value in their styles record.

Closes Azgaar#1773
@netlify

netlify Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deploy Preview for bazgaars-fmg ready!

Name Link
🔨 Latest commit d642af8
🔍 Latest deploy log https://app.netlify.com/projects/bazgaars-fmg/deploys/6a9bc57956fd050008de8f98
😎 Deploy Preview https://deploy-preview-66--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.

@barrulus
barrulus merged commit da86d21 into main Sep 5, 2026
10 checks passed
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