Skip to content

Menu: add titles to FavouriteApps, GesturePatterns, FingerMode#2247

Merged
enaboapps merged 1 commit into
mainfrom
fix/menu-titles-coverage-2246
May 13, 2026
Merged

Menu: add titles to FavouriteApps, GesturePatterns, FingerMode#2247
enaboapps merged 1 commit into
mainfrom
fix/menu-titles-coverage-2246

Conversation

@enaboapps

Copy link
Copy Markdown
Collaborator

Closes #2246.

Summary

The menu title header introduced in #2236 (v2.24.0) reads its label from MenuConstants.getTitleResource(menuId). Three menus passed null as their menuId and therefore rendered without a title:

Menu Before After
FavouriteAppsMenu (no title) "Favourite Apps"
GesturePatternsMenu (no title) "Gesture Patterns"
FingerModeMenu (no title) "Finger Mode"

All three needed string resources already existed (menu_title_favourite_apps, gesture_patterns_title, menu_item_finger_mode) — purely a wiring fix.

CustomGestureConfirmationMenu is intentionally still titleless (transient yes/no prompt mid-gesture; out of scope).

Changes

  • service/menu/structure/MenuConstants.kt — added three new MenuIds constants (FAVOURITE_APPS_MENU, GESTURE_PATTERNS_MENU, FINGER_MODE_MENU) and three new branches in getTitleResource mapping each to its existing string.
  • service/menu/menus/favouriteapps/FavouriteAppsMenu.kt — pass menuId = MenuConstants.MenuIds.FAVOURITE_APPS_MENU to BaseMenu.
  • service/menu/menus/gestures/GesturePatternsMenu.kt — pass MenuConstants.MenuIds.GESTURE_PATTERNS_MENU (replacing the literal null).
  • service/menu/menus/gestures/FingerModeMenu.kt — extend the BaseMenu(...) call to pass MenuConstants.MenuIds.FINGER_MODE_MENU.

Side-effect check

A non-null menuId makes BaseMenu.getMenuItems() eligible to load user-customized items via MenuUserItemsHelper and to order items via MenuConfigurationRepository. The customization screen (MenuCustomizationScreenModel.availableMenus) doesn't list these three menus, so no customization rows can exist for them — behavior is unchanged.

Out of scope

  • CustomGestureConfirmationMenu (transient prompt — intentionally no title).
  • Reconciling the menu_item_finger_mode string doubling as the menu title (cosmetic; follow-up).
  • Extending MenuCustomizationScreenModel.availableMenus to expose these as user-customizable.

Test plan

  • ./gradlew compileDebugKotlin passes
  • Installed on OPD2403
  • Open menu → Main → Favourite Apps: header reads "Favourite Apps"
  • Main → Gesture Patterns (with at least one saved pattern): header reads "Gesture Patterns"
  • Main → Gestures → Finger Mode: header reads "Finger Mode"
  • Custom Gesture Confirmation prompt mid-gesture: still no title (intentional)
  • Other 12 menus still show their existing titles (regression check)

These three menus passed a null menuId to BaseMenu, so the title
header introduced in #2236 was skipped entirely. Give each a stable
menuId constant and map it in MenuConstants.getTitleResource to an
existing string resource so the header renders. CustomGestureConfirmation
remains intentionally titleless (transient mid-gesture prompt).

No new strings, no UX behavior change beyond the title appearing.
@enaboapps enaboapps merged commit b41477b into main May 13, 2026
@enaboapps enaboapps deleted the fix/menu-titles-coverage-2246 branch May 13, 2026 16:16
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.

Add titles to FavouriteApps, GesturePatterns, FingerMode menus

2 participants