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

Add Convert to Regular Blocks button to ellipsis Dropdown #32310

Conversation

thisissandip
Copy link
Contributor

@thisissandip thisissandip commented May 28, 2021

Fixes #32217

Description

Added convert to regular blocks button to ellipsis dropdown for reusable blocks

How has this been tested?

  1. Select a Reusable Block
  2. Select more options button (three vertical dots) in the Block Toolbar
  3. Select Convert to Regular Blocks
  4. This should convert the reusable block to independent regular blocks

Screenshots

convert_regular_blocks.mov

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @thisissandip !

While the code here looks good, this changed was introduced here: https://github.com/WordPress/gutenberg/pull/28318/files#diff-3e104de22b2ea1fac4d9f2fd42f07a1c8ff39bcb9d0bfa43b056538e74e1c558R124

and I'm wondering if there had been related discussion about this and this change happened.

--cc @mtias @jasmussen

@ntsekouras ntsekouras added [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement. labels May 28, 2021
@ntsekouras
Copy link
Contributor

Also related: #30993

@paaljoachim
Copy link
Contributor

I am linking in this Trac comment: https://core.trac.wordpress.org/ticket/52779#comment:25

@jasmussen
Copy link
Contributor

jasmussen commented Jun 1, 2021

Thanks for the PR! I don't have a strong opinion here: the menu item is redundant duplicate UI to the button in the toolbar (which by the way is an icon button as the reusable block name can and often will grow very long). Redundant UI can be okay.

I would follow the sentence case menu item standards, though, so it should be "Convert to regular blocks" not "Convert to Regular Blocks".

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - thanks!

Let's land with a green CI.

@ntsekouras ntsekouras merged commit 636d479 into WordPress:trunk Jun 1, 2021
@github-actions github-actions bot added this to the Gutenberg 10.8 milestone Jun 1, 2021
@paaljoachim
Copy link
Contributor

paaljoachim commented Jun 1, 2021

@ntsekouras or @thisissandip

Be sure to also get this included:

I would follow the sentence case menu item standards, though, so it should be "Convert to regular blocks" not "Convert to Regular Blocks".

Thanks for approving and merging this PR, Nik!

@paaljoachim
Copy link
Contributor

paaljoachim commented Jun 1, 2021

@peterwilsoncc Peter. We have a possible merged PR that can be backported to WP 5.7.3.

@ntsekouras
Copy link
Contributor

ntsekouras commented Jun 1, 2021

Be sure to also get this included:
I would follow the sentence case menu item standards, though, so it should be "Convert to regular blocks" not "Convert to Regular Blocks".

It's included yes.

@thisissandip
Copy link
Contributor Author

Thank you for reviewing and merging this PR! @ntsekouras @paaljoachim @jasmussen

@paaljoachim
Copy link
Contributor

@youknowriad Should we backport this PR into WP 5.8?
It gives the additional option in the ellipsis drop down to convert a Reusable block into a regular block. It was added because the icon in the toolbar is very easy to overlook. (We have yet to change the icon to something that better represents the convert process.) Adding the option into the ellipsis makes it easier for people to discover a place where convert can happen.

@paaljoachim paaljoachim added the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label Aug 30, 2021
@paaljoachim paaljoachim mentioned this pull request Aug 30, 2021
7 tasks
@desrosj
Copy link
Contributor

desrosj commented Sep 1, 2021

As mentioned on #34393, I've decided to not include this in 5.8.1 as this is more of a bug fix by way of enhancement. I think adding UI elements and controls should only be done in minor releases when absolutely necessary.

@desrosj desrosj removed the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reusable block: Add "Convert to regular blocks" in the ellipsis drop down.
5 participants