-
Notifications
You must be signed in to change notification settings - Fork 137
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.
can you please update snapshots, so that travis will not fail
I’d be happy to help clean up tweak PRs like this through review |
f383051
to
53dfba6
Compare
@petemill that would be helpful! |
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.
Left comments about changing the Toggle component separately, since it's a library component, and colors. I also think we can achieve perfect alignment more simply than shifting padding pixel values, as these items still aren't aligned even with these changes. I'll give it a go.
@@ -61,7 +61,7 @@ export const StyledSlider = styled<Props, 'div'>('div')` | |||
height: ${(p) => p.size === 'small' ? '6px' : '8px'}; | |||
margin-top: ${(p) => p.size === 'small' ? '5px' : '8px'}; | |||
width: 100%; | |||
border-radius: 3px; |
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.
@jenn-rhim changes to the Toggle component have wider implications that the rewards header, so should be done separately so we can test and make sure it's what the rest of the team wants. Even in the rewards container this creates alignment issues because the content is wider than 36px, so the width cannot be made smaller simply by changing that one value.
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.
ok. @pete. we can wait.
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's no need to wait on my account.
@jenn-rhim I've got a different solution that I'd prefer because it cleans this up a bit and simplifies the code: It essentially just says here's the graphic, title and toggle and asks the browser to "please vertically center them" :-) Then it can use your explicit consistent top and bottom padding of 18px. This also allows the 'off' version to keep that padding instead of inherit the padding values that were only there to push the 'on' content to the center. This PR can then remain to change the rewards box text color default. We still need confirmation that the Toggle needs to change on every Layout we have. Perhaps that can be explained in a different medium, i.e. does the current Toggle implementation width and border-radius differ from the Sketch library? We can certainly fix it. @jenn-rhim can you take a look at the below and confirm:
BeforeWith this PRWith simplified vertical centering PRConsistent 18px top and bottom padding with rest of height defined by tallest item (bat logo told to have 66px height) |
I think this is good and a better solution. I didn't touch the logo because the storybook structure didn't make it clear how and where I can do that in my Visual Studio. Wanted to do it at a later time and actually thought I'd just express the design intent of centering the logo. So, thank you, you killed both birds! |
Ok let's go with that other PR and remove the vertical alignment from this PR. And since we need to do the general Toggle component changes in another PR, that just leaves the box text color for this one |
91f3048
to
379e227
Compare
379e227
to
9836fdb
Compare
header top paddingtoggle