Skip to content

feat(dashboard): make vocabulary tiles tappable to filtered Vocabulary list#184

Open
davidortinau wants to merge 1 commit into
mainfrom
feature/dashboard-vocab-tile-nav
Open

feat(dashboard): make vocabulary tiles tappable to filtered Vocabulary list#184
davidortinau wants to merge 1 commit into
mainfrom
feature/dashboard-vocab-tile-nav

Conversation

@davidortinau
Copy link
Copy Markdown
Owner

Summary

Tap any of the 5 vocabulary tiles on the Dashboard (New / Learning / Familiar / Review / Known) to navigate to the Vocabulary page pre-filtered by that bucket.

Changes

  • Index.razor — Each tile wrapped in <a href="/vocabulary?q=status:{bucket}"> with .vocab-tile-hover affordance (translateY + shadow on hover).
  • Vocabulary.razor — Added status:new and status:review cases to the URL filter switch. Predicates mirror the bucketing logic in VocabularyProgressRepository.GetVocabSummaryCountsAsync exactly. Both desktop and mobile dropdown shortcuts now include the full set: New / Learning / Familiar / Review / Known / Unknown.
  • app.css.vocab-tile-hover hover/active styles.

Filter Mapping

Tile URL Predicate
New ?q=status:new Progress == null OR (TotalAttempts == 0 && !Pending-Familiar)
Learning ?q=status:learning (existing — unchanged)
Familiar ?q=status:familiar (existing — unchanged)
Review ?q=status:review Progress != null && !Pending-Familiar && !IsKnown && NextReviewDate <= now
Known ?q=status:known (existing — unchanged)

Validation

E2E DB cross-check (Jayne) — all 5 bucket counts match between Dashboard tiles and filtered Vocabulary page for the test user:

Bucket Dashboard Filtered Match
New 1891 1891
Learning 49 49
Familiar 282 282
Review 279 279
Known 88 88

Code review pass: bucket logic correctness, accessibility, HTML/CSS validity, no regression in existing filters.

Build: dotnet build src/SentenceStudio.UI/SentenceStudio.UI.csproj — succeeded (existing warning baseline).

…y list

The 5 vocab buckets on the Dashboard (New/Learning/Familiar/Review/Known) now
navigate to /vocabulary?q=status:{bucket} when tapped. Counts on the tiles
match the filtered Vocabulary page exactly.

Changes:
- Index.razor: wrap each tile in <a href="/vocabulary?q=status:{bucket}">
  with .vocab-tile-hover affordance
- Vocabulary.razor: add "new" and "review" cases to the status filter switch
  (mirror the bucketing logic in VocabularyProgressRepository
  GetVocabSummaryCountsAsync exactly); add both to the desktop & mobile
  dropdown shortcuts
- app.css: .vocab-tile-hover hover/active styles

E2E validation: Jayne ran a DB-level cross-check; all 5 bucket counts match
between Dashboard and filtered Vocabulary list (New=1891, Learning=49,
Familiar=282, Review=279, Known=88 for the test user).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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