Skip to content

Chennai hub: show communities & stories inline (Bengaluru-style) - #15

Merged
Ashwask merged 1 commit into
mainfrom
chennai-hub-previews
Jul 31, 2026
Merged

Chennai hub: show communities & stories inline (Bengaluru-style)#15
Ashwask merged 1 commit into
mainfrom
chennai-hub-previews

Conversation

@Ashwask

@Ashwask Ashwask commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Problem

After PR #14 the Chennai hub's stats and Stories-card state were data-driven, but the actual story never appeared on the hub — you only got a "Read Stories" button. Bengaluru's hub surfaces the real data inline (Communities preview + Stories preview lists). The user asked to make Chennai "similar to Bengaluru" so the Thiruvanmiyur story shows.

Change (Chennai only for now; other 11 hubs roll out next)

  • New shared /assets/css/pages/city-hub.css — the hub-grid / hub-section / hub-preview-* styles extracted from Bengaluru's inline <style>, so every hub can share them on rollout.
  • Chennai hub — replace the Map/Communities/Stories nav-card grid (and the big "Coming Soon" callout) with a Bengaluru-style hub-grid: Communities preview, Stories preview, and a ward-map preview. Communities "See all" → global /communities/ (no per-city directory yet); Stories "Read all" → /cities/chennai/stories/.
  • Extend city-hub.js to populate #hubCommunities / #hubStories / #hubCommCount (top 4 / top 3) with clean empty states + a /join/ CTA. Everything element-guarded; the existing data-feature="stories" card-flip is kept (guarded) so the 11 not-yet-migrated hubs keep working.

Deliberately

  • No climate grid for Chennai (none built); Climate Sectors stat stays 0.
  • No new i18n keys — reuses cityHub.features.{communities,stories,map}.title; "See all/Read all" + empty-state strings stay hardcoded English exactly as Bengaluru does them.

Verified (headless Chrome vs live Supabase)

  • Chennai: Stories preview lists "Project Thiruvanmiyur Mada Street — Community Design Initiative" (the data now shows) · Communities empty state (count 0) · map preview renders.
  • Pune (not migrated): unchanged — Communities stat 1, feature-card layout intact, Stories card Coming Soon. Script guards prevent breakage.
  • No visual-regression specs cover hubs → no baselines change.

Follow-up: roll this layout out to the other 11 hubs (and remove the now-dead card-flip path).

🤖 Generated with Claude Code

PR #14 made the hub stats/card-state data-driven but the Chennai story
still didn't appear on the hub — only a "Read Stories" button. Bengaluru
surfaces the actual data inline via preview lists; make Chennai match.

- New shared /assets/css/pages/city-hub.css: the hub-grid / hub-section /
  hub-preview-* styles extracted from Bengaluru's inline <style> so all
  hubs can share them on rollout.
- Chennai hub: replace the Map/Communities/Stories nav-card grid (and the
  "Coming Soon" callout) with a Bengaluru-style hub-grid — Communities
  preview, Stories preview, and a ward-map preview. Communities "See all"
  points at the global /communities/ (no per-city directory yet); Stories
  "Read all" -> /cities/chennai/stories/.
- Extend city-hub.js to populate #hubCommunities / #hubStories /
  #hubCommCount (top 4 / top 3), with empty states + a /join/ CTA. All
  element-guarded; the existing data-feature="stories" card-flip is kept
  (guarded) so the 11 not-yet-migrated hubs still work.

No climate grid for Chennai (none built; Climate Sectors stat stays 0).
No new i18n keys — reuses cityHub.features.{communities,stories,map}.title;
See-all / empty-state strings stay hardcoded English exactly as Bengaluru.

Verified in headless Chrome vs live Supabase: Chennai Stories preview now
lists "Project Thiruvanmiyur Mada Street — Community Design Initiative",
Communities shows an empty state (0), map preview renders. Pune (not
migrated) unchanged: stat=1, feature-card layout intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notf Ready Ready Preview Jul 31, 2026 11:50am

@Ashwask
Ashwask merged commit 5ca6713 into main Jul 31, 2026
3 checks passed
@Ashwask
Ashwask deleted the chennai-hub-previews branch July 31, 2026 11:55
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