Skip to content

Paragraph and Heading blocks display themselves as a transform option #73819

@ntsekouras

Description

@ntsekouras

When we merged Stretchy Paragraph and Stretchy Heading variations we didn't include an isActive prop to the default variation of paragraph and heading blocks.

This results in displaying themselves as a transform option in block switcher dropdown.

Image

The solution might not be as simple as adding isActive: ( blockAttributes ) => ! blockAttributes.fitText, because such condition is very broad and can have conflicts with 3rd party paragraph/heading variations and would probably appear as always active (except when stretchy).

I was against this approach with the need for the hacks we have for these variations, but we might probably need another one here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/block-switcher/block-variation-transformations.js#L49

--cc @jorgefilipecosta @mcsf

Metadata

Metadata

Labels

[Feature] Block TransformsBlock transforms from one block to another[Status] BlockedUsed to indicate that a current effort isn't able to move forward[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions