Skip to content

Add single Singapore LGS map with Google Maps JS API - #419

Draft
xenodus wants to merge 3 commits into
masterfrom
cursor/singapore-lgs-map-c81b
Draft

xenodus wants to merge 3 commits into
masterfrom
cursor/singapore-lgs-map-c81b

Conversation

@xenodus

@xenodus xenodus commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces 17 per-store Google Maps embed iframes with a single interactive Singapore overview map using the Maps JavaScript API (@vis.gl/react-google-maps).

  • One map at the top of the "Where are the shops?" modal with markers for all entries in LGS_MAP
  • Compact Jump to store pill row instead of a vertical bullet list
  • Store details in a responsive card grid (1 col mobile, 2 col tablet, 3 col desktop)
  • Clicking a store pill or map marker pans/highlights and scrolls to the matching card
  • Added explicit lat/lng to each LGS_MAP entry (parsed from existing embed URLs)
  • Rebased onto latest master (Telegram FAQ/privacy modal updates preserved)

Setup required

This feature needs a browser API key at build time:

  1. Create/enable Maps JavaScript API in Google Cloud Console
  2. Create an API key restricted to HTTP referrers:
    • https://gishathfetch.com/*
    • https://www.gishathfetch.com/*
    • http://localhost:5173/*
  3. Set VITE_GOOGLE_MAPS_API_KEY:
    • Local dev: frontend/.env.local
    • Production: GitHub Actions secret VITE_GOOGLE_MAPS_API_KEY (wired in deploy workflow)

Without the key, the modal shows a fallback message instead of the map.

Screenshots

Desktop — compact pills + card grid:

Singapore LGS map modal compact desktop layout

Desktop — selected store pill and card:

Selected LGS store pill and card desktop

Mobile — wrapped pills and single-column cards:

Singapore LGS map modal compact mobile layout

Testing

  • cd frontend && npm run build
  • node --test frontend/src/utils/lgsMapBounds.test.js
  • make test
  • Rebased onto origin/master; resolved import conflict in Modals.jsx (kept Telegram constants + new map component)
Open in Web Open in Cursor 

cursoragent and others added 3 commits August 29, 2026 06:35
Replace per-store embed iframes with one interactive map showing all
LGS markers. Store name, address, and website remain as static sections
below the map. Marker and list clicks sync selection and pan the map.

Co-authored-by: Alvin Yeoh <xenodus@users.noreply.github.com>
Replace the vertical bullet TOC and stacked store sections with
wrap-around jump pills and a responsive card grid. Show website
hostnames only and move Back to top to a single control.

Co-authored-by: Alvin Yeoh <xenodus@users.noreply.github.com>
Add env example, AGENTS.md note, architecture secrets table entry, and
pass the key through GitHub Actions deploy so production builds include
the LGS map.

Co-authored-by: Alvin Yeoh <xenodus@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/singapore-lgs-map-c81b branch from 7c80e4a to 362e2d8 Compare August 29, 2026 06:36
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