Menu: add titles to FavouriteApps, GesturePatterns, FingerMode#2247
Merged
Conversation
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.
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 #2246.
Summary
The menu title header introduced in #2236 (v2.24.0) reads its label from
MenuConstants.getTitleResource(menuId). Three menus passednullas theirmenuIdand therefore rendered without a title:FavouriteAppsMenuGesturePatternsMenuFingerModeMenuAll three needed string resources already existed (
menu_title_favourite_apps,gesture_patterns_title,menu_item_finger_mode) — purely a wiring fix.CustomGestureConfirmationMenuis intentionally still titleless (transient yes/no prompt mid-gesture; out of scope).Changes
service/menu/structure/MenuConstants.kt— added three newMenuIdsconstants (FAVOURITE_APPS_MENU,GESTURE_PATTERNS_MENU,FINGER_MODE_MENU) and three new branches ingetTitleResourcemapping each to its existing string.service/menu/menus/favouriteapps/FavouriteAppsMenu.kt— passmenuId = MenuConstants.MenuIds.FAVOURITE_APPS_MENUtoBaseMenu.service/menu/menus/gestures/GesturePatternsMenu.kt— passMenuConstants.MenuIds.GESTURE_PATTERNS_MENU(replacing the literalnull).service/menu/menus/gestures/FingerModeMenu.kt— extend theBaseMenu(...)call to passMenuConstants.MenuIds.FINGER_MODE_MENU.Side-effect check
A non-null
menuIdmakesBaseMenu.getMenuItems()eligible to load user-customized items viaMenuUserItemsHelperand to order items viaMenuConfigurationRepository. 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).menu_item_finger_modestring doubling as the menu title (cosmetic; follow-up).MenuCustomizationScreenModel.availableMenusto expose these as user-customizable.Test plan
./gradlew compileDebugKotlinpasses