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

Deleting value of dimensions resets to px #38872

Closed
annezazu opened this issue Feb 17, 2022 · 8 comments · Fixed by #39531
Closed

Deleting value of dimensions resets to px #38872

annezazu opened this issue Feb 17, 2022 · 8 comments · Fixed by #39531
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [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 [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

Description

This came up as part of the FSE Outreach Program's All Things Media exploration:

When adjusting certain dimensions, say you set the variable as ’em’ or ‘rem’ or ‘vh’ or ‘vw’. Deleting/ removing the value associated with that variable, it automatically changes to ‘px’. For example: ‘Min height of cover’, ‘Border radius’ for image block:

Want to note that I found this to be similar to this issue: #37856

Step-by-step reproduction instructions

  1. Add a cover block.
  2. Open the block settings.
  3. Under ‘Min height of cover’ change the dimensions to ’em’ or ‘rem’ or ‘vh’ or ‘vw’ and add in a number.
  4. Delete the number and notice it reverts back to px.

Screenshots, screen recording, code snippet

revert.mov

Environment info

  • WordPress 5.9
  • Gutenberg 12.6
  • Chrome
  • MacOS

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

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Feb 17, 2022
@annezazu annezazu added this to 📥 To do in WordPress 5.9.x via automation Feb 17, 2022
@ntsekouras ntsekouras added the [Block] Cover Affects the Cover Block - used to display content laid over a background image label Feb 17, 2022
@ntsekouras
Copy link
Contributor

I can reproduce and by looking the code of the cover block... 🤷 So many things going on there with a lot of complexity. I'll try to see if I can find the problem and also simplify things a bit..

@richtabor
Copy link
Member

Came here to report this as well 🎯

@annezazu
Copy link
Contributor Author

annezazu commented Mar 7, 2022

@andrewserong in case you might have some insights based on this recent effort #39109

@andrewserong
Copy link
Contributor

@annezazu thanks for the ping, I think this one is now resolved as of #39145?

@andrewserong
Copy link
Contributor

I'll just ping @ntsekouras since that PR says that it's part of resolving this issue, so there might have been intended follow-ups before we close out this one?

@annezazu
Copy link
Contributor Author

annezazu commented Mar 8, 2022

Wow! Totally missed that somehow 🙈 . This is what GitHub rabbit holes do to me. Will see if more follow up is needed - neat to see so much work happening to improve all of these tools either way.

@ntsekouras
Copy link
Contributor

I'll just ping @ntsekouras since that PR says that it's part of resolving this issue, so there might have been intended follow-ups before we close out this one?

Yes, my fix was about min height of Cover. block, but this issue's description also mentions this:

For example: ‘Min height of cover’, ‘Border radius’ for image block:

It seems that at least for border radius control this is still a thing..

Screen.Recording.2022-03-08.at.4.59.40.PM.mov
@andrewserong andrewserong added the [Feature] UI Components Impacts or related to the UI component system label Mar 17, 2022
@andrewserong
Copy link
Contributor

Just adding the UI Components label, as it might be something for us to look at in the UnitControl component directly to see if there's a way to solve it across all instances of the component 🤔 (not sure if it's possible but just an idea).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [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 [Type] Bug An existing feature does not function as intended
4 participants