-
Notifications
You must be signed in to change notification settings - Fork 621
Heading tests, testing cleanup #41
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
Conversation
Also, why isn't this branch being built by Travis? 🤔 |
We don't have private repositories turned on for travis-ci 🤑 |
We do, though! https://travis-ci.com/primer/primer-react |
Ahhhh:
|
Anyway, how about a review? 😊 |
src/Heading.js
Outdated
Heading.h3.defaultProps = {m: 0, fontSize: 3} | ||
Heading.h4.defaultProps = {m: 0, fontSize: 2} | ||
Heading.h5.defaultProps = {m: 0, fontSize: 1} | ||
Heading.h6.defaultProps = {m: 0, fontSize: 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.
TODO: don't tie font size to heading level. We want people to be more intentional about how they use headings.
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.
We want this:
<Heading tag='h1' fontSize={6} />
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.
Clean up based on review meeting and ship to the release branch. Then I'll update my prs
Heading.h{1-6}
and updates the examples to use the<Heading tag='h{1-6}'>
form.render()
function defined in each of our component test files.Note that if we change the
defaultProps
for any of our headings now, we'll probably need to update the tests. The tests are also a bit brittle in that rendered classnames are expected to be in a specific order. We need to decide whether this is important and update the equality tests accordingly (for instance, using a Set to compare equality instead of an array).