Skip to content

Show selected grid cell on the map and polish map UI.#37

Merged
aivanchenk merged 1 commit into
mainfrom
EPR-5--pixel-cell-box
Jun 21, 2026
Merged

Show selected grid cell on the map and polish map UI.#37
aivanchenk merged 1 commit into
mainfrom
EPR-5--pixel-cell-box

Conversation

@aivanchenk

Copy link
Copy Markdown
Collaborator

Summary

  • Draw the snapped 0.05° cell as a filled polygon with dashed guide lines to the viewport edges
  • Fly to the selected cell on click (min zoom 9)
  • Map readout: 2-column grid, kicker inline with title, selection divider
  • Nav and control panel share elevated surface tokens; lighter shadows in light mode
  • Theme-aware selection colors; brand mark via accent mask
  • OpenFreeMap basemaps; brighten place labels on dark map

Review plan

  • Click a pixel in light and dark mode, see cell box, guides, and readout update
  • History slider still loads the time series
  • Nav and control panel readable on the map background

Draw the snapped cell footprint with dashed guide lines, fly to the cell on click, and align the readout, nav, and control panel styling.

Co-authored-by: Cursor <cursoragent@cursor.com>
@aivanchenk aivanchenk requested a review from lazarusA June 21, 2026 09:31

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the map base styles to OpenFreeMap, introduces custom dark map style patching to improve label legibility, adds animated view state transitions when focusing on selected grid cells, and refactors the brand mark to use CSS masks. Feedback focuses on improving the robustness of the dark map style loading and fallback mechanism: specifically, allowing the darkMapStyle state to accept a string fallback URL, handling fetch failures by setting the fallback URL and clearing the cached promise to allow retries, and avoiding redundant label brightening loops when the style is already pre-patched.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/components/map/EarthMap.tsx
Comment thread src/components/map/EarthMap.tsx
Comment thread src/components/map/EarthMap.tsx
Comment thread src/lib/map/mapLabels.ts
@github-actions

Copy link
Copy Markdown

🚀 Vercel preview deployed

Preview URL: https://earth-prints-gldsj4rau-anastasiia-s-projects10.vercel.app

@lazarusA

lazarusA commented Jun 21, 2026

Copy link
Copy Markdown
Member

Looks good. And we should keep the pixel selected, however in #25 I meant to write that we should also show all the pixels that were cached, the 40x40 box maybe in a different shadow color (orange? yellow-ish, grey?, is open ). Sorry, I din't write that there, but it should be easy to add now.

Edit: The 40x40 numbers should eventually be retrieved from the array properties, not hard-coded.

@lazarusA lazarusA left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at the performance and how smooth the clicking is I think we don't need to draw the corresponding chunk size grid fetched. So, we can leave that for later, and a different issue should be opened, plus, it should be optional, namely, the user should be able to show/hide the extent.

@aivanchenk aivanchenk merged commit c614759 into main Jun 21, 2026
2 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.

2 participants