Skip to content

Conversation

@emplums
Copy link

@emplums emplums commented Sep 27, 2019

This PR adds the ProgressBar component 🎉

Closes: #560

@vercel
Copy link

vercel bot commented Sep 27, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://primer-components-git-progress-bar.primer.now.sh

@emplums emplums changed the title ProgressBar [WIP] ProgressBar Sep 27, 2019
@vercel vercel bot temporarily deployed to staging October 2, 2019 16:42 Inactive
@vercel vercel bot temporarily deployed to staging October 2, 2019 17:03 Inactive
@vercel vercel bot temporarily deployed to staging October 2, 2019 17:05 Inactive
@vercel vercel bot temporarily deployed to staging October 2, 2019 17:19 Inactive
@vercel vercel bot temporarily deployed to staging October 2, 2019 23:06 Inactive
@emplums emplums changed the title [WIP] ProgressBar ProgressBar Oct 2, 2019
@emplums emplums requested a review from dmarcey October 2, 2019 23:06
@vercel vercel bot temporarily deployed to staging October 2, 2019 23:07 Inactive
Copy link
Contributor

@dmarcey dmarcey left a 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.

| Name | Type | Default | Description |
| :- | :- | :-: | :- |
| progress | Number | | Used to set the size of the green bar |
| large | Boolean | | Uses large variation of progres bar |
Copy link
Contributor

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?

Copy link
Author

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.

Copy link
Author

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>
@vercel vercel bot temporarily deployed to staging October 3, 2019 16:04 Inactive
Emily Plummer and others added 4 commits October 3, 2019 09:09
@vercel vercel bot temporarily deployed to staging October 3, 2019 16:22 Inactive
Co-Authored-By: Derrick Marcey <dmarcey@github.com>
@vercel vercel bot temporarily deployed to staging October 3, 2019 16:24 Inactive
@vercel vercel bot temporarily deployed to staging October 3, 2019 16:39 Inactive
Copy link
Contributor

@dmarcey dmarcey left a comment

Choose a reason for hiding this comment

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

This looks 💯. Thanks!

@emplums emplums changed the base branch from master to release-14.4.0 October 3, 2019 17:48
@emplums emplums merged commit 5fdb958 into release-14.4.0 Oct 3, 2019
@emplums emplums deleted the progress-bar branch October 3, 2019 17:48
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