-
Notifications
You must be signed in to change notification settings - Fork 29.7k
BottomNavigationBar: bug fix for dealing with animations with shifting tabs #22264
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
Conversation
…ill allowing animations for new widgets
mklim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
This code LGTM but should be tested before it's merged. Unfortunately I think the only way to check the animation is to write a golden file test to verify different keyframes as the animation is playing. That's going to be involved because it will require committing the screenshots to the goldens repo halfway through. You'll need to make a second PR at that point to commit the images.
No worries if you don't think you can get around to updating this PR. Eventually a Flutter maintainer will be able to pick this up and add in the test instead.
|
@tvolkert So I spent a small amount of time looking into this, and while it actually looks quite easy to write the tests, I was unsure how to create the screenshots after looking in the goldens repo. |
|
@beckler our processes need some work here (we're scoping out what it'd take to have a dedicated storage, visualization, and approvals solution for golden files). In the meantime, https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter has the details (look for the The Cliffs Notes version is:
I apologize for the rigamarole -- like I said, we're looking into what it'd take to improve that process. |
|
@tvolkert Ahhh, okay. I think I see how this works now. I'll spin up a Linux VM and take a shot at it tonight. |
|
@tvolkert I added the goldens to flutter/goldens#19. |
tvolkert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Leaving the approval to @HansMuller
|
FYI, I merged the PR on the goldens repo, so your commit hash is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice improvement to the shifting BottomNavigationBar animation. Well done!
LGTM
|
You'll need to update https://github.com/flutter/flutter/blob/master/bin/internal/goldens.version in this PR as well to point to |
|
Hey @tvolkert, it looks like the images I initially uploaded were actually generated from macOS, so I created another PR with images generated from linux. flutter/goldens#21 I also updated the test to skip on non-linux platforms. |
|
Thanks! I merged it in the goldens repo -- commit hash |
Should fix #22226.
Code introduced in #20890 caused a regression that broke color flooding animations in a
BottomNavigationBarthat hasBottomNavigationBarType.shifting.The original issue (#19653) dealt with background color changes not occurring until another tab was selected. The result is that the background color instantly changes whenever the state changes and when the widget changes, instead of allowing a new widget to animate the background color change.
Here's what it currently looks like: Actual
Here's what it should look like: Expected
Note: I may need some advice on how to test this.