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

Docs: Add block toolbar component readme #25245

Merged

Conversation

JustinyAhin
Copy link
Member

Description

Added documentation for the block toolbar component (see #22891)

How has this been tested?

N/A, documentation only

Types of changes

Documentation

Checklist:

  • [n/a] My code is tested.
  • [n/a] My code follows the WordPress code style.
  • [n/a] My code follows the accessibility standards.
  • [n/a] 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.

@JustinyAhin
Copy link
Member Author

JustinyAhin commented Sep 11, 2020

@mkaz I'm wondering something.
For most of the uses cases of BlockToolbar, it is used with the hideDragHandle prop like this <BlockToolbar hideDragHandle />.

But I can't see nowhere what hideDragHandle does exactly. Any idea?

Thanks.

@mkaz
Copy link
Member

mkaz commented Sep 18, 2020

It looks like it is used in the Block-Mover component here but hard to tell how.

@jasmussen can you add any additional context?

@jasmussen
Copy link
Contributor

I can't speak with full authority on that, but I would imagine that is necessary for the situation where a block can't be moved. For example when there's only one block:

Screenshot 2020-09-18 at 18 37 12

Other situations include where a block is locked otherwise.

@gziolo gziolo added the [Package] Block editor /packages/block-editor label Nov 26, 2020
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

It looks like a good start 👍

We could also add a reference to BlockControls component (SlotFill) that typically serves as a way for blocks to inject their toolbar items inside this component.

@gziolo gziolo changed the title Add block toolbar component readme Docs: Add block toolbar component readme Nov 26, 2020
@JustinyAhin JustinyAhin merged commit aa9c090 into WordPress:master Nov 26, 2020
@github-actions github-actions bot added this to the Gutenberg 9.5 milestone Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants