Skip to content

Add category display mode: card stack or dynamic pages (#340) - #341

Merged
BarMal merged 1 commit into
masterfrom
feature/category-display-mode
Jun 14, 2026
Merged

BarMal merged 1 commit into
masterfrom
feature/category-display-mode

Conversation

@BarMal

@BarMal BarMal commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a CategoryDisplayMode enum (CARD_STACK / DYNAMIC_PAGES) stored in settings
  • Card stack (default): existing behaviour — a single "Categories" spine page with a stacked card per category
  • Dynamic pages: one spine page per enabled category that has app assignments, each showing that category's app stack directly
  • Setting is exposed in Settings → Apps → Categories → "Category display"

Changes

  • CategoryDisplayMode.kt — new enum
  • CalmTheme.kt — adds CATEGORY_PAGE_KEY_PREFIX = "dev.barna.calm.CATEGORY."
  • ChapterPage.kt — adds categoryPage(key, marker, title) factory
  • LauncherUiPreferences.kt — adds categoryDisplayMode and enabledCategoriesForDynamicPages
  • LauncherSettings.kt — getter/setter for categoryDisplayMode; computes enabledCategoriesForDynamicPages (enabled categories with ≥1 assignment)
  • ChapterPagePlanner.kt — branches on categoryDisplayMode when building pages
  • PageSlot.kt — slotOf() maps CATEGORY_PAGE_KEY_PREFIX keys to PageSlot.CATEGORIES
  • LauncherPageFactory.kt — routes individual category page keys to createIndividualCategoryPage()
  • CalmSettingsActivity.kt — adds "Category display" choice row in the Categories section
  • ChapterPagePlannerTest.kt — 4 new tests covering dynamic pages mode

Test plan

  • Dynamic pages mode adds one page per enabled category with assignments, slotted under CATEGORIES
  • Dynamic pages mode with no categories adds no pages
  • Card stack mode still adds the single folder page
  • PageArranger.slotOf() returns CATEGORIES for both the folder key and individual category page keys
  • Setting persists across restarts

https://claude.ai/code/session_014SVjLmSTdqY3hSCrK59YFV


Generated by Claude Code

Users can now choose between two ways to display categories:
- Card stack (default): single "Categories" page with a stacked card per category
- Dynamic pages: one spine page per enabled category with assignments

Settings → Apps → Categories → Category display.

https://claude.ai/code/session_014SVjLmSTdqY3hSCrK59YFV
@BarMal
BarMal merged commit 26d525a into master Jun 14, 2026
1 check passed
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