Adjust personalized lessons language filter (GT-3097) - #4589
tjohnson009 wants to merge 1 commit into
Conversation
Make the Personalized and All Lessons language filters independent and persist each selection across app restarts, defaulting to the app language until the user makes a selection. Hide the lesson counts in the language dropdown on the Personalized list, and split the filter into its own list item so the Featured Lessons section (GT-3096) can be inserted between the header and the filter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR Review (pre-merge self-review via /pr-review)SummaryMakes the Lessons language filter independent per tab and persisted across app restarts (two new DataStore keys defaulting to app language), hides the "# Lessons available" dropdown counts on Personalized, and splits the filter into its own LazyColumn item to leave an insertion slot for GT-3096's Featured section. ✅ Looks Good
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4589 +/- ##
===========================================
+ Coverage 53.19% 53.30% +0.10%
===========================================
Files 440 440
Lines 11585 11612 +27
Branches 1960 1969 +9
===========================================
+ Hits 6163 6190 +27
+ Misses 4839 4838 -1
- Partials 583 584 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
The Lessons page currently has a single language filter shared by both the Personalized and All Lessons tabs, held only in memory (reset on app restart, and reset whenever the app language changes). This makes the two filters independent and persistent per GT-3097:
dashboardLessonsFilterLocale/dashboardPersonalizedLessonsFilterLocale) and survives app restarts. Until the user makes a selection, each tab defaults to the app languageLessonFiltersmoved out of the header item into its own LazyColumn item, so the Featured Lessons section can be inserted between the header and the filter without restructuringBehavior change to note
Previously, changing the app language reset the filter to the new app language. Now an explicit user selection persists through app-language changes (matching the ticket's persistence requirement and the GT-3102 behavior for tools). A tab with no explicit selection still follows the app language.
Known minor
On a tab switch, the filter briefly shows the app language until DataStore delivers the stored selection — same class of transient accepted in GT-3102 (#4587).
Coordination
The
Settings.kt/SettingsTest.ktadditions sit adjacent to GT-3102's (#4587); whichever PR merges second will have a trivial keep-both conflict.Tests
SettingsTest: save/read/clear round-trips for both new keysLessonsPresenterTest: independent selection per mode (with per-key write verification), follows app language when unset, keeps user selection on app-language change, persistence through state save & restoreLessonsLayoutTest: counts hidden in Personalized dropdown, shown in All LessonsverifyPaparazzipasses — the layout split is pixel-identical, no golden changes🎫 GT-3097
🤖 Generated with Claude Code