Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge to M-101][Shelf] Fix temporarily incorrect index value during …
…item fade out When a shelf item is removed, `ScrollableShelfView::last_tappable_app- _index_` updates when the shelf button view is removed from the view hierarchy. However, removing view from view hierarchy is performed at the end of the fade out animation while the view is removed from the view model at the beginning of animation. This discrepancy could cause subtle issues when users interact with shelf during the fade out animation. Ideally, removing the view from view model should be postponed to the end of the fade out animation as well. But this change will bring the side effect that the item view to be removed is interactive during the animation. See `ShelfItemForView` used in `ShelfView::OnMenuClosed` and other places. This side effect may be hard to eliminate (for example, in `ShelfView`, `view_model_` is used in many places). This CL performs a quick fixing by notifying `ScrollableShelfView` of shelf item removal before the fade out animation starts. Then `ScrollableShelfView` can decrease `last_tappable_app_index_` instantly. (cherry picked from commit 7412ebc) Bug: 1300561 Change-Id: I812d919185fbac4e9447904cce6f59d54df3f476 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3532928 Reviewed-by: Toni Barzic <tbarzic@chromium.org> Commit-Queue: Andrew Xu <andrewxu@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#983601} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3584271 Cr-Commit-Position: refs/branch-heads/4951@{#705} Cr-Branched-From: 27de622-refs/heads/main@{#982481}
- Loading branch information
Andrew Xu
authored and
Chromium LUCI CQ
committed
Apr 12, 2022
1 parent
44cd070
commit df6fec5
Showing
5 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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