Replace long-press widget picker with a desktop menu bottom sheet#94
Open
RobinJ1995 wants to merge 3 commits into
Open
Replace long-press widget picker with a desktop menu bottom sheet#94RobinJ1995 wants to merge 3 commits into
RobinJ1995 wants to merge 3 commits into
Conversation
Long-pressing empty home screen space used to jump straight into the widget picker. It now opens a menu: the home screen zooms out and darkens behind a scrim while a rounded frosted sheet slides up from the bottom of the screen, offering "Add widget" (the existing picker) and "Settings" (the preferences screen). The menu is a new home/DesktopMenuOverlay — an in-activity overlay on android.R.id.content following folder/FolderOverlay's pattern (static active slot, Back/Home dismissal through HomeActivity, transitions settle immediately in battery saver). The sheet respects navigation-bar insets and is capped at 480dp wide on large screens. The old WidgetHost_LongClickListener becomes WidgetsPager_LongClickListener (it never touched WidgetHost directly any more); its exit-widget-edit- mode branch is unchanged. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0173WtibvabeHoUt7TvEGaKa
Between "Add widget" and "Settings"; it enters the customise UI through the same ViewModel-preserving relaunch the Preferences screen's Customise entry triggers (HomeActivity.openCustomiseMode). Reuses the existing option_customise/hint_customise strings; the Settings row's hint becomes "DistroHopper preferences" so it no longer overlaps with the new row's wording. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0173WtibvabeHoUt7TvEGaKa
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1db87d9b3e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
HomeActivity is not recreated on rotation (configChanges), so an open desktop menu survives it; the sheet's 480dp width cap, its navigation- bar inset padding and the backdrop zoom pivot were all derived once at show time and went stale. Re-derive them from a layout-change listener on the scrim whenever the overlay's size actually changes. Raised by Codex review on #94. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0173WtibvabeHoUt7TvEGaKa
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.
Long-pressing empty home screen space used to jump straight into the widget picker. It now opens a desktop menu: the home screen zooms out to 92% and darkens behind a scrim while a rounded frosted bottom sheet slides up from the bottom of the screen, offering:
Tapping a row, tapping outside, pressing Back, or pressing Home dismisses it with the reverse animation (sheet slides down, screen zooms back in).
Implementation
home/DesktopMenuOverlay— an in-activity overlay onandroid.R.id.content, mirroringfolder/FolderOverlay's pattern: static active-slot tracking (isShowingIn/dismissActive/clearFor) soHomeActivity's Back callback and the Home-intent handler dismiss it, and cleanup inonDestroy. The zoom-out is a plain scale on the activity content — the wallpaper lives in its own system window and stays put behind it. All transitions settle immediately in battery saver, matching the dash.desktop_menu_sheet.xml) uses the app's existing "modern dialog" palette and row ripple, has a grab-handle pill, respects navigation-bar insets, and is capped at 480dp wide and centred on large screens.WidgetHost_LongClickListenerbecomesWidgetsPager_LongClickListener(it no longer touchedWidgetHost); its exit-widget-edit-mode-first branch is unchanged.HomeActivitygainsopenPreferences()(extracted fromlalPreferences_clicked) andopenCustomiseMode()(the customise relaunch, shared with the result-code-4 path).option_customise/hint_customisestrings; the Settings row's hint is "DistroHopper preferences".Tests
New Robolectric suite
home/DesktopMenuOverlayTest: long-press opens the menu (and captures Back), the zoom-out applies and reverts, Back / outside-tap dismiss it, Add widget opens the picker dialog, Customise sets up the customise relaunch, Settings launchesPreferencesActivity.HomeHomeButtonTestgains a case for Home dismissing the menu. Full unit-test suite passes.🤖 Generated with Claude Code
https://claude.ai/code/session_0173WtibvabeHoUt7TvEGaKa
Generated by Claude Code