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

Grouping a single Quote block transforms it (instead of grouping it) #58042

Open
bacoords opened this issue Jan 20, 2024 · 12 comments
Open

Grouping a single Quote block transforms it (instead of grouping it) #58042

bacoords opened this issue Jan 20, 2024 · 12 comments
Labels
[Block] Quote Affects the Quote Block [Feature] Block Transforms Block transforms from one block to another [Type] Bug An existing feature does not function as intended

Comments

@bacoords
Copy link
Contributor

Description

When I want to put a Quote block inside of a group, I select "Group" from the dropdown it transforms the block into a group, rather than groups the block. Feels like the expected behavior (based on almost all other blocks) is to group the block, not transform it.

Step-by-step reproduction instructions

  1. Open the block editor and add a Quote.
  2. Select the Quote
  3. Select the Group option from the dropdown

Screenshots, screen recording, code snippet

group-issue.mov

Environment info

  • Tested in WP 6.4, with AND without Gutenberg (17.5.0)

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

@bacoords bacoords added the [Type] Bug An existing feature does not function as intended label Jan 20, 2024
@ndiego ndiego added the [Block] Quote Affects the Quote Block label Jan 20, 2024
@jordesign jordesign added the Needs Testing Needs further testing to be confirmed. label Jan 21, 2024
@annezazu
Copy link
Contributor

I can replicate with WP 6.4.2, TT4, and GB 17.5.1.

Screen.Recording.2024-01-24.at.10.32.00.AM.mov

If I turn off GB 17.5.1, I can still replicate with just 6.4.2. Adding to 6.5 board and polish board as needs dev in case we can get a fix in in time.

@annezazu annezazu added [Feature] Block Transforms Block transforms from one block to another and removed Needs Testing Needs further testing to be confirmed. labels Jan 24, 2024
@annezazu annezazu moved this to 📥 Todo in WordPress 6.5 Editor Tasks Jan 24, 2024
@annezazu annezazu added this to Polish Jan 24, 2024
@annezazu annezazu moved this to Needs development in Polish Jan 24, 2024
@ntsekouras
Copy link
Contributor

This is intended right now and the responsible code is here.

Do you think the most common expectation for this use case is to wrap a Group around though? Personally I think it's better this way, but it's totally subjective. If we end up wanting the suggested behavior, we'd just need to remove the linked transform.

@bacoords
Copy link
Contributor Author

I feel like the intended behavior would make sense had I chosen Group from the "Transform to" menu:
Screenshot 2024-01-25 at 6 39 51 AM

But when selecting "Group" from the dropdown, it feels like the behavior shouldn't be to transform the block, it should be to put it inside of a group.

It would be helpful to know what other core blocks actually transform the block type when you select Group from the dropdown (not from the "Transform to" menu) to compare.

@annezazu
Copy link
Contributor

But when selecting "Group" from the dropdown, it feels like the behavior shouldn't be to transform the block, it should be to put it inside of a group.

I would agree with that. It's clear someone is taking an action to add a Group around it rather than transform from the three dot menu.

@ntsekouras
Copy link
Contributor

The issue here is that the two buttons(from transforms menu and from the block settings menu) are using the same mechanism to transform. What this means is we don't have an existing way to differentiate the handling between them.

Is this what we should aim for and explore a solution, or you think it's fine if we wrap the Quote in Group in both cases?

@bacoords
Copy link
Contributor Author

The issue here is that the two buttons(from transforms menu and from the block settings menu) are using the same mechanism to transform. What this means is we don't have an existing way to differentiate the handling between them.

That's an interesting point. In fact, the only block where the "Transform to Group" action removes the original block (and I've tested almost every block, including the Pull Quote, Media/Text, Gallery, etc) that I can find is the Cover block. In every other block I've tested (WP 6.4.2) the Transform to Group action places the block inside of a group but keeps the original.

@bacoords
Copy link
Contributor Author

I should clarify - for the cover block, the "Transform to Group" action transforms the cover into a group, but selecting "Group" from the kebab dropdown menu wraps it in a group - which I think is essentially the same behavior that the Quote block should have.

@ntsekouras
Copy link
Contributor

for the cover block, the "Transform to Group" action transforms the cover into a group, but selecting "Group" from the kebab dropdown menu wraps it in a group

That surprised me when I read it and checked again, but doesn't seem to be the case. It's true that for core blocks the ones that replace the block are Quote and Cover, but both buttons(transform menu and block settings menu) perform the same action, which is change the block type and not wrap.

So, my above comment still stands whether we would like different behavior, which would call for a new exploration and how useful it would be for other blocks too.

@bacoords
Copy link
Contributor Author

bacoords commented Jan 27, 2024

It's true that for core blocks the ones that replace the block are Quote and Cover, but both buttons(transform menu and block settings menu) perform the same action, which is change the block type and not wrap.

Well that's interesting: So if your cover block is empty/untouched, it transforms into a group, but if your cover block has a background image assigned already, it wraps the block (whether you use the transform menu or the block settings menu).

In either case I think the goal of raising this issue was to point out that the UI on this is very inconsistent and that the simplest approach (simple from the user perspective, not the dev perspective) could be:

  • the Group option in the "Transform" menu would transform the block
  • the Group option in the block settings menu would wrap the block

This would be applied across all blocks consistently and will be even more critical if we see #46972 merged. I think that's the behavior implied by the UI and would be happy to help with or test a PR on this if other agree that that makes sense.

Would be interested in feedback from a UI perspective as well (@richtabor)

@annezazu
Copy link
Contributor

annezazu commented Feb 5, 2024

At this stage, we're outside the ability to quickly make a decision here for 6.5. I'm going to punt it from the release as a result.

@carolinan
Copy link
Contributor

This was also reported on Trac in December 2023: https://core.trac.wordpress.org/ticket/60124

When using the Block Editor and attempting to 'group' an existing Quote block, the 'Quote' block gets converted to a 'Paragraph' block.
My expectation is that the Quote block would be grouped inside of a Group block, but instead it seems to convert the Quote block into a Group block and then has the quote content as a paragraph block within.

@colorful-tones
Copy link
Member

Hi folks,
We are only one week away from the Beta 1 cut-off date for WordPress 6.6. This issue hasn’t seen any movement in a while, so we (the editor triage leads of the 6.6 release) have decided to remove it from the WordPress 6.6 Editor Tasks project board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Quote Affects the Quote Block [Feature] Block Transforms Block transforms from one block to another [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants