Skip to content

Align nav bar bottom transition with large title animation #162097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Mar 10, 2025

Conversation

victorsanni
Copy link
Contributor

@victorsanni victorsanni commented Jan 23, 2025

Makes the bottom widget sync up with the large title in hero transitions between nav bars.

Before

before.search.hero.transition.mov

After

search.hero.transition.mov

Native searchable-to-searchable:

Screen.Recording.2025-02-05.at.1.43.54.PM.mov

Flutter searchable-to-searchable:

Screen.Recording.2025-03-04.at.8.02.00.PM.mov

Fixes CupertinoSliverNavigationBar/CupertinoNavigationBar bottom is not displayed during nav bar flying hero transitions

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository labels Jan 23, 2025
Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compared to native, the fade in/fade out seems a little strong, especially when going from searchable to searchable. Other than that, LGTM.

@victorsanni
Copy link
Contributor Author

Compared to native, the fade in/fade out seems a little strong, especially when going from searchable to searchable. Other than that, LGTM.

It's tricky because in some apps there's a strong fade, in others not so much. For example, in the iOS contacts app, the fade looks quite strong:

Screen.Recording.2025-02-06.at.11.23.04.AM.mov

I don't understand the logic behind this.

@MitchellGoodwin
Copy link
Contributor

Can we assume it's a stronger fade if one of the pages doesn't have a searchbar?

@victorsanni
Copy link
Contributor Author

Can we assume it's a stronger fade if one of the pages doesn't have a searchbar?

Fair assumption. I also tried adding a segmented control as the bottom using SwiftUI's .toolbar. But it seems like the strong fade doesn't happen in two instances:

  1. .searchable transitions (both pages have a search field).
  2. transitions triggered by pressing the Back button where the bottom widget on both pages are the same widgets in the same positions (dragging from the leading edge still fades in this case).

I'm unable to exactly trace the second case, so I'm thinking we just check for the first case in this PR for now. But in the first case, is there even a fade at all? It doesn't look like it.

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach LGTM, I think it's just tweaking the values. Visually the fade looks not as subtle as native, just trying to figure out why.

Slowed down, it looks like the native curve is pretty different. It looks like it is opaque for longer, and the fade comes on sharper.

Screen.Recording.2025-02-19.at.10.53.30.AM.mov

@victorsanni
Copy link
Contributor Author

Approach LGTM, I think it's just tweaking the values. Visually the fade looks not as subtle as native, just trying to figure out why.

Slowed down, it looks like the native curve is pretty different. It looks like it is opaque for longer, and the fade comes on sharper.

I'm finding it quite difficult to get the native values. Do you have any suggestions for the curve and other animation values?

@dkwingsmt
Copy link
Contributor

dkwingsmt commented Feb 24, 2025

I think the logic is as follows:

  • The previous page and the next page are always aligned back to back and move together.
  • The previous page has a gray overlay that fades in/out as the page shifts in/out.
  • The titles have separate fading animation from the rest of the page. See the following screenshot, where the title at the top right corner is obviously semitransparent while the searching icon is as gray as when the animation ends.
image
  • In some pages (such as the search page), the contents do not move synchronously with the page, while in others (such as the contact editing page) they do. This is probably just a coding error feature that's specific to pages. In the former case, the page content animates to the "current final" position with a spring physics, causing the content location to be constantly behind the page border.
image

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 25, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 27, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 28, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CupertinoSliverNavigationBar/CupertinoNavigationBar bottom is not displayed during nav bar flying hero transitions
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy