-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Polish the button #3427
Polish the button #3427
Conversation
This fixes #3283. This is a redesign of the button block to be more neutral looking. In addition to this, it makes the URL aspect inline, so it behaves just like how a caption does on an image.
blocks/library/button/index.js
Outdated
@@ -130,6 +119,18 @@ registerBlockType( 'core/button', { | |||
</InspectorControls> | |||
} | |||
</span>, | |||
focus && ( | |||
<form | |||
className="blocks-format-toolbar__inline-link-modal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not want to share the style of this class with other blocks, it may make sense to rename the classname to match our guidelines. Something like blocks-button__inline-link
. Ans style it as part of the editor.scss
of the button block
Thanks for the review, good stuff all around. I'll fix it next week. Any idea why Travis is complaining btw? Also, have a nice weekend! |
blocks/library/button/index.js
Outdated
/> | ||
<IconButton icon="editor-break" label={ __( 'Apply' ) } type="submit" /> | ||
</form> | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasmussen Yep, travis is failing because of a missing trailing comma after this parenthesis. You should definitely install an eslint
plugin to your favorite IDE ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💓💓👍🌌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a nice weekend Joen :)
I will hold off my design review until you have done those fixes @jasmussen - just let me know when want one. |
- Move to button-specific class - Align url to match button alignment - Fix input field overlap
Codecov Report
@@ Coverage Diff @@
## master #3427 +/- ##
==========================================
+ Coverage 33.8% 34.69% +0.89%
==========================================
Files 249 250 +1
Lines 6713 6842 +129
Branches 1207 1262 +55
==========================================
+ Hits 2269 2374 +105
- Misses 3754 3773 +19
- Partials 690 695 +5
Continue to review full report at Codecov.
|
Based on quick search, this looks like the widely used eslint atom plugin https://atom.io/packages/linter-eslint (I don't use atom myself though) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Good stuff! One question and one remark:
|
Perhaps it would be nice to be able to show little ? help icons, with elaborating tooltips. In this case, "Stand on a line" is basically the same as applying
I don't disagree. Can you think of other areas where an "applied" affordance would be helpful? The pattern emulated with this link was the caption on images. If we can think of a few places, it might be good to ticket separately and then reference all the places where such an affordance would help. |
Ahhh, that's something I would call "full width" :) so coming up with a good general term for that would be useful. It's an issue with images too, though not so much the language there, but the concept, the difference between full width and center aligned: #3325. If we can come up with a good term we can use the 'stand on a line' toggle to solve the problem there too. 👍 Making a separate issue for the Apply button is a good idea. Off the top of my head, it will be used in links, captions, buttons, permalink.. cover image has a link field too, maybe the shortcode block. |
Just a little note, I am cautious of us adding help icons. I am totally into us being clearer, but if we have to add a help icon maybe we aren't being in first place? That said, help has a place, it should always though mean we look first at if we can not add it. I do think 'Stand on a line' could do with some work. Maybe literally say what it does? "Ensure clears to new line" or something a little less clumsy. As for an applied notice, I agree, it's probably a useful feedback mechanism. I started a ticket to consider the possible areas this could be. #3461 |
This fixes #3283.
This is a redesign of the button block to be more neutral looking. In addition to this, it makes the URL aspect inline, so it behaves just like how a caption does on an image.
GIF: