-
Notifications
You must be signed in to change notification settings - Fork 646
ProgressBar #565
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
ProgressBar #565
Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://primer-components-git-progress-bar.primer.now.sh |
dmarcey
left a comment
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.
What do you think about the best way to support inline progress bars would be? (https://primer.style/css/components/progress#inline-progress)
I don't have a good feel for how often the progress bar is used in this way, or if there is any consistency to the spacing / sizes of the labels or width of the bar.
It definitely doesn't block anything without it, just wasn't sure if there were any common patterns that would be beneficial to define.
docs/content/ProgressBar.mdx
Outdated
| | Name | Type | Default | Description | | ||
| | :- | :- | :-: | :- | | ||
| | progress | Number | | Used to set the size of the green bar | | ||
| | large | Boolean | | Uses large variation of progres bar | |
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.
Primer css has a small variation (https://primer.style/css/components/progress#small-progress). Are we ok not supporting that? Even if we don't want to support it now, should this be a size prop where the only valid values are "large" | undefined?
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.
Good call! I thought about that first but for thought the small variant was the default, but looks like the default is a height of 8px. I just pushed a commit changing the api to barSize because size is taken by styled-system in the COMMON props. I considered just pointing people to the height prop already built into the component via styled-system - but I think in this case we want to set guardrails around the "standard" heights we want people to use with this component.
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.
theoretically users could still use the size or height props and use any pixel value they want, but exposing the barSize prop at least gives users some suggested heights which I think is okay!
Co-Authored-By: Derrick Marcey <dmarcey@github.com>
Co-Authored-By: Derrick Marcey <dmarcey@github.com>
Co-Authored-By: Derrick Marcey <dmarcey@github.com>
dmarcey
left a comment
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.
This looks 💯. Thanks!
This PR adds the ProgressBar component 🎉
Closes: #560