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

Inspector Controls: Inputs aren't clearing after control is reset via panel menu #42455

Closed
aaronrobertshaw opened this issue Jul 15, 2022 · 0 comments · Fixed by #42484
Closed
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@aaronrobertshaw
Copy link
Contributor

Description

When resetting some of the more complex or compound controls via their panel's menu, their inputs aren't being cleared. This is affecting multiple controls in the Inspector Controls sidebar including padding, margin, borders and border radii etc.

A git bisect shows this regressed when #40518 landed.

Expected Behaviour

When resetting a control, its value is cleared from its field, when that field doesn't have any default value.

Actual Behaviour

When resetting the padding control, for example, its individual side controls are not cleared after resetting padding via the panel's menu

Step-by-step reproduction instructions

  1. Edit a post, add a group block and select it
  2. In the sidebar, set a padding value under Dimensions, then unlinked the control
  3. Reset the padding via the Dimensions panel's menu and note that your previous value is still displayed in the unlinked controls
  4. Link the padding control again and notice that the singular padding field is in fact empty.
  5. Unlink the fields again and note the fields are now cleared
  6. Repeat this process for padding, margin, borders, or border radius.

Screenshots, screen recording, code snippet

Screen.Recording.2022-07-15.at.4.45.06.pm.mp4

Environment info

  • WP: 6.0
  • Gutenberg: trunk

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@aaronrobertshaw aaronrobertshaw added [Type] Bug An existing feature does not function as intended [Feature] UI Components Impacts or related to the UI component system [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Jul 15, 2022
@ciampo ciampo added the [Package] Components /packages/components label Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants