Skip to content

[Material] Fix a jumping animation in the beginning of the extended Navigation Rail transition #65659

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 6 commits into from
Sep 15, 2020

Conversation

clocksmith
Copy link
Contributor

@clocksmith clocksmith commented Sep 11, 2020

Description

This change lerps the width in a SizedBox that is used as spacing in the extended nav rail, rather than using a constant value. This fixes a bug in the animation of the extended rail, which also can cause inconsistencies with the leading/trailing widgets.

Before (slowed down 15x):
bug_bad

After fix (slowed down 15x):
bug_good

Note that the change is subtle, but it is more apparent, and causes more issues, when there are animated widgets in the leading/trailing slots of the rail.

Related Issues

closes #65657

Tests

I added the following tests:

I added 'Extended rail transition does not jump from the beginning' to navigation_rail_test.dart

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

Since the animation does not jump, the width of the rail is slightly different mid-animation, so one of the width values had to be updated.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 11, 2020
@clocksmith clocksmith changed the title [Material] Fix a non-smooth animation in the extended Navigation Rail [Material] Fix a jumping animation in the beginning of the extended Navigation Rail transition Sep 11, 2020
Copy link
Contributor

@perclasson perclasson left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Renzo-Olivares Renzo-Olivares left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Navigation Rail] Extended animation jumps on initially frame
7 participants