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

Update UI to better indicate that a block is reusable #5720

Merged
merged 1 commit into from
Mar 23, 2018

Conversation

noisysocks
Copy link
Member

screen shot 2018-03-21 at 13 01 34

Fixes #5225.

Makes it more obvious that a block is reusable by:

  • Making reusable blocks always have a dashed outline.
  • Badging the block with an icon in the bottom right corner.

@noisysocks noisysocks added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Mar 21, 2018
@noisysocks noisysocks requested a review from karmatosed March 21, 2018 02:05
@noisysocks noisysocks added [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) and removed [Feature] Blocks Overall functionality of blocks labels Mar 21, 2018
Copy link
Member

@karmatosed karmatosed left a comment

Choose a reason for hiding this comment

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

Visually this seems a little unbalanced with a caption. I think though it's ok to have as not all pictures will have one. I think a solid default over having it work specifically for captions is probably best. Let's get it in and iterate if it continues to feel weird.

@@ -892,7 +892,9 @@ export default class Dashicon extends wp.element.Component {
height={ size }
viewBox="0 0 20 20"
>
<path d={ path } />
<path d={ path }>
{ title && <title>{ title }</title> }
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, I don't know enough about whether this is something we actually want. Can you explain context for adding this title?

cc @afercia

Copy link
Member Author

Choose a reason for hiding this comment

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

I added it so that curious users can hover their cursor over the icon and get a little explanatory tooltip:

screen shot 2018-03-22 at 10 03 22

Copy link
Member

Choose a reason for hiding this comment

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

Should we use the <Tooltip /> component instead for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

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

👌 done.

Make it more obvious that a block is reusable by:
- Making reusable blocks *always* have a dashed outline
- Badging the block with an icon in the bottom right corner
@noisysocks noisysocks force-pushed the update/add-reusable-block-indicator branch from 6de68cc to 7164afb Compare March 22, 2018 00:19
@noisysocks noisysocks merged commit 0fa6c7e into master Mar 23, 2018
@noisysocks noisysocks deleted the update/add-reusable-block-indicator branch March 23, 2018 05:19
@aduth
Copy link
Member

aduth commented Mar 27, 2018

I'm noticing that this effect is also incorrectly shown in the inserter menu:

image

@noisysocks
Copy link
Member Author

Good catch. #5810 hides the indicator in the preview component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants