New issue
Advanced search Search tips

Issue 851460 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug
Q2

Blocking:
issue 850507



Sign in to add a comment

Improve snapshot/content tracking in enter/exit tab switcher transitions

Project Member Reported by pschaffner@chromium.org, Jun 11 2018

Issue description

Currently, the transition between content snapshots and the in-memory content view doesn't match up nicely and creates a very abrupt finish to the enter/exit tab switcher animations. This happens both for NTPs and tabs with content. (See attached video.)

This should be a smooth transition (in both orientations, as much as possible), just like in Safari (minus the flickers seen at 9s and 12s). (See attached video.)
 
chrome.mp4
6.8 MB View Download
safari.mp4
11.0 MB View Download

Comment 1 by marq@chromium.org, Jun 12 2018

Labels: MS-Tab-Grid S-Polish

Comment 2 by marq@chromium.org, Jun 13 2018

Labels: Q2
Cc: pinkerton@chromium.org

Comment 4 by marq@chromium.org, Jun 26 2018

Blocking: 850507

Comment 5 by marq@chromium.org, Jun 27 2018

Blocking:
Issue 841495 has been merged into this issue.
Status: Started (was: Assigned)
Labels: M-69
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 17

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

commit 602d2720f0c353b05c3f6615b3e78ea1bd5d7255
Author: Mark Cogan <marq@google.com>
Date: Tue Jul 17 09:19:11 2018

[iOS] Merge tab grid transitions with tab views.

This CL updates the tab grid transitions to cleanly match the presented tab views.

The basic abstraction for this transition is the GridToTabTransitionView protocol which defines a set of 'cell' and 'tab' views, and methods to lay them out. The general idea is that a view conforming to this protocol can either be in 'cell' mode (where it exactly matches a tab grid cell), or in 'tab' mode (where it exactly matches an open tab).

Most of the work is done by the GridTransitionCell subclass of GridCell, which positions and scales the "tab" and "cell" views it is supplied with so they animate smoothly. All of this positioning/scaling logic is internal to that class and nothing else depends on it.

Providing the transition cell with the tab views is handled in the transition animator, mostly leveraging the content area layout guide. This doesn't require any direct integration with the tab view (that is, the BVC) beyond that layout guide.

Approaches I abandoned:

- letting -layoutSubviews position the tab/grid views. The problem with this approach (which is much cleaner from an API perspective) is that the timing of the layout passes is unpredictable, it it resulted in changes being made that weren't fully animated (for example, subviews would be scaled and positioned without animation, and then the superview would scale with an animation).

- using layout constraints for GridTransitionCell's tab views. This is probably the correct thing to do long-term; mostly this was a decision made under time constraints, but since ultimately animating constraint changes depends on -layoutSubviews being called at the right times, I did have some concerns given the difficulties described above. It's unfortunate that grid_cell.mm is mixing constraint- and frame-based layout, but it is confined to that single file.

Bug:  851460 ,  850507 ,  862343 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: If6d55f14aa05e705143547b61773fdb34796ad2d
Reviewed-on: https://chromium-review.googlesource.com/1136647
Commit-Queue: Mark Cogan <marq@chromium.org>
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575590}
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/grid/grid_cell.mm
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_to_tab_transition_view.h
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_to_visible_tab_animator.mm
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_transition_animation.mm
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_transition_layout.h
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/grid_transition_layout.mm
[modify] https://crrev.com/602d2720f0c353b05c3f6615b3e78ea1bd5d7255/ios/chrome/browser/ui/tab_grid/transitions/tab_to_grid_animator.mm

Status: Fixed (was: Started)
Cc: edchin@chromium.org
 Issue 850112  has been merged into this issue.

Sign in to add a comment