WordPress / twentytwentythree

Twenty Twenty-Three, the default WordPress theme sporting many styles that will launch with WordPress 6.1.
123 stars 65 forks source link

Undefined name for XX-Large font size setting #280

Closed richtabor closed 2 years ago

richtabor commented 2 years ago

I noticed a missing name value for the xx-large font size.

The others have a value from core (i.e. "Small", "Medium", "Large", Extra Large") — but xx-large is custom to Twenty Twenty Three, so it does not have a name.

CleanShot 2022-10-13 at 16 01 56@2x

richtabor commented 2 years ago

This may be related (odd font size behavior in Marigold):

CleanShot 2022-10-13 at 16 21 27@2x
carolinan commented 2 years ago

We are past the string freeze for 6.1, I hope an exception can still be made.

carolinan commented 2 years ago

I do find it strange that it does not automatically fall back to for example the slug. I would expect the editor to handle a missing name.

richtabor commented 2 years ago

Are the strings in theme.json font size name values translated?

richtabor commented 2 years ago

I would expect the editor to handle a missing name.

Perhaps it should fallback to the slug value, if one is not provided.

mikachan commented 2 years ago

I think XXL is a Core size, and I believe the 'undefined' issue should have been fixed by https://github.com/WordPress/gutenberg/pull/44791, although I can also currently reproduce this with WP 6.1 RC1.

richtabor commented 2 years ago

I don't see it here. Would it be elsewhere?

Yea I'm testing with RC1

mikachan commented 2 years ago

The XXL size is listed here.

I've reported the issue here, and I'll see if I can find where this has broken between the above issue and now.

mikachan commented 2 years ago

I'm now seeing this on all font size presets defined by the theme, not just XXL. It looks like it happens when the theme does not supply a name key for the font size preset, even if it's an 'official' Core preset size.

I have a potential fix here: https://github.com/WordPress/gutenberg/pull/45041.

mikachan commented 2 years ago

This should be fixed with https://github.com/WordPress/gutenberg/pull/45041, which will be included in WP 6.1 RC2 🎉

mikachan commented 2 years ago

This is working in WP 6.1 RC2.