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

Jw grid font #1191

Merged
merged 8 commits into from
Aug 15, 2017
Merged

Jw grid font #1191

merged 8 commits into from
Aug 15, 2017

Conversation

jpwentz
Copy link
Contributor

@jpwentz jpwentz commented Aug 3, 2017

Peer Review of Simple Font Changes

Copy link
Contributor

@jeremiak jeremiak left a comment

Choose a reason for hiding this comment

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

Left a few comments about refactoring some of the CSS classes and adjusting the font size down to 12px.

@@ -17,7 +17,7 @@ const YAxis = ({ tickCt, scale, width }) => {
return (
<g key={i} transform={`translate(0, ${pos})`} className="tick">
<line x2={width} y2="0" strokeOpacity={i === 0 ? '1' : '.25'} />
<text fill="#000" x="-32" y="0" dy=".32em">{fmt(v)}</text>
<text className="fs-14" fill="#000" x="-32" y="0" dy=".32em">{fmt(v)}</text>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a totally fine approach, but we currently set the font size of the .axis elements in _viz.scss. I think we should either refactor out the parts of .axis that we already have classes for or just adjust the font-size in .axis.

To my mind, the tradeoff is that this style of css leads to a lot more stuff in the HTML attributes and so for SVG it might be nice to keep the styling in component style classes (like .axis) and for the rest of the HTML we can use the simple classes approach.

On the other hand, it makes a ton of sense to keep things as consistent as possible across the code base which is a compelling argument for refactoring out the aspects of .axis that we have elsewhere.

@jpwentz which approach do you prefer?

@@ -155,7 +155,7 @@ class TrendChart extends React.Component {
until={until}
/>
<div className="mb2 clearfix">
<div className="sm-col mb1 sm-m0 fs-10 bold monospace black">
<div className="sm-col mb1 sm-m0 fs-14 bold monospace black">
Copy link
Contributor

Choose a reason for hiding this comment

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

I think 14px might be a bit big given the rest of the surrounding content's font sizes:

10px
screen shot 2017-08-07 at 11 37 40 pm

12px
screen shot 2017-08-07 at 11 37 57 pm

14px
screen shot 2017-08-07 at 11 38 32 pm

I'd vote upping the font size to 12px for now.

BTW, @brendansudol great work on that alternating X axis label hiding! It looks just as good at 10px as 14px:

@jpwentz
Copy link
Contributor Author

jpwentz commented Aug 11, 2017

This has been addressed.

@jpwentz jpwentz dismissed jeremiak’s stale review August 11, 2017 14:41

I have addressed this review

@jeremiak
Copy link
Contributor

👍 Nice

@jeremiak jeremiak merged commit d541a5f into master Aug 15, 2017
@jeremiak jeremiak deleted the jw-grid-font branch August 15, 2017 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants