Feature/ghost city#114
Conversation
|
@Animesh-86 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
eec0045 to
b986954
Compare
There was a problem hiding this comment.
Pull request overview
Implements "Ghost City" mode (issue #97), rendering zero-contribution days as thin 4px blueprint-style foundations using stroked, low-opacity faces so the isometric grid retains a consistent 3D appearance. The bulk of the diff also refactors the tower rendering: face/stroke opacity and height computation are now extracted into helper functions and a richer TowerData shape, and many template strings are compressed onto single lines.
Changes:
- New
GHOST_HEIGHT_PX/scale constants and helperscomputeTowerHeight,computeFaceOpacity, withTowerDataextended to carry per-face opacities,isGhost, and stroke styling. - Both
generateSVGandgenerateAutoThemeSVGnow render each tower face with per-face fill-opacity plus a stroke driven byt.strokeOpacity/t.strokeWidth; the auto-theme path usesstroke="currentColor"and addscolor: var(--cp-*)to the utility classes so strokes inherit the themed color. - README updated to describe the "Ghost City Architecture" behavior; previously inline opacity values (
opacity*0.5,opacity*0.3,opacity) for contributing days are preserved as{left:0.35, right:0.21, top:0.7}.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Adds a paragraph describing the new Ghost City foundations and tweaks surrounding copy. |
| lib/svg/generator.ts | Adds ghost-mode rendering, refactors tower math into helpers, extends TowerData, and reformats the static- and auto-theme renderers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b986954 to
3235310
Compare
|
@Animesh-86 right now if i will merge this PR it will ruin the premium look. |
Thanks for the feedback on the 'Premium' aesthetic! I completely agree, mixing those wireframe foundations with the solid glowing towers creates a bit too much visual noise and breaks the clean silhouette of the 3D skyline. To fix this and preserve the premium look, I’m pivoting the implementation to be a Conditional Placeholder State:
This way, active users get the sleek look they love, while new or inactive users see a 'Blueprint for Success' rather than a broken or empty badge. What do you think of this 'Placeholder' approach for the Ghost City mode? |
Works |
Description
Fixes #97
Pillar
Visual Preview
Before
After
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.