refactor(geo-map): externalize theme control and remove style indirection#145
refactor(geo-map): externalize theme control and remove style indirection#145
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 751a869551
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| viewport, | ||
| showZoomControl = true, | ||
| theme = "auto", | ||
| theme = "light", |
There was a problem hiding this comment.
Keep dark-mode tiles when theme prop is omitted
Changing the default to theme = "light" causes every existing GeoMap usage that omits theme to render light tiles in dark mode. I checked app/docs/gallery/page.tsx (<GeoMap id="gallery-geo-map" {...geoMapPresets.fleet.data} />) and lib/docs/preview-config.tsx (<DynamicGeoMap id={...} {...geoMapData} />), and both paths now lose dark-mode tile behavior that previously came from auto theme resolution. Please either preserve automatic fallback when theme is undefined or update these consumers to pass the app-resolved theme explicitly.
Useful? React with 👍 / 👎.
Summary
light | darktheme inputlightand document that apps should pass their already-resolved themegeo-map-styles.tsindirection by inlining popup/tooltip class hooksWhy
Tool UI components are copy-paste surfaces, so this keeps GeoMap lighter and easier to reason about:
Validation
pnpm test lib/tests/tool-ui/geo-map(35 passing)pnpm lint,pnpm lint:format,pnpm registry:check)pnpm typecheckcurrently reports unrelated missing module types underpackages/agenton this checkout (@clack/prompts,tsup)Context
Follow-up after merged PR #144 to land the lightweight/theming polish commits that were not included in
main.