Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revert "Fix BottomNavigationBar label style text colors" #102756

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 1 commit into from
Apr 28, 2022

Conversation

Piinks
Copy link
Contributor

@Piinks Piinks commented Apr 28, 2022

Reverts #102638

FYI @TahaTesser

It looks like this might be a documentation issue, there are many customers internally that expect the existing behavior.
The Google tests that run before a PR lands are just a sampling, after landing all of the test are run and this change broke many of them.

In the image tests, it showed that the selected label color and the selected icon color are expected to be the same in customer production apps. This change made the label color different from the expected color.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 28, 2022
@TahaTesser TahaTesser self-requested a review April 28, 2022 14:05
@TahaTesser
Copy link
Member

TahaTesser commented Apr 28, 2022

I didn't expect this to break since the color is taken from label style when they are non-null, if null, colors from existing tween are used.

      begin: unselectedLabelStyle.color
        ?? itemColorTween.begin,

@Piinks
Copy link
Contributor Author

Piinks commented Apr 28, 2022

Yeah I was surprised as well, it could be a theme issue or something else, best to revert first and examine further. I can come up with a test case from the customer code to validate against.

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

@talamaska
Copy link
Contributor

talamaska commented May 3, 2022

@Piinks I'm also trying to resolve the issues with the colors of the BottomNavigationBarItem in #96664
I also got some comment that my changes might break golden tests. I have figured out which test is breaking. It's the shifting bottom bar type. I think that even if it is breaking some tests, the philosophy of flutter is to make breaking changes if they actually fix an issue and for the sake of ergonomics. It is not correct to not implement a fix, because someone is relying on the wrong behavior. I also wanted to separate the tweens for icon and for the label, like @darrenaustin suggested, but it also breaks the golden test. Please take a look if you have time.

@Piinks
Copy link
Contributor Author

Piinks commented May 3, 2022

Hi @talamaska, Flutter does make breaking changes, there is just a proper procedure for landing them. So when we determine something that has landed is breaking, we revert it in order to follow that procedure.
Please see the wiki entry for breaking changes: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes

egramond pushed a commit to egramond/flutter that referenced this pull request May 5, 2022
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.

5 participants