Skip to content

Add quiz mode and delete functionality with improved UI#1

Open
YuHsunWang wants to merge 7 commits into
mainfrom
claude/improve-software-1zhIp
Open

Add quiz mode and delete functionality with improved UI#1
YuHsunWang wants to merge 7 commits into
mainfrom
claude/improve-software-1zhIp

Conversation

@YuHsunWang

Copy link
Copy Markdown
Owner

Summary

Enhanced the vocabulary learning app with a quiz mode for active recall practice and added the ability to delete vocabulary items. Also improved the UI with better statistics display and category filtering enhancements.

Key Changes

Quiz Mode Feature

  • Added toggle button to enable/disable quiz mode that hides translations and example sentences
  • Implemented reveal mechanism where users must click to show translations (promoting active recall)
  • Quiz state resets when toggling the mode to ensure clean state transitions
  • Visual indicator shows when quiz mode is active with amber styling

Delete Functionality

  • Added delete button (visible on hover) for each vocabulary card
  • Implemented two-step confirmation: first click highlights the button, second click confirms deletion
  • Auto-resets confirmation state after 3 seconds if user doesn't confirm
  • Flash message confirms successful deletion with the word name

UI/UX Improvements

  • Added progress bar to mastery rate display in header
  • Restructured statistics cards into a single unified card with dividers showing mastered/learning/total counts
  • Added overall progress bar showing mastery percentage across all vocabulary
  • Enhanced category filter buttons to display count of items in each category
  • Improved card layout with better spacing and visual hierarchy
  • Added category tag display on vocabulary cards with icon

API Resilience

  • Implemented fallback model selection for AI generation (tries gemini-2.0-flash, gemini-1.5-flash, gemini-1.5-flash-latest)
  • Better error handling with specific error messages from API responses
  • Stops retrying on quota errors (429) since same account will fail for all models
  • Improved error messaging to users with actual error details

Code Quality

  • Removed redundant comments throughout the codebase
  • Added new state management for quiz mode, revealed cards, and deletion confirmation
  • Added typeCounts memoization for efficient category counting
  • Imported additional icons: Trash2, GraduationCap, Tag, ChevronDown

Project Setup

  • Added .gitignore file for standard Node.js/build artifacts

https://claude.ai/code/session_01TqzSH8qwo87whjn1ENGp2i

claude added 4 commits May 15, 2026 20:18
- 新增測驗模式(Quiz Mode):隱藏翻譯與例句,點擊才揭露,強化主動回憶
- 新增刪除單字按鈕:滑入卡片才顯示,需點兩次確認,防誤刪
- 顯示 category 標籤:單字的業務/金融/旅遊等分類現在顯示在卡片上
- 新增掌握率進度條:標題區與統計區各一條漸層進度條
- 篩選標籤顯示數量:各類別(Reading/Listening/Both)旁邊附上單字數
- 統計區重構為三欄(已掌握/學習中/總計),加上整體進度條
- 更新 Gemini 模型 ID 至最新版本
@vercel

vercel Bot commented May 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
toeic-master Ready Ready Preview, Comment May 15, 2026 9:52pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 901d384fdb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/App.jsx
Comment on lines +549 to +551
deletingId === item.id
? 'bg-red-500 text-white animate-pulse'
: 'bg-white/5 text-slate-700 hover:text-red-400 hover:bg-red-400/10 opacity-0 group-hover:opacity-100'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make delete action visible without hover

The new delete control is rendered with opacity-0 and only becomes visible via group-hover, so on touch-only/mobile environments (where hover is absent or unreliable) users may never see a delete affordance and effectively cannot discover the new deletion flow. Since deletion is only exposed through this button, the feature can be unusable on common PWA usage contexts unless the button has a non-hover visible state.

Useful? React with 👍 / 👎.

- 間隔重複:每張卡片記錄 srLevel(0~5)與 nextReview 時間
  - 答對 → 等級升一,複習間隔加倍(1→3→7→14→30天)
  - 答錯 → 重置到等級1,明天再複習
  - 到達等級5自動標記為已掌握
- 今日複習模式:全螢幕翻牌流程,含進度條、記得/不記得按鈕
- 統計區「待複習」欄位顯示今日到期單字數
- 同義字:可點擊播放發音
- 字根:琥珀色區塊顯示字根來源
- DB 升至 version 2,新增 nextReview、srLevel 索引

https://claude.ai/code/session_01TqzSH8qwo87whjn1ENGp2i
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