Move "Manage Categories" from Home to Settings #29

Closed
opened 2026-06-28 13:59:50 +00:00 by admin · 0 comments
Owner

Enhancement

The "Manage Categories" action currently lives on the Home screen as an OutlinedButton in ActionsRow (app/src/main/java/dev/achmad/ledgerr/ui/screens/home/HomeScreen.kt:397-419, used via DashboardContent at line 218-223). It should move to the Settings screen instead, and the Home action should be removed.

Current code

  • HomeScreen.kt:218-223 — the "actions" item passes onManageCategories and onSeeAll into ActionsRow.
  • HomeScreen.kt:397-419ActionsRow renders two equal-weight OutlinedButtons.
  • HomeScreen.kt:161onManageCategories = { navigator.push(CategoryScreen) }.

Expected behavior

  1. Remove the "Manage Categories" OutlinedButton from ActionsRow. The row may become a single "See All" button, or be removed entirely (see #32 for the new "View All" treatment). Either way, the Home screen no longer exposes category management directly.
  2. Add a new preference item in SettingsScreen (app/src/main/java/dev/achmad/ledgerr/ui/screens/settings/SettingsScreen.kt:61-122) inside the existing Appearance preference group (or a new "Categories" group — your call):
    • Title: Edit Categories
    • Subtitle: "<n> categories" where <n> is the current count of categories from CategoryScreenModel. Use pluralStringResource (the project already uses it for home_recurring_banner) so the unit is correct for 1 category vs n categories.
    • Action: clicking it pushes CategoryScreen (same navigator pattern as the rest of the file). SettingsScreen does not currently have a LocalNavigator plumbed in — wire one the same way HomeScreen does (LocalNavigator.currentOrThrow).
  3. Wire the live count: the SettingsScreenModel either exposes a StateFlow<Int> for the category count, or SettingsScreen reads it directly from the repository / CategoryScreenModel (mirror the read-only style already used in CategoryScreenModel). Re-render the subtitle when the count changes (e.g. after adding/deleting on CategoryScreen and popping back).

Acceptance criteria

  • The Home screen no longer shows a "Manage Categories" button.
  • The Settings screen shows an Edit Categories preference with a live-updating "<n> categories" subtitle.
  • Tapping the preference opens CategoryScreen; backing out returns to Settings and the count is still correct.
  • Strings are added to res/values/strings.xml (no hardcoded copy).

Related

  • See also #32 (View All treatment) — coordinate so Home has a sensible "primary" action if ActionsRow is reduced to a single button.
**Enhancement** The "Manage Categories" action currently lives on the Home screen as an `OutlinedButton` in `ActionsRow` (`app/src/main/java/dev/achmad/ledgerr/ui/screens/home/HomeScreen.kt:397-419`, used via `DashboardContent` at line 218-223). It should move to the Settings screen instead, and the Home action should be removed. **Current code** - `HomeScreen.kt:218-223` — the "actions" item passes `onManageCategories` and `onSeeAll` into `ActionsRow`. - `HomeScreen.kt:397-419` — `ActionsRow` renders two equal-weight `OutlinedButton`s. - `HomeScreen.kt:161` — `onManageCategories = { navigator.push(CategoryScreen) }`. **Expected behavior** 1. **Remove** the "Manage Categories" `OutlinedButton` from `ActionsRow`. The row may become a single "See All" button, or be removed entirely (see #32 for the new "View All" treatment). Either way, the Home screen no longer exposes category management directly. 2. **Add** a new preference item in `SettingsScreen` (`app/src/main/java/dev/achmad/ledgerr/ui/screens/settings/SettingsScreen.kt:61-122`) inside the existing `Appearance` preference group (or a new "Categories" group — your call): - **Title:** `Edit Categories` - **Subtitle:** `"<n> categories"` where `<n>` is the current count of categories from `CategoryScreenModel`. Use `pluralStringResource` (the project already uses it for `home_recurring_banner`) so the unit is correct for `1 category` vs `n categories`. - **Action:** clicking it pushes `CategoryScreen` (same navigator pattern as the rest of the file). `SettingsScreen` does not currently have a `LocalNavigator` plumbed in — wire one the same way `HomeScreen` does (`LocalNavigator.currentOrThrow`). 3. Wire the live count: the `SettingsScreenModel` either exposes a `StateFlow<Int>` for the category count, or `SettingsScreen` reads it directly from the repository / `CategoryScreenModel` (mirror the read-only style already used in `CategoryScreenModel`). Re-render the subtitle when the count changes (e.g. after adding/deleting on `CategoryScreen` and popping back). **Acceptance criteria** - The Home screen no longer shows a "Manage Categories" button. - The Settings screen shows an `Edit Categories` preference with a live-updating `"<n> categories"` subtitle. - Tapping the preference opens `CategoryScreen`; backing out returns to Settings and the count is still correct. - Strings are added to `res/values/strings.xml` (no hardcoded copy). **Related** - See also #32 (View All treatment) — coordinate so Home has a sensible "primary" action if `ActionsRow` is reduced to a single button.
admin closed this issue 2026-06-28 14:25:58 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/ledgerr#29