Chennai hub: show communities & stories inline (Bengaluru-style) - #15
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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)
/assets/css/pages/city-hub.css— thehub-grid/hub-section/hub-preview-*styles extracted from Bengaluru's inline<style>, so every hub can share them on rollout.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/.city-hub.jsto populate#hubCommunities/#hubStories/#hubCommCount(top 4 / top 3) with clean empty states + a/join/CTA. Everything element-guarded; the existingdata-feature="stories"card-flip is kept (guarded) so the 11 not-yet-migrated hubs keep working.Deliberately
0.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)
0) · map preview renders.1, feature-card layout intact, Stories card Coming Soon. Script guards prevent breakage.Follow-up: roll this layout out to the other 11 hubs (and remove the now-dead card-flip path).
🤖 Generated with Claude Code