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

ToolsPaneltem: Stale hasValue when value is reset by different means #55976

Closed
Mamaduka opened this issue Nov 8, 2023 · 4 comments
Closed

ToolsPaneltem: Stale hasValue when value is reset by different means #55976

Mamaduka opened this issue Nov 8, 2023 · 4 comments
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@Mamaduka
Copy link
Member

Mamaduka commented Nov 8, 2023

ToolsPaneltem: Stale hasValue when value is reset by different means

While working on #55973, I noticed that when you reset the image from MediaReplaceFlow, the tools panel still shows the reset option.

I can reproduce it on the trunk, so it's probably a different issue with the tools panel.

Originally posted in #55973 (comment)

Screencast

CleanShot.2023-11-08.at.19.50.44.mp4
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Nov 8, 2023
@Mamaduka
Copy link
Member Author

Mamaduka commented Nov 9, 2023

@andrewserong, let's move our ToolsPanel convo here.

In the screencast at 0:03, you will see that both tools panel options are active after resetting the image via MediaReplaceFlow. I would expect those to be disabled and non-actionable.

@andrewserong
Copy link
Contributor

Thanks for raising this separately! I imagine it's probably an issue with the ToolsPanel as I can reproduce a similar kind of issue with typography in global styles. As an example, if we go to change the appearance and set a value, then set it back to default, the panel still thinks there's a value:

2023-11-09.16.10.48.mp4

Similarly, in the block editor, if we go to set a custom font size, and then clear out the value so that it matches the default state, the ToolsPanel still thinks there's a value there:

2023-11-09.16.08.19.mp4

So it feels like perhaps in the ToolsPanel there's possibly some stale logic in checking for hasValue, as you mention.

@stokesman
Copy link
Contributor

I believe this has been resolved by #60621. I tested a couple of the demonstrated cases in this issue and cannot reproduce them.

@Mamaduka
Copy link
Member Author

Thanks for testing, @stokesman! I can also confirm that the reported bug is gone.

I'll close the issue.

@github-project-automation github-project-automation bot moved this from Inbox (needs triage) 📬 to Done 🎉 in WordPress Components Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
Status: Done 🎉
Development

No branches or pull requests

3 participants