-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create a block to display Toolbar icons on the WordPress front end #1
Comments
I started developing the block in the oik-blocks plugin as I soon encountered a major problem trying to use the
and the console log contained.
Additional complicationsA further complication was that I'd recently updated my Gutenberg source installation to test the fixes for some bugs I'd noticed Node 14 was too high. There were problems with
I asked for some assistance on the #core slack channel The (only ) answer suggests the following.
This single block plugin is the easiest way to implement 1. |
I think this screen capture helps to answer the other question that I was asking myself yesterday which is In this screen capture we see the new Toolbar icons block for the first time.
It turns out this is done because I've coded an empty example in the block registration.
Who'd have thought eh? |
I was telling porkys. The preview is from |
Building the block with Removing the |
New requirementsThinking about how this block might be used I realised it would make a lot more sense for the plugin to be able to produce the predefined toolbar output for a particular block / variation.
The icons should also include the main toolbar icons/ buttons:
and
|
The bane of my life.
And loads more stack trace but nothing useful like tellng me which keys aren't unique. |
Well, the message was telling me what was wrong. I'd stopped looking at the fine detail. I'd resolved the issues with |
I've been battling with CSS all morning. Now Gutenberg's adding paragraphs into my nicely crafted block generated HTML. |
…solve unique key prop problem for Fragment.
…navigation. Add support for left/right block movement controls in the toolbar. Copy more icons not in @wordpress/icons.
…toolbar. Copy more icons not in @wordpress/icons.
…valid value for blocktype attribute
In the
oik-blocks
plugin, for [blocks.wp-a2z.org], and other sites where I document WordPress blocks for the block editor ( called Gutenberg ), I have three blocks which display information about blocks and their icons.These find the icons for each requested block and save the Icon as part of the static content.
In the official documentation for WordPress blocks the documentation for each block discusses the Toolbar icons. The icons are displayed from screen captures of each block.
Everytime a block's toolbar icons are changed the documentation becomes out of date.
With this block I intend to experiment with the ability to document the toolbar icons with programmatic support.
Potential benefits
Requirements
Proposed solution
oik-sb/toolicons
The Toolbar icon block:
e.g For the toolbar icon for aligning text left (
alignLeft
) it will show:where I've invented the brief help based on current documentation for the paragraph block.
The text was updated successfully, but these errors were encountered: