fix(map): support fullscreen on iOS Safari - #70
Conversation
Key declarative layers on styleEpoch so theme style swaps recreate sources through one shared lifecycle hook, not style.load/pendingStyle.
Close the ready gate during style swaps, omit invalid route dasharrays, and keep shell listeners keyed to the same lifecycle revision.
Keep styleEpoch readiness and useMapLayers; bring in data-theme detection, public prop type exports, and homepage/style cleanups.
Drop redundant lifecycle helpers and leaner layer create/sync paths without touching the proven style readiness owner.
Make the styleEpoch docs snippet valid TypeScript so it is safer to copy.
Mount map children only when style-ready, sync handler refs after commit, and fall back to system theme when the document theme clears.
Bind GeoJSON/Arc handlers from effect closures like MapRoute so we do not need a render-time ref write or a syncing useEffect.
Bring in control transition and animation timing tweaks from main.
Always wrap hoverPaint overrides in a case expression so keys absent from the base paint do not apply to every feature.
|
@km-git007 is attempting to deploy a commit to the mapcn oss program Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fix(map): support fullscreen on iOS Safari
Goal
Adds a reliable fullscreen toggle for map controls, including browsers without the standard Fullscreen API.
Fixes #51.
What changed
body.style.overflowwhen maps are destroyed, and keeps the body locked until the final pseudo-fullscreen owner exits when multiple maps are active.Scope
No public props, dependencies, custom fullscreen CSS, or unrelated refactors were added.
Stack
Depends on #69. This branch starts from PR #69's head; once #69 merges, the effective diff is only this fullscreen commit.
Validation
aria-pressed, rejection fallback, pending transition locking, remount/style replacement, map destruction cleanup, multi-map ownership, and removal before scheduled resize. The follow-up harness also verified topmost multi-map Escape, Escape after the first map's controls unmounted, and duplicate-control label/aria-pressedsynchronization./docs/controls: preview mounted; dark/light toggles retained the map and fullscreen control.src/registry/map.tsxand both modified docs pages),tsc --noEmit --incremental false, production build, deterministic registry rebuild comparison, and diff checks passed.Physical iPhone Safari validation: pending.
This should remain a draft while the dependency and physical-device validation are pending.