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

Transforms: Quote should not be suggested as a transform from a Group #49879

Closed
annezazu opened this issue Apr 17, 2023 · 5 comments · Fixed by #50424
Closed

Transforms: Quote should not be suggested as a transform from a Group #49879

annezazu opened this issue Apr 17, 2023 · 5 comments · Fixed by #50424
Assignees
Labels
[Block] Group Affects the Group Block [Block] Quote Affects the Quote Block [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

What problem does this address?

While using the experimental Grid layout, I noticed that the transform menu prioritizes transforming to a Quote block:

Screen Shot 2023-04-17 at 2 14 06 PM

It turns out the same thing happens with the Stack block:

Screen Shot 2023-04-17 at 2 15 59 PM

Semi related: #49524 and #39066

What is your proposed solution?

At the least, update the transforms to show something more relevant like Columns rather than quote. Ideally, I'd like to see the transforms show the variations in full (stack, row, group, grid).

@WordPress/gutenberg-design since there wasn't consensus reached on this prior issue that reflected how the transforms menu needs to be thought of in a larger way. While I believe that to be true, I also think we need to make some changes to the Group block variations sooner rather than later with so many variations built in now.

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Block] Group Affects the Group Block labels Apr 17, 2023
@richtabor
Copy link
Member

While using the experimental Grid layout, I noticed that the transform menu prioritizes transforming to a Quote block

That's odd, def shouldn't be the case.

Ideally, I'd like to see the transforms show the variations in full (stack, row, group, grid).

Agreed. We currently don't have support for block variation transforms in this popover, though we should. Related: #49584 (comment)

@richtabor
Copy link
Member

Even the Grid transform to the Cover block is odd.

@glendaviesnz
Copy link
Contributor

Even the Grid transform to the Cover block is odd.

It is just a hangover from the fact that under the hood it is just a Group block, and the Group block has always had a transform to Cover, which makes sense for a standard Group. The transforms have an isMatch callback though which is passed a block's current attributes, so it shouldn't be too hard to check if the Group is standard or one of the variations and limit the transform options accordingly.

@jameskoster
Copy link
Contributor

💯 if we're going to offer multiple transform methods, I'd say the prioritised transforms should appear in all locations. That means: variations should appear above the horizontal rule in the transforms menu.

This would help with post meta blocks too.

@richtabor richtabor changed the title Group variations: ensure transforms show appropriate items Transforms: Quote should not be suggested as a transform from a Group May 5, 2023
@richtabor richtabor added [Type] Bug An existing feature does not function as intended [Block] Quote Affects the Quote Block and removed Needs Design Feedback Needs general design feedback. labels May 5, 2023
@richtabor
Copy link
Member

The transforms have an isMatch callback though which is passed a block's current attributes, so it shouldn't be too hard to check if the Group is standard or one of the variations and limit the transform options accordingly.

Let's roll with this, with a goal of having Quote not suggested for Groups (or its variations).

@richtabor richtabor removed the [Type] Enhancement A suggestion for improvement. label May 5, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 8, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block [Block] Quote Affects the Quote Block [Type] Bug An existing feature does not function as intended
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants