TKW: seed map view, fullscreen, King's Landing marker, editMode overlay#40
Merged
Conversation
- `WorldMap` reads `editMode` via `useQueryState` (`nuqs`), `?editMode=true` shows the overlay - polls `Viewer.getValue()` on `requestAnimationFrame` while `editMode` is on — `UncontrolledReactSVGPanZoom` swallows a consumer `onChangeValue` prop instead of forwarding it, so that callback never fires - overlay is a parchment-styled `dl` pinned to the top-left of `.stage`, `aria-hidden` - new `WorldMapSkeleton`, `/maps` wraps `WorldMap` in `Suspense` — required for `useQueryState` under `output: "export"` - extends `WorldMap.test.tsx` with a fake `requestAnimationFrame` and `nuqs` testing adapter
- workflow: commits happen only when explicitly requested, not automatically after each change - workflow: never commit directly to `main`; branches still required per feature/fix, but only created when asked
- `/maps` is a full interactive map now, not a stub — `MainMenu` stops passing `status="coming-soon"` - `MainMenuTile` drops the now-unused `status` prop and pill markup/styles - tests updated to match
- `WorldMap` opens on a fixed Dorne-area view (zoom 5, X -1495, Y -1940) instead of fit-to-viewer - new fullscreen toggle button; recomputes the pan/zoom transform on every resize (not just fullscreen) so the same map point stays centered at the same effective zoom - the underlying `<image>` re-centers itself on resize but the transform didn't follow — `Viewer.setValue()` now sets `viewerWidth`/`viewerHeight` explicitly since `Viewer.getValue()` can race the library's own internal size sync - switched the resize trigger from `ResizeObserver` (doesn't reliably re-fire across a fullscreen transition) to a direct re-measure on `fullscreenchange` - `Reset view` gets a distinct crosshair icon — it was visually identical to the new fullscreen icon - King's Landing gets a transparent clickable marker (`Link` + `circle`, positioned by natural-pixel coordinates read off the source map) linking to `/castles/kings-landing/`; hover/focus shows a gold-leaf ring - new `content/castles/kings-landing.md` (AWOIAF-sourced) so that route resolves - swap map art to `the-known-world-enhanced.jpg` (labeled); add the other art-style variants explored alongside it
- delete `the-known-world-ink.jpg`, `-night.jpg`, `-parchment.jpg`, `-watercolor.jpg` from `public/map/` - no code references; drops ~110MB of unused assets
✅ Deploy Preview for theknownworld 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
/mapswith a fixed initial view, add a fullscreen toggle, and mark King's Landing as a clickable map markereditModedebug overlay (zoom/x/y) behind a query param/mapsis realthe-known-world-enhanced.jpg; remove unused style variantsMap view
WorldMapopens on a fixed Dorne-area view (zoom 5, X -1495, Y -1940) instead of fit-to-viewerViewer.setValue()setsviewerWidth/viewerHeightexplicitly —Viewer.getValue()can race the library's internal size syncResizeObserverto a direct re-measure onfullscreenchange(observer doesn't reliably re-fire across fullscreen transitions)Reset viewgets a distinct crosshair icon to differentiate from the fullscreen iconKing's Landing marker
Link+circle, natural-pixel coordinates) linking to/castles/kings-landing/; gold-leaf ring on hover/focuscontent/castles/kings-landing.md(AWOIAF-sourced) so the route resolvesEdit mode
WorldMapreadseditModeviauseQueryState(nuqs);?editMode=trueshows a parchment-styled zoom/x/y overlayViewer.getValue()onrequestAnimationFrame—UncontrolledReactSVGPanZoomswallows a consumeronChangeValuepropWorldMapSkeleton;/mapswrapsWorldMapinSuspense(required foruseQueryStateunderoutput: "export")Cleanup
MainMenuTiledrops the now-unusedstatusprop and pill markup/stylesink,night,parchment,watercolor) — ~110MB, nothing references themCLAUDE.md: commits only on explicit request; never commit directly tomainTests
WorldMap.test.tsxextended with fakerequestAnimationFrame,nuqstesting adapter, fullscreen/resize coverageMainMenu/MainMenuTiletests updated for pill removal