New issue
Advanced search Search tips

Issue 868285 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Closed: Aug 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug
Q2



Sign in to add a comment

Tab Grid - Rotate Animation Jumpy

Project Member Reported by martijnb@chromium.org, Jul 27

Issue description

Enter Tab Grid, Rotate Phone. 

Notice the jumpiness of the rotation Tab Grid animation. (See video)

Desired behaviour can be seen in earlier (dev) version of Chrome. 
 
ScreenRecording_07-27-2018 12-46-22.MP4
2.9 MB View Download
Worth noting that this is happening in Canary but not in Dev.
Labels: -proj-uifresh Proj-UIRefresh Q2 M-69
Status: Available (was: Untriaged)
This one stems from my attempts to fix the safe safe area issue in tab grid. Views don't have an updated safe area until `viewWillLayoutSubview` and beyond. We moved inset adjustment to `viewDidAppear` and `willTransitionToSize` to minimize the number of times the inset adjustment code is executed. One tradeoff has been this somewhat jumpy UI.

I'm happy to proceed move code into viewDidLayoutSubviews if we prefer a smoother layout. This obviously also assumes that moving it to that method will solve the issue, which I believe is the case but am not 100% sure.
Thanks, Chris. I think we should fix this jumpy animation. Is there a tangible performance gain from minimizing the number of times the inset adjustment code is executed? 
Cc: kkhorimoto@chromium.org
thegreenfrog@ should we assign this to you since you were working on it?
Owner: thegreenfrog@chromium.org
Status: Started (was: Available)
I'm still determining whether its a noticeable difference. If not, I will immediately open my CL that moves the code to -viewDidLayoutSubview (sorry it should not has said -viewWillLayoutSubview)
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/65fd3130d06c8d9abcd633a341dd705eb105793a

commit 65fd3130d06c8d9abcd633a341dd705eb105793a
Author: Chris Lu <thegreenfrog@chromium.org>
Date: Tue Jul 31 23:29:54 2018

[ios] Fix Tabgrid UI imperfections

- Moves GridViewCntroller inset adjustments in -viewDidAppear and -willTransitionToSize to -viewDidlayoutSubviews. The tradeoffs is that -viewDidLayoutSubviews is called many more times than the other two, hence the original choice to stay away from it. However, the current approach gives a glitchy-like UI experience when rotating.
- Updates Remote Tabs insets with horizontal safe area of scroll view if not on the screen. Doesn't update insets if visible since it will then have the right safe area already. This is still a hack, but a more comprehensive coverage so that it never ends up encroaching the safe area.

Video: https://drive.google.com/open?id=1jzP0ClCOn0uQTZC9hJ2g0FUWsF-nSuqV

Bug:  868270 ,  868285 , 868658
Change-Id: Ia50146e1be9dfdde74bbf3e7d6b6042168b2ce8a
Reviewed-on: https://chromium-review.googlesource.com/1153391
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579618}
[modify] https://crrev.com/65fd3130d06c8d9abcd633a341dd705eb105793a/ios/chrome/browser/ui/tab_grid/grid/grid_view_controller.mm
[modify] https://crrev.com/65fd3130d06c8d9abcd633a341dd705eb105793a/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm

 Issue 869842  has been merged into this issue.
Status: Fixed (was: Started)
Verified on Canary on 8/1
Cc: thegreenfrog@chromium.org
 Issue 860437  has been merged into this issue.
Labels: Merge-TBD
Does this need to be merged to M69?
Labels: -Merge-TBD Merge-Approved-69
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 2

Labels: -merge-approved-69 merge-merged-3497
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/711f9aeae17c8e1fbc17802688113520c1fb4637

commit 711f9aeae17c8e1fbc17802688113520c1fb4637
Author: sczs <sczs@chromium.org>
Date: Thu Aug 02 16:41:36 2018

[ios] Fix Tabgrid UI imperfections

- Moves GridViewCntroller inset adjustments in -viewDidAppear and -willTransitionToSize to -viewDidlayoutSubviews. The tradeoffs is that -viewDidLayoutSubviews is called many more times than the other two, hence the original choice to stay away from it. However, the current approach gives a glitchy-like UI experience when rotating.
- Updates Remote Tabs insets with horizontal safe area of scroll view if not on the screen. Doesn't update insets if visible since it will then have the right safe area already. This is still a hack, but a more comprehensive coverage so that it never ends up encroaching the safe area.

Video: https://drive.google.com/open?id=1jzP0ClCOn0uQTZC9hJ2g0FUWsF-nSuqV

TBR=thegreenfrog@chromium.org

(cherry picked from commit 65fd3130d06c8d9abcd633a341dd705eb105793a)

Bug:  868270 ,  868285 , 868658
Change-Id: Ia50146e1be9dfdde74bbf3e7d6b6042168b2ce8a
Reviewed-on: https://chromium-review.googlesource.com/1153391
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579618}
Reviewed-on: https://chromium-review.googlesource.com/1160875
Reviewed-by: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/branch-heads/3497@{#337}
Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753}
[modify] https://crrev.com/711f9aeae17c8e1fbc17802688113520c1fb4637/ios/chrome/browser/ui/tab_grid/grid/grid_view_controller.mm
[modify] https://crrev.com/711f9aeae17c8e1fbc17802688113520c1fb4637/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm

Status: Verified (was: Fixed)
Verified the issue on the build version 69.0.3497.58 beta tested on iPhone7+(iOS 11.4.1) and iPhone8(iOS 12)

Tabgrid rotation is smooth on changing the device orientation.

Sign in to add a comment