feat: Long-press category tabs to open category selector overlay#3059
Open
matrix9neonebuchadnezzar2199-sketch wants to merge 7 commits intomihonapp:mainfrom
Conversation
- CategoryOverlayDialog.kt を新規作成(リスト/サムネ2列表示切替対応) - LibraryTabs.kt でTabをBox+combinedClickableに置き換え(タップ/長押し両対応) - LibraryContent.kt にオーバーレイの状態管理とハプティックフィードバックを追加
…cated API - Replace hardcoded strings in CategoryOverlayDialog.kt with stringResource(MR.strings.*) - Add string resources: action_select_category, action_list_view, action_thumbnail_view, category_count, category_item_count - Fix deprecated Icons.Filled.ViewList -> Icons.AutoMirrored.Filled.ViewList - Passes spotlessCheck and all unit tests
- Add CategoryOverlayDisplayMode.Nested enum value - Add AccountTree icon button for Nested mode in header - Extract CategoryModeIconButton composable to reduce duplication - Extract CategoryFlatGrid and CategoryThumbnailGrid composables - Nested mode temporarily shows flat list (implementation in Step 3) - Add action_nested_view string resource
- Add CategoryGroup and CategoryChild data classes - Add buildCategoryGroups() function that parses '/' delimiter - Split on first '/' only (supports 2-level hierarchy) - Single-child groups treated as top-level - Edge cases handled: leading/trailing slash, empty list - 8 unit tests all passing
- Add CategoryNestedList composable with LazyColumn - Parent groups show expand/collapse with ExpandMore/ExpandLess icons - Child items indented 28dp under parent headers - Parent header shows child count and total item count - Selected child highlights parent header with secondaryContainer - Expand/collapse state managed with mutableStateMapOf - All 8 existing unit tests still passing
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3057
Summary
Adds a long-press gesture on library category tabs to open a full-screen overlay dialog for quick category navigation. Designed for users with many categories (50-100+) where horizontal tab scrolling becomes cumbersome.
Features
Three display modes
/delimiter in names (e.g.Shounen/SF,Shounen/Battle→ grouped underShounen). Parent headers are collapsible. Categories without/display as top-level items. No database changes required.Other details
Screenshots
Top bar
List mode
Nested mode (collapsed)
Nested mode (expanded)
Thumbnail mode
Changes
CategoryOverlayDialog.kt— New file: overlay dialog with 3 display modesLibraryTabs.kt— Added long-press gesture on category tabsLibraryContent.kt— Wiring overlay state and callbacksstrings.xml— Added 7 new string resourcesCategoryGroupTest.kt— 8 unit tests for/parse logicTesting
/— Nested grouping works/— Nested mode shows flat list