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

Show "group" in multi-select toolbar #37619

Conversation

jiteshdhamaniya
Copy link
Contributor

Description

This PR solves this #34461 issue, add a Group Icon button to Multi Block Toolbar.

How has this been tested?

  • Create Multiple Blocks
  • Select Multiple blocks
  • You will see Group icon in toolbar, click on it group them.

Screenshots

Screenshot 2021-12-23 at 9 41 11 PM

Types of changes

New feature

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.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 23, 2021
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @jiteshdhamaniya! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@skorasaurus skorasaurus added the [Feature] Block Multi Selection The ability to select and manipulate multiple blocks label Jan 12, 2022
Copy link
Contributor

@andrewserong andrewserong 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 @jiteshdhamaniya, I just happened to stumble on this PR while looking into the possibility of exposing this control. Very cool to see you've already explored this!

It's been a while since you opened the PR, are you keen to continue working on it? Not a worry at all if you currently don't have time to, but if so, it looks like it could use a rebase against trunk to get it up to date, and I'm happy to help out with testing / reviews.

@@ -114,6 +141,14 @@ export default function BlockToolbar( { hideDragHandle } ) {
{ ( shouldShowVisualToolbar || isMultiToolbar ) && (
<ToolbarGroup className="block-editor-block-toolbar__block-controls">
<BlockSwitcher clientIds={ blockClientIds } />
{ isMultiToolbar && (
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be worth moving this slightly further down into its own ToolbarGroup to the right (visually) of the BlockMover, so that it's in its own section, in case we'd like to add other similar controls in the future?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this should be present in the actual block tools, not in the block type meta functions (transforms, movers, etc).

@andrewserong
Copy link
Contributor

Thanks again for the work here @jiteshdhamaniya! I've opened up a new PR in #39710 borrowing your changes here, and have made a couple of small changes to deal with some edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Multi Selection The ability to select and manipulate multiple blocks First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants