Commit Graph

29 Commits

Author SHA1 Message Date
Shamali P
c0e4dcf238 Readjust the available size for the recommendations in 2-pane sheet
Now that we exclude the space taken by size string and description,
offsetting the size provided to the recommendation table to keep the
widgets within non-scrollable view as much possible.

Bug: N/A
Test: Screenshot
Flag: N/A

Change-Id: I0193cd1ba5de0b0ff98dab9aeb352264afd3ff3a
2024-05-06 15:50:42 +00:00
Willie Koomson
d731ba2ff1 Remove widget education tip dialog
This change removes the widget education tip dialog, and the arrow
tip view. These are no longer needed now that taps are handled by
showing an add button.

Bug: 335318980
Test: `pm clear com.google.android.apps.nexuslauncher` and open widget
 picker
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I9b24a41604880f5f94939c02b94f1a9f6a6c83d5
2024-04-25 22:56:36 +00:00
Shamali Patwa
a80e199798 Merge "Keep rounded corners while scrolling in right pane & fix scrollbar size." into main 2024-04-19 22:43:39 +00:00
Shamali Patwa
4ee10f33ee Merge "Use same margins for widgets bottom sheet as all apps." into main 2024-04-19 21:08:24 +00:00
Shamali P
5f7eb1f2ee Keep rounded corners while scrolling in right pane & fix scrollbar size.
[demo](http://screencast/api/gif/NDU4MTQ5ODE3Mzc4NDA2NHxhYmUzMDcxNy04MA/image)

Bug: 333734241
Test: screencast
Flag: N/A
Change-Id: Ifb522ca2c0a1092bf41c630e336b19c81d504c26
2024-04-18 22:32:30 +00:00
Shamali P
50bf021b02 Use same margins for widgets bottom sheet as all apps.
* Per UX discussion with jane and david, the full width looks too large
for the app info -> long press -> widgets bottom sheet.
* Earlier during POR, we decided to match them all, but after trying it out, we think smaller is better for the app specific bottom sheet.

* http://screencast/cast/NTg1Njk1MDUxOTU5NTAwOHxiMDU0YWJhMi04MQ
* http://screencast/cast/NjU0NjQyODgwMDI3MDMzNnw4NDNhMGVjMy0yMg


Bug: 328812171
Test: screencast
Flag: N/A
Change-Id: I9b0a996f80bac2639bcadf85480468ac886c7093
2024-04-18 16:58:39 +00:00
Willie Koomson
dcc2d82d4e Scroll to show WidgetCell when it is tapped.
Scroll to show WidgetCell when it is tapped in a widget sheet.
Otherwise, the add button may show/hide without the user seeing
it if the bottom is clipped.

Bug: 329861721
Test: manual- tap WidgetCell when top or bottom is scrolled out of view
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD

Change-Id: Ie21730c193e845cb1c1fa447b7c0a7e719984a8f
2024-04-15 22:32:48 +00:00
Shamali P
168d420440 Maintain the recommendations that were initially displayed
- The component names of the widgets shown on first opening the picker
are saved across orientation change - and only those shown initially are
displayed.

* http://screencast/cast/NDkyMDQ0OTg3OTI0NDgwMHw4ZGU1ZjRmNy0zNQ
* https://screencast/cast/NTc1NjQ1NDI5MTExMTkzNnxiZGJlMjQ2Yi01Ng

Bug: 331776686
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_suggestions TEAMFOOD
Test: Manual - see videos.
Change-Id: I6af7421c2757fde321d06406514ab2576a48fb47
2024-04-08 16:02:05 +00:00
Zak Cohen
4d341404c6 Align widget picker bottom swipe transition with predictive back.
Bug: 325930715
Test: widget picker tests
Flag: NA
Change-Id: I15319f0a264503ff34dd4cc0dc36a40531379e2b
2024-04-03 12:46:33 -07:00
Fengjiang Li
b7e9427dc9 Merge "[Predictive Back] Refactor setClipChildrenOnViewTree/restoreClipChildrenOnViewTree to support clipToPadding" into main 2024-03-20 01:21:09 +00:00
Shamali Patwa
eef12ba5b7 Merge "Retain recommendations (if possible) while picker is open" into main 2024-03-20 00:41:41 +00:00
Fengjiang Li
ea7cb497f5 [Predictive Back] Refactor setClipChildrenOnViewTree/restoreClipChildrenOnViewTree to support clipToPadding
Bug: 325930715
Test: Added unit test
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I509546ac4ee1fa851cf0648d365a5348362267cc
2024-03-19 15:28:38 -07:00
Shamali P
b081314330 Retain recommendations (if possible) while picker is open
Picker rebinds recommendations when size constraints change or
fold/unfold, but recommendations from popup provider may have changed.
This is an attempt at trying to maintain currently shown items
as much possible.

Also, align the pagination and title to the top in two pane picker
 (confirmed with David that we prefer this version)

Additionally, we don't show the widgets count for suggestions.

Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual

Change-Id: I60799f9ad38da913c3e084d758f5b82c79cd641c
2024-03-19 21:26:14 +00:00
Fengjiang Li
c51363fc46 [Predictive Back] Support WidgetsTwoPaneSheet
Fix: 325930715
Test: Manual - attached video to bug
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: I44098de12253f803526160bce6457a940b2153c7
2024-03-18 15:31:13 -07:00
Shamali P
1076f176c2 Limit the recommendations space in two pane picker
- This makes the suggestion section non-overwhelming
- Currently it shows too many suggestions for user to find any value
- Limiting the height also allows pagination to feel smooth when showing
in categories

Bug: 318410881
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Test: Manual
Change-Id: Iab1f9a15bdd46ee1560734e30551bfb7c8a74a82
2024-03-12 23:47:07 +00:00
Shamali P
b3a4d65bb7 Initial UI changes for displaying categorized suggestions.
Ordering changes and some more UI changes in follow-up.

Bug: 318410881
Test: See screenshots
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: I77e7f4dcdda32e2921ae56721cddbe261832f0d8
2024-02-16 18:43:20 +00:00
Shamali P
933a05a2be Align items in the center within each table row within suggestions.
When differently-sized widgets OR widgets of same size but not filling
space in previews are shown side by side, the top alignment looks odd.

Besides, in the updated UX, we want them to be center aligned.

Bug: 318410881
Bug: 319152349
Flag: N/A
Test: Screenshot update in cl chain.
Change-Id: I52cd7d6a1b5397a3c4c9dea8b072792b3211a8d3
2024-02-15 18:32:21 +00:00
Shamali Patwa
028482609c Merge "Set accessibility pane title for right pane on updating content." into main 2024-02-13 00:33:11 +00:00
fbaron
88b89d68fb Restore state of widget picker on fold/unfold
Specifically:
-keep selected tab (personal/work)
-keep search results

Fix: 323406345
Test: WidgetPickerImageTest
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker TRUNKFOOD
Change-Id: I919e59484f3af7a2b3b007f5c234055a0f7276b3
2024-02-12 21:13:46 +00:00
Shamali P
13c6727601 Set accessibility pane title for right pane on updating content.
This will let users know that content appeared on right when they
selected an option on left.

Note: This is announced _only_ when content changes.

Bug: 324073588
Test: Manual with talkback
Flag: N/A
Change-Id: Icec3242d8f250f6d19e082a39927165c7b8fc86a
2024-02-12 19:48:41 +00:00
fbaron
88676ba7bb Fix two pane widget picker bugs
Here we:
-Move no widgets text outside of the right pane so that we can center it
-setInset and change the clipping of children in the views so that we can fix the padding at the bottom when we have 3 button nav
-create selectedHeader where we keep track of the currently selected header in order to refresh the widgets for the selected header on rotation
-when widgets are bound we check if there are no recommended widgets, and if there aren't we select the first visible header

Fix: 324002996
Fix: 324001940
Fix: 323417968
Fix: 323460545
Fix: 323409306
Test: WidgetPickerImageTest
Flag: NONE
Change-Id: Ibd85cb086bb6c2aede6cf79da0c688a1fdaec4e5
2024-02-07 22:36:59 +00:00
Shamali P
5e855d7912 Fix the horizontal margins on the left panel in the two pane picker.
The recycler view when displayed in single pane picker, for large screen
gets a larger padding. But when displayed in two pane picker, it is not
needed - so we override it.

Foldable's unfolded portrait doesn't seem to have screenshot test
- will look into if we can add one in follow up.

Bug: 322719955
Test: Screenshot test for existing modes & manual (see bug)
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker DEVELOPMENT

Change-Id: Ibd72146e7e5230eec0d2ce01c3917819a73d8f32
2024-02-02 18:20:38 +00:00
fbaron
db1e3d53e3 Fix nested scrolling in two pane picker left pane
Fix: 319151078
Test: Verify there's no nested scrolling
Flag: NONE
Change-Id: Ic974c85e1845f45aa0646a1ebf29696f75c9ab90
2024-01-22 09:00:57 -08:00
fbaron
ae39c0f9de Don't reset search in two pane sheet
Fix: 319150904
Test: Verify on device that search doesn't reset
Flag: NONE
Change-Id: I7ecb20ef67416e5393d600821ac96b2f7e80c4d2
2024-01-11 13:37:45 -08:00
fbaron
b3b0215cb1 Update two pane sheet widget picker to use RelativeLayout since ConstraintLayout was causing test failures
There are test failures when using ConstraintLayout without a known solution, see https://chat.google.com/room/AAAACwktJi8/2OogGWfbLvI. Switching back to a relativelayout to resolve those issues.

Bug: 301918659
Test: WidgetPickerImageTest
Flag: ACONFIG com.android.launcher3.enable_unfolded_two_pane_picker DEVELOPMENT
Change-Id: I004c2d77ca308d85b29217d4f1e548067126556f
2023-12-12 15:12:40 -08:00
fbaron
55fed64ced Rename widgets two pane sheet layout files and spec files to more fitting name
Currently the names used for widgets two pane sheet files are similar to full sheet files, just with "_large_screen" added to it. This is not a good name as it can cause confusion. The new name includes "_two_pane" which is more indicative of the actual functionality of these files.

Fix: 276917926
Test: verify widget picker two pane still works
Change-Id: I23cf2a20fc137cc3e99c5fdc90100648a0926368
2023-04-04 09:55:31 -07:00
fbaron
ba3f77be7d Show suggested widgets header only when there are suggested widgets
Bug: 275435999
Test: Verified suggested widgets header doesn't show up unless there are suggested widgets to show
Change-Id: I2ec2ba100d7a6ddc338a36ece75633abba990b2b
2023-03-31 21:45:07 +00:00
fbaron
dfc94fc05f Scroll to top when new header is selected in two pane widget picker
Bug: 275441368
Test: Select a header and scroll, then select a different header and verify that it is scrolled to the top
Change-Id: Ie11d074759e5336ee1bbdec000ab266cf43c2c31
2023-03-28 00:52:35 +00:00
Federico Baron
002317f60c Add subclass for two pane widget picker
Since the regular widget picker and the widget picker for tablet diverge quite a bit, we added a child class for it that extends WidgetsFullSheet.java
There should be no functionality changes with this CL, it's purely changes in code structure.

Bug: 256684299
Test: Turn on LARGE_SCREEN_WIDGET_PICKER flag and verify nothing changes compared to ag/20508230.
Change-Id: Ie0e93534d7b93017cc11a05f67728155d22951f9
2023-03-24 11:48:20 -07:00