Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Additional CSS Class Support #304

Merged
merged 5 commits into from
May 19, 2019
Merged

Conversation

lukecarbis
Copy link
Member

This is a simple fix, but comes with our first "dot tip".

Testing the Advanced CSS Class
Include the following in your template:

<p><?php block_field( 'className' );?></p>
<p><?php echo block_value( 'className' ); ?></p>

Testing the DotTip

  1. You've probably disabled tips. It's easy to do. There's an [x] button included with all tips (including the default ones that show when you first use Gutenberg). Pressing this disables all tips permanently.

Screen Shot 2019-05-17 at 8 49 36 am

To re-enable tips you've got to clear your browser cookies, or even easier, type the following into your console:

wp.data.dispatch( 'core/nux' ).enableTips();

This time clear the default tips by pressing "See next tip" > "See next tip" > "See next tip" > "Got it".

  1. Add a block. It's got to be a block that you have authored – we don't show the tip on blocks that you haven't authored, so that it doesn't show up for non-block-lab blocks, and it doesn't show for editors / clients who are using your blocks.

  2. Click the block to show the edit interface, then in the sidebar, open the Advanced pane. You should see something like this:

Screen Shot 2019-05-17 at 8 48 06 am

Fixes #253.

Docs needed (@RobStino?)

Copy link
Collaborator

@kienstra kienstra left a comment

Choose a reason for hiding this comment

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

Looks Good

Hi @lukecarbis,
This looks really good. The DotTip is a good UX.

Thanks for your great description here.

There are a few minor points here, but feel free to merge once you're satisfied.

block-lab-test

js/blocks/loader/advanced.js Show resolved Hide resolved
js/blocks/loader/advanced.js Show resolved Hide resolved
php/blocks/class-loader.php Show resolved Hide resolved
php/blocks/class-loader.php Outdated Show resolved Hide resolved
php/blocks/class-loader.php Outdated Show resolved Hide resolved
@lukecarbis lukecarbis requested a review from kienstra May 19, 2019 00:16
Copy link
Collaborator

@kienstra kienstra left a comment

Choose a reason for hiding this comment

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

Approved

Hi @lukecarbis,
Thanks for your responses and updates. I think this is ready to merge when you'd like.

@lukecarbis
Copy link
Member Author

Thank you so much Ryan!

@lukecarbis lukecarbis merged commit bb9b791 into develop May 19, 2019
@lukecarbis lukecarbis deleted the bugfix/253-custom-css-class-2 branch May 19, 2019 09:18
@kienstra
Copy link
Collaborator

Thank you, this is an important feature.

lukecarbis added a commit to lukecarbis/block-lab that referenced this pull request Aug 18, 2019
…-css-class-2

Additional CSS Class Support
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding custom CSS causes error
2 participants