Skip to content

fix: modal UX improvements + word reveal fix#174

Merged
Hugo0 merged 1 commit intomainfrom
fix/modal-ux-improvements
Mar 15, 2026
Merged

fix: modal UX improvements + word reveal fix#174
Hugo0 merged 1 commit intomainfrom
fix/modal-ux-improvements

Conversation

@Hugo0
Copy link
Owner

@Hugo0 Hugo0 commented Mar 15, 2026

Summary

Modal UX

  • X button: Moved from inside content div to the modal frame itself with a proper SVG icon — consistent position across all modals (help, settings, stats) regardless of padding
  • Enter/exit animation: Replaced CSS-only modal-animate (no exit) with Vue <Transition> — 200ms ease-out enter, 150ms ease-in leave for both modal and backdrop
  • Centering: True viewport centering with inset-0 + flexbox (was offset with top-10)
  • Countdown jitter: Added min-h-[60px] + tabular-nums to timer so digits don't resize the modal

Word detail page

  • Today's word (/{lang}/word/N) now correctly reveals after beating the game — checks localStorage for game_over flag even when SSR provides the word data
  • Uses SSR-provided definition as fallback so it renders instantly without an extra API call

Test plan

  • Open/close help, settings, stats modals — smooth enter + exit animation
  • X button visible and properly positioned in all three modals
  • Stats modal countdown doesn't jitter or resize
  • Beat today's game, navigate to /en/word/1730 — should show word + definition
  • Clear localStorage, visit /en/word/1730 — should show "Play to reveal"

Modal fixes:
- X button: moved to modal frame with proper SVG icon, consistent
  position across all modals regardless of padding
- Animations: Vue <Transition> with enter (200ms) and leave (150ms)
  for both modal and backdrop (was CSS-only, no exit animation)
- Centering: true viewport centering with inset-0 + flexbox
  (was offset with top-10)
- Countdown: min-height + tabular-nums prevents resize jitter

Word detail page fix:
- Today's word (/lang/word/N) now checks localStorage for game_over
  even when SSR provides the word, so users who beat the game see
  the full word page instead of "Play to reveal"
- Falls back to SSR definition when available
@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

Warning

Rate limit exceeded

@Hugo0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1c682979-b97c-4ade-bb92-480cab8cae4b

📥 Commits

Reviewing files that changed from the base of the PR and between 8902ba2 and 9051c30.

📒 Files selected for processing (1)
  • pages/[lang]/word/[id].vue
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/modal-ux-improvements
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Hugo0 Hugo0 merged commit a566dd0 into main Mar 15, 2026
5 checks passed
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.

1 participant