fix: remove mobile peek offset that clips grim reaper on small screens#75
Conversation
Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/50e8f163-336f-47c7-abdb-169cbe9e1dc2 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughFool, check it! This here pull request be modifyin' the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
👁️ PR Preview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 233 233
Branches 107 107
=========================================
Hits 233 233
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Merge origin/main (mobile fixes from #74, #75) into branch, then rebuild styles.css from source so it contains both the mobile layout fixes and the token-pop animation styles. Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/aedeb8a9-2599-40ef-a1a4-aa6d47261123 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
…#76) * feat: add growing rate + floating token pop animation - Add getDynamicRate() to death-clock-core.js with 30% annual growth after BASE_DATE - Add RATE_GROWTH_PER_YEAR constant (0.30) - Update getCurrentTokens() to integrate the exponential rate for accuracy - Use getDynamicRate() in 02-counter.js for rate display and session tokens - Update rate subtitle to show "and growing" beyond BASE_DATE - Add spawnTokenPop(): spawns a "+N" floating element on the total counter every second - Add .token-pop CSS with @Keyframes tokenPopFloat (float up 56px, fade out over 1.5s) - Change .counter-box overflow to visible so pops can float above the box - Add 9 unit tests for getDynamicRate and RATE_GROWTH_PER_YEAR - All 262 unit tests pass at 100% coverage; all 68 E2E tests pass Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/1579b618-82e8-4125-b282-8ddddafa27eb Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> * refactor: address code review feedback - Extract POP_LEFT_BASE/POP_LEFT_SPREAD named constants - Rename k → continuousGrowthRate for clarity - Add source citation comment for RATE_GROWTH_PER_YEAR - Add explanatory comment on counter-box overflow: visible change Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/1579b618-82e8-4125-b282-8ddddafa27eb Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> * chore: merge main and regenerate styles.css Merge origin/main (mobile fixes from #74, #75) into branch, then rebuild styles.css from source so it contains both the mobile layout fixes and the token-pop animation styles. Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/aedeb8a9-2599-40ef-a1a4-aa6d47261123 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> * fix: address code review findings in counter.js, CSS, and changelog-data.js - changelog-data.js: reset to base and regenerate via npm run build:changelog so the file is properly derived from CHANGELOG.md, not edited directly - spawnTokenPop: add animationcancel listener + fallback timeout (1500+200ms) with a shared 'removed' flag so cleanup never double-fires - styles/counter-milestones.css: use double-quotes for "Orbitron" font-family and rename @Keyframes tokenPopFloat → token-pop-float (kebab-case) - updateCounters: hoist [...RATE_SCHEDULE].reverse() to module-level REVERSED_RATE_SCHEDULE constant, out of the per-frame hot path Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/fedaea6d-9cc7-4df9-a304-fbde3025a7ec Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
On mobile viewports,
transform: translateX(-8px)combined withoverflow-x: hiddenon<html>caused the left edge of the grim reaper to be clipped. The right side could also be affected depending on browser clipping behaviour.Change
Removed the negative translate offset in the
max-width: 480pxmedia query so the reaper sits flush atleft: 0with no cutoff on either side. The hover override (translateX(0)) is also removed as it's now redundant.The desktop peek effect (
translateX(-22px)→translateX(0)on hover) is unchanged.Summary by CodeRabbit
Style