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
Headings created #855
Headings created #855
Conversation
import css from './Heading.scss'; | ||
|
||
type Props = { | ||
large?: boolean, |
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.
Should all these fields be mandatory rather than optional?
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 think mandatory as then user can use whatever he requires based on props passed. @nshki What are your views on this ?
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 think it makes sense to make the label
prop mandatory, but the rest can stay optional.
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 don't know how to make them optional. What do I have to do ?
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.
You used ?
so that should be enough :)
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.
Okay :)
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.
Overall looks good! Just a couple comments.
import css from './Heading.scss'; | ||
|
||
type Props = { | ||
large?: boolean, |
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 think it makes sense to make the label
prop mandatory, but the rest can stay optional.
return ( | ||
<span> | ||
<div className={labelClassNames}>{label}</div> | ||
</span> |
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.
Instead of having two layers of elements, let's just keep it at one. I think a heading element would make sense here!
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.
Which headings should I use. I am thinking
h1 - for large
h2 - for normal
h3- for small
h4- for text
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 personally think we should be using divs that way if we change the hierarchy of headings we don't need to refactor all of H level headings. I think a div without a parent span should be enough!
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.
okay ! Cool !
@julianguyen Why are the tests failing ? It is showing Rspec problem. How do I fix it ? |
Looks like flakey tests. Argh. I'll look for a way this weekend to reduce the flakiness. Sorry about that! |
Okay ! :) |
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.
LGTM! Thanks so much for working on this and doing an awesome job as always 💜
Thanks a lot @julianguyen ! Your kind words keep me and Prateksha motivated ❤️ I'll merge it after the tests ? |
Yep yep! It should go green 🍀 |
@julianguyen Could you trigger it again ? Tests failed. I do not have write permissions and hence cant trigger it ! |
Looks like there are legitimate issues this time around. Scroll down the page to where the red box is highlighted for more details! Let me know if you need help. I'll be away from internet for an hour or so though. |
@julianguyen Can you please approve again ? The tests finally passed :) |
issue #846 resolved.
Created Headings .