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

Show the block styles in the block inspector #10543

Merged
merged 4 commits into from
Oct 15, 2018

Conversation

youknowriad
Copy link
Contributor

closes #10520

This PR adds the styles selector to the block inspector like shown in this screenshot.

screen shot 2018-10-12 at 10 22 06

@youknowriad youknowriad added the Needs Design Feedback Needs general design feedback. label Oct 12, 2018
@youknowriad youknowriad added this to the 4.1 milestone Oct 12, 2018
@youknowriad youknowriad self-assigned this Oct 12, 2018
@youknowriad youknowriad requested a review from a team October 12, 2018 09:24
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.

Code part looks great 💯, please wait for the design feedback before proceeding.

I love how composable Gutenberg is, one component which can be reused in so many places ❤️

{ ( fills ) => ! isEmpty( fills ) && (
<div><InspectorControls.Slot /></div>
{ !! blockType.styles && (
<div className="editor-block-inspector__styles">
Copy link
Member

Choose a reason for hiding this comment

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

Minor: We put a class name inside div in here and inside PanelBody for the advanced controls. Is it possible to use a common approach? It would be nice to put it inside PabelBody as we probably will want to remove those wrapping div elements at some point. It's NOT a blocker :)

@@ -46,3 +46,7 @@
width: $icon-button-size;
height: $icon-button-size-small;
}

.editor-block-inspector__styles .editor-block-styles__item {
width: 100%;
Copy link
Member

Choose a reason for hiding this comment

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

Glad it only took this to work :)

Copy link
Member

Choose a reason for hiding this comment

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

I love how composable Gutenberg is, one component which can be reused in so many places ❤️

Yeah :)

@gziolo gziolo added the [Feature] Blocks Overall functionality of blocks label Oct 12, 2018
@mtias
Copy link
Member

mtias commented Oct 12, 2018

"Styles" should probably be placed at the top of all panels.

@mtias
Copy link
Member

mtias commented Oct 12, 2018

After some testing decided to fit them in two columns as it makes a better use of space:

image

@youknowriad youknowriad force-pushed the add/editor-styles-inspector branch from 9c542bf to 4468a54 Compare October 15, 2018 07:43
@youknowriad youknowriad merged commit 1960a48 into master Oct 15, 2018
@youknowriad youknowriad deleted the add/editor-styles-inspector branch October 15, 2018 08:08
@gziolo gziolo added [Type] Task Issues or PRs that have been broken down into an individual action to take and removed Needs Design Feedback Needs general design feedback. labels Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show Style Variations on the Sidebar
3 participants