Skip to content
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

NavigationBarScreenButton interactive highlight does not support dynamic text #926

Closed
pixelzoom opened this issue May 25, 2023 · 5 comments

Comments

@pixelzoom
Copy link
Contributor

In phetsims/geometric-optics#470, QA discovered that the interactive highlight for navbar buttons does not support dynamic text. It is not resizing when the button label changes.

@jessegreenberg identified this as a problem that is specific to NavigationBarScreenButton:

Generally the highlight does resize to fit the Node's bounds. But that isn't happening here because NavigationBarScreenButton is using a custom highlight that does not update.

@pixelzoom
Copy link
Contributor Author

When this is fixed, please identify shas for cherry-picking to geometric-optics 1.3, to address phetsims/geometric-optics#470.

@jessegreenberg
Copy link
Contributor

There is a custom focus highlight in the NavigationBarScreenButton so that the highlight is not cut off below the nav bar but it wasn't updating with dynamic layout. Fixed in the above commit. The highlight shape was changed slightly so that it does not cover up the title text when longer strings get scaled down. The bottom of the highlight is cut off a little but @amanda-phet and I think it is acceptable and the best option with limited space in the nav bar.

@Nancy-Salpepi can you please confirm master? If it is OK to you it is ready to cherry-pick into geometric-optics.

@Nancy-Salpepi
Copy link

Looks good in master to me @jessegreenberg 🙂

@Nancy-Salpepi Nancy-Salpepi removed their assignment May 25, 2023
@jessegreenberg
Copy link
Contributor

Awesome, thanks! @pixelzoom can you please review the code change? If it looks OK 2e895f3 is the fixing SHA.

@pixelzoom
Copy link
Contributor Author

Looks good to me in master, thanks!

Closing this issue, and will patch geometric-optics 1.3 over in phetsims/geometric-optics#470.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants