Skip to content

Revert "Fix NavigationBar indicator overlay color (#164484)" - #169497

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
bleroux:revert_fix_NavigationBar_indicator_overlay_color
Jun 2, 2025
Merged

Revert "Fix NavigationBar indicator overlay color (#164484)"#169497
auto-submit[bot] merged 1 commit into
flutter:masterfrom
bleroux:revert_fix_NavigationBar_indicator_overlay_color

Conversation

@bleroux

Copy link
Copy Markdown
Contributor

Description

This PR reverts the change from Fix NavigationBar indicator overlay color as it leads to several regressions.

The change was very small: replacing a Container (which obscured the overlay) with an Ink. Unfortunately this leads to some rendering issues which seem related to the Ink painting not being fully in sync with the animation logic implemented by NavigationIndicator.
I investigated this but did not find an obvious solution. So I would prefer to revert #164484 as the issue it fixed has less impact than the regression.
cc @justinmc for review and also in case you have some clue about why an Ink would cause such problems compared to a Container.

Related Issue

Fixes[Flutter 3.32.0] Active NavigationBar item not selected when switching items programmatically
FixesNavigationDrawer active indicator offset with SvgPicture
Fixes#164484 (comment)

Reopens #163871

@bleroux
bleroux requested a review from justinmcMay 27, 2025 09:06
@github-actionsgithub-actionsBot added framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages labels May 27, 2025
@flutter-dashboard

Copy link
Copy Markdown

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #169497 at sha 25df240

@flutter-dashboardflutter-dashboardBot added the will affect goldens Changes to golden files label May 27, 2025

@justinmcjustinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

Weird. It's not due to this is it? #161698

@bleroux
blerouxforce-pushed the revert_fix_NavigationBar_indicator_overlay_color branch from 25df240 to b58a872CompareJune 2, 2025 06:07
@blerouxbleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 2, 2025
@auto-submit
auto-submitBot added this pull request to the merge queueJun 2, 2025
@bleroux

Copy link
Copy Markdown
ContributorAuthor

LGTM 👍

Thanks!

Weird. It's not due to this is it? #161698

I wondered too if it could be a side effect of #161698 but I don't think so as I tried the fix from #163419 and the bug was still there.
I will search if there are known similar issues for Ink.

In the meantime, this PR is probably a good candidate for CP, WDYT?

Merged via the queue into flutter:master with commit 0b3ba80Jun 2, 2025
@flutter-dashboardflutter-dashboardBot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 2, 2025
@bleroux
bleroux deleted the revert_fix_NavigationBar_indicator_overlay_color branch June 2, 2025 09:46
@blerouxbleroux added the cp: stable cherry pick this pull request to stable release candidate branch label Jun 5, 2025
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jun 5, 2025
…lutter#169497)
## Description
This PR reverts the change from [Fix NavigationBar indicator overlay
color](flutter#164484) as it leads to
several regressions.
The change was very small: replacing a Container (which obscured the
overlay) with an Ink. Unfortunately this leads to some rendering issues
which seem related to the Ink painting not being fully in sync with the
animation logic implemented by `NavigationIndicator`.
I investigated this but did not find an obvious solution. So I would
prefer to revert flutter#164484 as the
issue it fixed has less impact than the regression.
cc @justinmc for review and also in case you have some clue about why an
Ink would cause such problems compared to a Container.
## Related Issue
Fixes [[Flutter 3.32.0] Active NavigationBar item not selected when
switching items
programmatically](flutter#169249)
Fixes [NavigationDrawer active indicator offset with
SvgPicture](flutter#169436)
Fixesflutter#164484 (comment)
Reopens flutter#163871
github-merge-queueBot pushed a commit that referenced this pull request Oct 6, 2025
## Description
This PR fixes NavigationBar lacking visual feedback on the active
destination indicator.
This is a reland of #164484 which
was reverted in #169497.
After investigation, I narrowed down the regression introduced in
#164484 to the usage of a
RepaintBoundary.
I added one test to verify that the regression which led to the revert
of #164484 is no more
reproducible.
### Before:
The navigation indicator does not change color when hovered or focused:
https://github.com/user-attachments/assets/a1e67dee-4a38-4711-ba90-bdcd9bed3226
### After:
The navigation indicator color changes (slightly darker):
https://github.com/user-attachments/assets/1b1cc335-2cf4-4c41-9c53-696537707c72
## Related Issue
Fixes [NavigationBar lacks visual feedback when focused or
hovered](#163871)
## Tests
- Updates several helper functions which are used by several tests.
- Updates several test: adding an Ink widget changes the coordinates
used in several tests because these coordinates are now relative to the
Ink offset.
- Add one test to check that active destination moves to the correct
destination (that was not the case after
#164484). This new test is a
golden test.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Oct 7, 2025
## Description
This PR fixes NavigationBar lacking visual feedback on the active
destination indicator.
This is a reland of flutter#164484 which
was reverted in flutter#169497.
After investigation, I narrowed down the regression introduced in
flutter#164484 to the usage of a
RepaintBoundary.
I added one test to verify that the regression which led to the revert
of flutter#164484 is no more
reproducible.
### Before:
The navigation indicator does not change color when hovered or focused:
https://github.com/user-attachments/assets/a1e67dee-4a38-4711-ba90-bdcd9bed3226
### After:
The navigation indicator color changes (slightly darker):
https://github.com/user-attachments/assets/1b1cc335-2cf4-4c41-9c53-696537707c72
## Related Issue
Fixes [NavigationBar lacks visual feedback when focused or
hovered](flutter#163871)
## Tests
- Updates several helper functions which are used by several tests.
- Updates several test: adding an Ink widget changes the coordinates
used in several tests because these coordinates are now relative to the
Ink offset.
- Add one test to check that active destination moves to the correct
destination (that was not the case after
flutter#164484). This new test is a
golden test.
okorohelijah pushed a commit to okorohelijah/flutter that referenced this pull request Oct 7, 2025
## Description
This PR fixes NavigationBar lacking visual feedback on the active
destination indicator.
This is a reland of flutter#164484 which
was reverted in flutter#169497.
After investigation, I narrowed down the regression introduced in
flutter#164484 to the usage of a
RepaintBoundary.
I added one test to verify that the regression which led to the revert
of flutter#164484 is no more
reproducible.
### Before:
The navigation indicator does not change color when hovered or focused:
https://github.com/user-attachments/assets/a1e67dee-4a38-4711-ba90-bdcd9bed3226
### After:
The navigation indicator color changes (slightly darker):
https://github.com/user-attachments/assets/1b1cc335-2cf4-4c41-9c53-696537707c72
## Related Issue
Fixes [NavigationBar lacks visual feedback when focused or
hovered](flutter#163871)
## Tests
- Updates several helper functions which are used by several tests.
- Updates several test: adding an Ink widget changes the coordinates
used in several tests because these coordinates are now relative to the
Ink offset.
- Add one test to check that active destination moves to the correct
destination (that was not the case after
flutter#164484). This new test is a
golden test.
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
## Description
This PR fixes NavigationBar lacking visual feedback on the active
destination indicator.
This is a reland of flutter#164484 which
was reverted in flutter#169497.
After investigation, I narrowed down the regression introduced in
flutter#164484 to the usage of a
RepaintBoundary.
I added one test to verify that the regression which led to the revert
of flutter#164484 is no more
reproducible.
### Before:
The navigation indicator does not change color when hovered or focused:
https://github.com/user-attachments/assets/a1e67dee-4a38-4711-ba90-bdcd9bed3226
### After:
The navigation indicator color changes (slightly darker):
https://github.com/user-attachments/assets/1b1cc335-2cf4-4c41-9c53-696537707c72
## Related Issue
Fixes [NavigationBar lacks visual feedback when focused or
hovered](flutter#163871)
## Tests
- Updates several helper functions which are used by several tests.
- Updates several test: adding an Ink widget changes the coordinates
used in several tests because these coordinates are now relative to the
Ink offset.
- Add one test to check that active destination moves to the correct
destination (that was not the case after
flutter#164484). This new test is a
golden test.
chunhtai pushed a commit to chunhtai/packages that referenced this pull request Jun 12, 2026
## Description
This PR fixes NavigationBar lacking visual feedback on the active
destination indicator.
This is a reland of flutter/flutter#164484 which
was reverted in flutter/flutter#169497.
After investigation, I narrowed down the regression introduced in
flutter/flutter#164484 to the usage of a
RepaintBoundary.
I added one test to verify that the regression which led to the revert
of flutter/flutter#164484 is no more
reproducible.
### Before:
The navigation indicator does not change color when hovered or focused:
https://github.com/user-attachments/assets/a1e67dee-4a38-4711-ba90-bdcd9bed3226
### After:
The navigation indicator color changes (slightly darker):
https://github.com/user-attachments/assets/1b1cc335-2cf4-4c41-9c53-696537707c72
## Related Issue
Fixes [NavigationBar lacks visual feedback when focused or
hovered](flutter/flutter#163871)
## Tests
- Updates several helper functions which are used by several tests.
- Updates several test: adding an Ink widget changes the coordinates
used in several tests because these coordinates are now relative to the
Ink offset.
- Add one test to check that active destination moves to the correct
destination (that was not the case after
flutter/flutter#164484). This new test is a
golden test.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp: stablecherry pick this pull request to stable release candidate branchframeworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packageswill affect goldensChanges to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NavigationDrawer active indicator offset with SvgPicture [Flutter 3.32.0] Active NavigationBar item not selected when switching items programmatically

2 participants

@bleroux@justinmc