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

RichText: Append registered toolbar buttons #11196

Merged
merged 1 commit into from Oct 29, 2018

Conversation

Projects
None yet
3 participants
@iseulde
Member

iseulde commented Oct 29, 2018

Description

With this branch any registered toolbar buttons will be appended to the formatting toolbar. Fixes #11114.

How has this been tested?

Register a button and see if it appears.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@iseulde iseulde added this to the 4.2 milestone Oct 29, 2018

@iseulde iseulde requested a review from WordPress/gutenberg-core Oct 29, 2018

@gziolo

gziolo approved these changes Oct 29, 2018

It's a good start, it isn't super flexible though.

@gziolo gziolo merged commit 96fe699 into master Oct 29, 2018

2 checks passed

codecov/project 48.55% (-0.01%) compared to 3b66a7f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the try/rich-text-append-toolbar-buttons branch Oct 29, 2018

@gziolo

This comment has been minimized.

Member

gziolo commented Oct 29, 2018

The issue I see is if they provide a name prop when defining ToolbarButton, it won’t render.

@gziolo

This comment has been minimized.

Member

gziolo commented Oct 29, 2018

https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/button/edit.js#L84

That's another prop we need to take into account. Not sure how it should influence whether we handle keyboard shortcuts (default and custom), as well as custom toolbar controls.

@mtias

This comment has been minimized.

Contributor

mtias commented Oct 30, 2018

Thanks @iseulde

@mtias mtias added the [Type] Task label Oct 30, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment