New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 623930 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Feature



Sign in to add a comment

Implement adjusted snapping behavior

Project Member Reported by nepper@chromium.org, Jun 28 2016

Issue description

For content suggestions on the NTP, we'd like to implement minimal snapping and transition behavior:

- the Fakebox should stay as is during vertical scrolling from the default position until it hits the top of the screen.

Once the Fakebox has hit the top of the screen:

- if the user continues to scroll further up, the Fakebox should animate into the Omnibox using a horizontal expansion. The animation speed is directly related to the vertical scrolling speed. Helper text and microphone remain visible and animate side-ways.
- if the user lets loose before the transition is finished, the UI snaps into the Omnibox state (i.e. right after the Fakebox transition is finished)
- if the user changes the scrolling direction, the animation gets inverted accordingly

Peeking card:

- the Peeking card transitions into full bleed as the user starts pulling it up
- if the user lets loose before the transition is completed the UI snaps into the Peeking card position (before the transition animation starts)
- if the user changes scrolling direction the animation gets inverted accordingly


 

Comment 1 by peconn@chromium.org, Jun 28 2016

Cc: nepper@chromium.org
There were one or two differences with what was shown in the UI review:

The Fakebox transitions into the Omnibox just as it is about to hit the top of the screen. This makes implementation considerably easier.

There is a little bit of a snapping region on the peeking card, so the user can peek at it but must pull it up to display more than half to rest on it.

In addition, the search provider logo no longer fades out as we scroll.

I attached a demo.
2016-06-28_13-35-58.mp4
18.6 MB Download

Comment 2 by nepper@chromium.org, Jun 28 2016

Awesome, thanks Peter.

This looks perfect to me from a product POV.

Rachel, any UX concerns?
Looks great, thanks Patrick!

Heads-up, it sounds like Alex raised the issue of the header transition again. I'll review the discussion we had with Alan and Sebastian once more.

Comment 4 by peconn@chromium.org, Jun 29 2016

To add context:

In the Cards new tab page we have scrolling - the cards are below the fold. We had originally implemented this with large regions of snap scrolling - we would snap to the top, to most likely (if the screen was small) or to the articles (the user could then scroll normally below the articles).

This was found to be hard to use with one hand - eg, if the user wanted to tap on the first article it would always be scrolled to the top of the page. So we decided to simplify scrolling and remove snapping as much as possible. We now only use snap scrolling to ensure the user doesn't pause midway through a transition (of the fakebox or the peeking card) - because the fakebox is unusable (and ugly) when it is midway through its transition.

The fakebox transition is a function of scroll position, and doing it this way gets rid of a load of problems that would crop up if we did it as an animation (eg, what happens if the user triggers the reverse animation midway through the previous animation).

Because of all of this, we decided to keep the fakebox transition relying on scrolling, but to reduce the transition region so the NTP is usable at more scroll positions.

The animation shown in #1 is a bit janky at the end, this is because we change from the fakebox to the real omnibox which at the moment isn't very smooth and is a bit abrupt. bauerb@ is working on making this look nicer.
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 30 2016

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

commit bb72610a2c82054430648c6c15aa9ff7159cdb55
Author: peconn <peconn@chromium.org>
Date: Thu Jun 30 11:53:25 2016

Refine snap scrolling on the Cards New Tab Page.

This greatly reduces the regions where the Cards New Tab Page snaps to scroll.
- Scrolling will snap to ensure the page does not come to rest in the middle
  of either the fakebox or peeking card transition.
- Scrolling will snap back if only the top of the peeking card is visible,
  making it properly peek.

In addition, it disables the search logo fading out on scroll.

Because the scrolling behaviour has changed, the following user actions are obsolete:
- MobileNTP.Snippets.ScrolledAboveTheFold
- MobileNTP.Snippets.ScrolledBelowTheFold

BUG= 623930 

Review-Url: https://codereview.chromium.org/2106753002
Cr-Commit-Position: refs/heads/master@{#403144}

[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java/res/values/dimens.xml
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
[delete] https://crrev.com/d313dc6d63b5344f3767e42b917cf6c33b9d3fc1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardsLayoutOperations.java
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/chrome/android/java_sources.gni
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/tools/metrics/actions/actions.xml
[modify] https://crrev.com/bb72610a2c82054430648c6c15aa9ff7159cdb55/tools/metrics/histograms/histograms.xml

Wohoo, looking forward to the next Canary/Dev build :)

Comment 7 by fi...@chromium.org, Jul 1 2016

Labels: zine-mr-MVP

Comment 8 by finkm@google.com, Jul 1 2016

Labels: -zine-mr-mvp

Comment 9 by fi...@chromium.org, Jul 1 2016

Labels: zine-mr-MVP
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 2 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Are we just waiting for the next build to confirm that this is fixed?
Status: Fixed (was: Assigned)
Now that we have a separate bug for the snapping behaviour on landscape, I think we could mark this as fixed.

Sign in to add a comment