Feature: Bring-style emoji & category icons for items
Every shopping item now gets a visual like in Bring: a product emoji on a softly tinted category tile. - ItemVisuals.kt: pure client-side classifier. German dictionary (~180 entries) maps item names to emoji + one of 13 categories (produce, drinks, bakery, dairy, meat&fish, frozen, pantry, sweets, household, drugstore, baby, pet, other), each with an accent color. Longest-keyword-first matching so compounds resolve to their most specific entry (Wassermelone is produce, not a drink); juice compounds (Apfelsaft, Orangensaft, ...) are listed explicitly because their fruit prefix is longer than 'saft'. Unknown items fall back to the generic cart on neutral grey. Works fully offline, nothing leaves the device. - ListDetailScreen: emoji tile in every item row, emoji in the autocomplete suggestions dropdown, and a live emoji preview as the text field's leading icon while typing. - ItemVisualsTest: longest-match priority, case/whitespace insensitivity, fallbacks, category coverage. Verified: assembleDebug + unit tests green (JDK 21).
This commit is contained in:
parent
15b3f1071f
commit
37cbb816e5
5 changed files with 375 additions and 7 deletions
|
|
@ -180,7 +180,7 @@ mitbringsl/
|
|||
├── di/ # Hilt Modules
|
||||
├── ui/auth/ # AuthScreen (ConnectView: Server-URL + /api/config-Discovery, dann LoginView)
|
||||
├── ui/lists/ # ListsScreen/ViewModel (Join-Dialog, Offline-Banner, Settings-Zahnrad)
|
||||
├── ui/detail/ # ListDetailScreen/ViewModel (Share-Button, Autocomplete)
|
||||
├── ui/detail/ # ListDetailScreen/ViewModel (Share-Button, Autocomplete), ItemVisuals (Emoji-/Kategorie-Icons)
|
||||
├── ui/settings/ # SettingsScreen/ViewModel (Account, Profil, Theme, Reset, About)
|
||||
└── util/ # NetworkMonitor
|
||||
```
|
||||
|
|
@ -247,6 +247,13 @@ Legende: ✅ erledigt · 🚧 in Arbeit · ⬜ offen
|
|||
- ✅ **Post-MVP – Settings-Screen + Profil:** `GET/PUT /api/me`
|
||||
(`UserStore.UpdateDisplayName`), `SettingsScreen`/`SettingsViewModel`
|
||||
(Account&Sync, Profil, Theme, Reset, About), Theme-Pref in SessionManager.
|
||||
- ✅ **Post-MVP – Produkt-Icons (Bring-Style):** `ui/detail/ItemVisuals.kt` –
|
||||
rein clientseitiger Classifier: deutsches Wörterbuch (~180 Einträge) mappt
|
||||
Item-Namen auf **Emoji + Kategorie** (13 Kategorien mit Akzentfarbe).
|
||||
Longest-Keyword-Match („Apfelsaft" → Getränk, nicht Obst; Saft-Komposita
|
||||
explizit gelistet), unbekannte Items → 🛒/Sonstiges. UI: Icon-Kachel in
|
||||
ItemRow, Icons im Autocomplete-Dropdown, Live-Emoji im Eingabefeld
|
||||
(`leadingIcon`). Unit-Tests in `ItemVisualsTest.kt`.
|
||||
- ✅ **Post-MVP – Build hinter restriktiven Proxies:** foojay-Resolver &
|
||||
jvmToolchain auskommentiert, Gradle-Wrapper 9.6.1, `.ssl-work/` ignoriert.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue