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

New Units (dvh/dvw) from theme.json do not appear under Dimensions > Fixed Height in child group/row/stack blocks #67750

Closed
3 of 6 tasks
jhmonroe opened this issue Dec 9, 2024 · 0 comments · Fixed by #67784
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@jhmonroe
Copy link

jhmonroe commented Dec 9, 2024

Description

Units from theme.json do not appear under Dimensions > Fixed Height in group blocks

I noticed a bug today (6.7.1) where it also doesn't completely work for theme.json + dimensions opting in (this testing was for row/stack/group blocks inside a parent stack)

see attached screenshot showing it recognizes dvh/dvw for padding and minimum height, but not for the fixed height value (presumably height>fixed height should pull from the same declaration in theme.json since these are all the Dimensions options pulling from Settings > Spacing >

"units": [ "%", "px", "em", "rem", "vh", "vw", "dvh", "dvw" ]

I had a hard time finding anything about Fixed Height in the Documentation for either Dimensions or Group Block.
Per usual, I turn to Carolina's FSE site when I'm stumped: https://fullsiteediting.com/lessons/remove-settings-in-theme-json/
😄

Research:

Following the trail of this units opt-in journey led me here and the PR's that are linked within:
#52441
#54415
Perhaps they forgot one spot when tweaking?
Perhaps this issue is really part of the UnitControl component? https://developer.wordpress.org/block-editor/reference-guides/components/unit-control/

Step-by-step reproduction instructions

  1. Add your dvh and dvw units to theme.json (I added in Settings > Spacing > Units)
  2. Add a group/row/stack nested inside another group/row/stack
  3. Select the child block and go into the styles sidebar
  4. The new units correctly show up in sliders such as block gap, padding, and even min height
  5. The new units do not show up in the Dimensions > Height > Fixed

Screenshots, screen recording, code snippet

Image

Environment info

  • Wordpress 6.7.1
  • Firefox 133
  • Tested in both Local (PHP 8.1.29) and Siteground web host ("ultrafast" PHP 8.2.26) environments

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@jhmonroe jhmonroe added the [Type] Bug An existing feature does not function as intended label Dec 9, 2024
@Mamaduka Mamaduka added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Dec 9, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants