-
Notifications
You must be signed in to change notification settings - Fork 6
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
Sidebar styling tweaks #703
Conversation
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.
CR done: 1 minor comment. Also, please solve the merge conflicts.
@@ -65,6 +66,7 @@ const StyledTitle = styled.span` | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
overflow-x: hidden; | |||
color: ${ colors.$palette_grey_dark }; |
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.
Please never use a $palette_...
color. Use $color_...
instead. In this case: $color_headings
Resolve the things that are moved upstream.
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.
Please fix the travis builds that fail.
I don't think it's necessary to add a color to the style guide for this issue but if you think it is important make sure design approves.
style-guide/_colors.scss
Outdated
@@ -2,6 +2,7 @@ $palette_white: #fff; // Safe to use with $palette_grey_text – | |||
// Shades of gray from lighter to darker. | |||
$palette_grey_ultra_light: #f7f7f7; // Safe to use with $palette_grey_text – $palette_black. | |||
$palette_grey_light: #f1f1f1; // Safe to use with $palette_grey_text – $palette_black. | |||
$palette_grey_medium_light: #e2e4e7; |
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.
Did you discuss adding this color to the style guide with design? If not, please first make sure they are ok with it, otherwise use one of the existing colors from the style guide.
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.
This has been discussed with @hedgefield and he was fine with it 😄 But good question to ask!
Acceptance 🚧
For the next tester: don't forget to test the multiple keyword input fields in premium. |
Added comment at color `palette_grey_medium_light` to differentiate between colors from the Yoast Styleguide and the Gutenberg colors. This could be relevant when Gutenberg changes its colors, for example.
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.
CR done 👍
border-top: 1px solid ${ colors.$palette_grey_light }; | ||
border-bottom: 1px solid ${ colors.$palette_grey_light }; | ||
border-top: 1px solid ${ colors.$palette_grey_medium_light }; | ||
border-bottom: 1px solid ${ colors.$palette_grey_medium_light }; |
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.
please do not use $palette_*
variables directly; their aliases should be used instead. I see an alias $color_border_gutenberg
has been created, it should be used here.
padding: 0.75em; | ||
font-size: 1em; | ||
&&& { | ||
box-shadow: inset 0 1px 2px rgba(0,0,0,.07); |
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.
from the style-guide readme:
do not use rgba colors in the palette, instead use the
rgba()
function
I'd agree the wording of this recommendation could be improved. However, it's meant to not introduce in the codebase colors that are not part of the palette. In this case it's a minor issue because it's black but for consistency I'd recommend to use ${ rgba( colors.$color_black, 0.7 ) }
&&& { | ||
box-shadow: inset 0 1px 2px rgba(0,0,0,.07); | ||
border: 1px solid ${ colors.$color_input_border }; | ||
padding: 0.75em; |
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 know this value is pre-existing, but it was discussed at some point because em
values don't make much sense in this context and don't match our 8 pixels based grid size. Both in the standalone app and in Gutenberg the computed value is 9.75px
which will also be subject to browsers rounding. I'd consider to use a different value, in pixels /Cc @hedgefield
box-shadow: inset 0 1px 2px rgba(0,0,0,.07); | ||
border: 1px solid ${ colors.$color_input_border }; | ||
padding: 0.75em; | ||
font-size: 13px; |
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'd keep it to 1em
(which is equivalent to 13px in Gutenberg) unless there are specific reasons to use a value in pixels.
CR 🚧 |
Right now, this can't be tested on the plugin because:
|
@@ -18,7 +19,11 @@ export const YoastInputLabel = styled.label` | |||
`; | |||
|
|||
export const YoastInputField = styled.input` | |||
border: 1px solid ${ colors.$color_input_border }; | |||
padding: 0.75em; | |||
font-size: 1em; |
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.
These padding and font-size will now be overridden by Gutenberg in the sidebar. If we want the input fields in the sidebar to have the same size of the ones in the metabox, these should be moved within the block with higher specificity. Also, the padding is still 0.75em
, as mentioned in a previous comment that computes to 9.75 pixels based on the font size usd in that context. A value in pixels would be preferable.
Current size difference between the input field in the metabox and in the sidebar:
&&& { | ||
box-shadow: inset 0 1px 2px ${ rgba( colors.$color_black, 0.07 ) }; | ||
border: 1px solid ${ colors.$color_input_border }; | ||
border-radius: 0; |
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.
Noticed that setting box-shadow
and border
to a so high specificity prevents the focus style to work properly in the metabox. Instead in the sidebar the focus style is inherited by Gutenberg and it works.
CR 👍 Pushed a couple changes to:
Will split the hardcoded colors in a separate issue. When doing acceptance, please verify the fields (keyphrase, additional keyphrase, synonyms) have the same styling in the metabox and in the sidebar, including the focus style: |
Acceptance done 🎉
|
Summary
This PR can be summarized in the following changelog entry:
Collapsible
component to#e2e4e7
.Collapsible
s within theContentAnalysis
component to$color_headings
(#555
) and remove the boldfont-weight
.max-width
from theContentAnalysis
component to remove the wrapping of the analysis results on big screensYoastInputField
component.Relevant technical choices:
colors.json
.Test instructions
This PR can be tested by following these steps:
Fixes Yoast/wordpress-seo#10596