-
Notifications
You must be signed in to change notification settings - Fork 559
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
fix(Progress): percentage calculation #939
Conversation
@DarkGhostHunter WDYT? |
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
Visually, the progress bar caps at 100%, so the percent should also be capped at that too. Since there is no sense in having "101% progress", this fix is correct. π The problem comes when the dev expects a value over 100% in the slot, which currently does. In this case it should be added to the docs that the |
@maxsteinwand @DarkGhostHunter Hi Hope you are well. Think this should be partially reverted to show values over 100, but keep the default at 100, any reason not? If you want to track a workout and the user does more than required wouldn't it be correct that bar is full but user did more than 100% of the workout meant for them? Additionally, it seems strange to alter with the user set value?? Additionally in docs still is a "max" attribute but doesn't seem to do anything? Struggling to understand the logic of this π€· |
Nope.
Is a moot point since the developer already has access to the real value on the parent.
You can put that value outside the progress bar itself. The inner value represents the progress of the bar, not the progress of the task, like "246".
It does not alter it. I only limits it inside the context of the progress bar.
It does. It makes the 100% relative to that maximum number. For example, if you have 5 tasks, you set the maximum value to "5", hence the 100%. For each task done, the progress bar will be filled 20%. If you don't do that, then the progress bar would never be complete since each task would be 1%. This kind of questions means that the docs need a little refactor to be more clear. |
π Linked issue
Fixes #938
β Type of change
π Description
When the
value
exceeds the custommax
value percent will be 100.π Checklist