styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Render the Percentage in the Progress component

Open emersonlaurentino opened this issue 6 years ago • 7 comments

We need to find a place to render the percentage in the Progress component of line type.

ref: #924

emersonlaurentino avatar Nov 07 '19 14:11 emersonlaurentino

In the Uber Component Library the ProgressBar component has a prop called showLabel that if checked with true, the component will display the percentage number in the bottom center.

I think we could have two props:

  • showLabel: To show percentage
  • labelPlacement: To define position of percentage (top, topLeft, topRight, right, bottom, bottomLeft, bottomRight, right)

emersonlaurentino avatar Nov 11 '19 19:11 emersonlaurentino

I like this suggestion, I don't see the progress bar being used always in a specific way. It's an atom, there are many applications for it and we can't lock down a position for the percentage.

davicostalf avatar Nov 14 '19 14:11 davicostalf

@rsimoens @davicosta99 we already have some visual iterations of this issue at Figma. Can we use these? Screen Shot 2020-03-06 at 02 55 41

jonathasbsouza avatar Mar 06 '20 05:03 jonathasbsouza

@jonathasbsouza we currently have this progress (called a line), but it does not have the percentage value.

ref.: Progress in VTEX Styleguide

emersonlaurentino avatar Mar 06 '20 17:03 emersonlaurentino

@emersonlaurentino those images I attached are from our official styleguide file at Figma, so I think we can progress with that.

Screen Shot 2020-03-06 at 14 55 22

jonathasbsouza avatar Mar 06 '20 17:03 jonathasbsouza

As this is a new feature to the component (even if already existing) I think it is valid to be implemented and available in Styleguide 10.

I will add this Issue to the project.

emersonlaurentino avatar Mar 06 '20 18:03 emersonlaurentino

Awesome! Can you change the label to Design Done?

jonathasbsouza avatar Mar 06 '20 18:03 jonathasbsouza