Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

tweaks on rewards #235

Merged
merged 1 commit into from
Oct 29, 2018
Merged

tweaks on rewards #235

merged 1 commit into from
Oct 29, 2018

Conversation

jenn-rhim
Copy link
Contributor

@jenn-rhim jenn-rhim commented Oct 24, 2018

  • header top padding
  • darker description
  • toggle

Copy link
Contributor

@NejcZdovc NejcZdovc left a 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

@petemill
Copy link
Member

I’d be happy to help clean up tweak PRs like this through review

@jenn-rhim
Copy link
Contributor Author

@petemill that would be helpful!

Copy link
Member

@petemill petemill left a 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;
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link

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.

src/features/rewards/box/style.ts Show resolved Hide resolved
@petemill
Copy link
Member

petemill commented Oct 25, 2018

@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:

  • Is the vertical alignment 👍
  • Which TM position is best, or any changes on my offering?
  • In my version, is the logo vertical centering bothering you? If so, the actual graphic needs to change so that the desired center point of the graphic is in the middle.

Before

image

With this PR

image

With simplified vertical centering PR

Consistent 18px top and bottom padding with rest of height defined by tallest item (bat logo told to have 66px height)

image

note that the logo is actually centered
image

@jenn-rhim
Copy link
Contributor Author

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!

@petemill
Copy link
Member

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

@NejcZdovc NejcZdovc merged commit 195adf8 into master Oct 29, 2018
@NejcZdovc NejcZdovc deleted the rewards-header branch October 29, 2018 16:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants