Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Progress bar with percentages #2008

Closed
alfetopito opened this issue Dec 17, 2021 · 1 comment
Closed

Progress bar with percentages #2008

alfetopito opened this issue Dec 17, 2021 · 1 comment
Assignees
Labels
app:CowSwap CowSwap app Claim Issues related to 'Claim' feature Critical Severity indicator for defects. ndicates complete shut-down of the process. Nothing can proceed furt Protofire Handled by Protofire development team

Comments

@alfetopito
Copy link
Contributor

Description

Create a progress bar component with percentages on top.
Clicking on the percentages should update the bar.

Screenshot from 2021-12-17 13-15-24

Proposal

This component will later be used in the claiming page.
The value will be read from and persisted to input state (to be defined).
Bar should be updated on percentage click as well as manual input change.

Maybe this state will be stored on redux? Still not defined.

For further context, this what what the surrounding page will look like:
Screenshot from 2021-12-17 13-34-05

Additional context

@alfetopito alfetopito added app:CowSwap CowSwap app Protofire Handled by Protofire development team labels Dec 17, 2021
@elena-zh elena-zh added the Critical Severity indicator for defects. ndicates complete shut-down of the process. Nothing can proceed furt label Dec 20, 2021
@alfetopito
Copy link
Contributor Author

alfetopito commented Jan 6, 2022

Proposed interface for the bar component:

type Props = {
  percentage: number // between 0 - 100
  onPercentageClick: (percentage: number) => void
}
  • The callback onPercentageClick will be called when there's a click on any of the percentage values on the bar.
  • The parent component will calculate and pass down the percentage prop on input changes.
  • Any input outside the range 0-100 should round to nearest edge (negative goes to 0, over 100 goes to 100)
  • Decimal numbers are allowed as input (0.5, 44.23132)

@anxolin anxolin added the Claim Issues related to 'Claim' feature label Jan 12, 2022
mergify bot pushed a commit that referenced this issue Jan 17, 2022
…2060)

# Summary

Fixes #2008 

New Progress Bar component was created, values can be set by clicking the numbers at the top of the bar or via dragging the bar or clicking at any bar point.
![image](https://user-images.githubusercontent.com/25584298/148546035-98851851-a95b-41a3-a611-4a2b5a31d461.png)


  # To Test

1. Open the page `Profile`
The bar is at the bottom of the form
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:CowSwap CowSwap app Claim Issues related to 'Claim' feature Critical Severity indicator for defects. ndicates complete shut-down of the process. Nothing can proceed furt Protofire Handled by Protofire development team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants