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

Block Editor: Add README for BlockControls #52366

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Jul 6, 2023

What?

This PR adds a basic README for the BlockControls component.

Fixes #52061.

Why?

Part of #22891 where we aim to document all block editor components.

How?

Just adding a README. I'm keeping it simple - there are a few more scenarios with the underlying Slot and Fill that could be documented, but I think this is a good first pass.

Testing Instructions

Not needed.

Testing Instructions for Keyboard

None.

Screenshots or screencast

None.

@tyxla tyxla added [Type] Developer Documentation Documentation for developers [Package] Block editor /packages/block-editor labels Jul 6, 2023
@tyxla tyxla requested a review from mburridge July 6, 2023 10:11
@tyxla tyxla requested a review from ellatrix as a code owner July 6, 2023 10:11
@tyxla tyxla self-assigned this Jul 6, 2023
@tyxla tyxla enabled auto-merge (squash) July 6, 2023 10:30
@@ -0,0 +1,89 @@
# BlockControls

When the user selects a particular block, a toolbar positioned above the selected block displays a set of control buttons. Certain block-level controls are automatically included in the toolbar under specific circumstances. For example, there is a control for converting the block into a different type or when the focused element is a RichText component.
Copy link
Contributor

Choose a reason for hiding this comment

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

a toolbar positioned above the selected block

It can optionally be displayed in the top toolbar of the editor. Dunno if this is worth mentioning. 🤷‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, well I guess it's not a huge miss. As I mentioned, this is a first pass and it can definitely be expanded further to contain the Slot and Fill usages and maybe a few more examples, but I've tried to make a compromise and have something useful with a few additional links to start with. It's better than nothing 😉

Copy link
Contributor

@mburridge mburridge left a comment

Choose a reason for hiding this comment

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

Great work once again @tyxla. Thanks very much.

@tyxla tyxla merged commit bc663f6 into trunk Jul 6, 2023
@tyxla tyxla deleted the add/block-controls-readme branch July 6, 2023 10:45
@github-actions github-actions bot added this to the Gutenberg 16.3 milestone Jul 6, 2023
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.

Create README for "block-controls" component
2 participants