WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.58k stars 4.23k forks source link

Global theme.json fluid typography setting is not available in the UI #64764

Open matiasbenedetto opened 3 months ago

matiasbenedetto commented 3 months ago

Description

The global theme.json fluid typography setting, settings.typography.fluid path from theme.json, is unavailable on the Gutenberg UI. This prevents users from controlling it using the UI and produces some inconsistencies in the font size presets UI because you can enable fluid font sizes despite needing to be enabled in theme.json.

Step-by-step reproduction instructions

  1. Browse the typography options of the editor and check that this setting is unavailable.

Screenshots, screen recording, code snippet

image

Environment info

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

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

matiasbenedetto commented 3 months ago

@WordPress/gutenberg-design @WordPress/block-themers is the theme.json settings.typography.fluid an option we should surface in the UI?

I'm unsure because it seems more abstract or complex than the fluid control specific to each font size preset. So, we could probably rely on that for the UI, but I still want your input.

t-hamano commented 3 months ago

In #64790, it is now possible to define/enable the fluid value with individual font size presets even if 'settings.typography.fluid' is not enabled. Therefore, I believe the problem reported in this issue has been fixed.

is the theme.json "settings.typography.fluid" an option we should surface in the UI?

Personally, I don't think it's necessary as we can enable fluid in individual font size presets. While there are certainly benefits to being able to apply fluid to all fonts at once, I'm concerned about the complexity it would introduce.

jasmussen commented 3 months ago

I'm unsure because it seems more abstract or complex than the fluid control specific to each font size preset. So, we could probably rely on that for the UI, but I still want your input.

My instinct would be that it's important to surface this singular toggle. Creating presets with individual fluid values is complex and cumbersome, whereas if you create a slew of basic non-fluid presets, then toggle the global fluid value, "it just works" as far as responsiveness. Right?