Suggestion of fixing progress bar to show specific progress from one rank to the next (explained further)
Closed this issue · 0 comments
I wouldn't say this is much of an issue, rather a suggestion:
The progress bar, at high XP amounts always shows 90-100% complete.
If I had to suggest why this issue exists, and how to possibly fix it; I think the math to calculate how far the progress bar should go, needs to be updated/fixed. (I'll provide possible fixes)
EX: When you have 203K XP / 208K XP for your next level up, I can see why the progress bar would calculate that to show almost 100% complete.
208K-203K is only 5K XP away. If you're saying the whole progress bar is worth 208K XP, then 5K would be a small percentage.. (around 2.4% remaining).
How could this be fixed? Instead of calculating the progress bar by only going off of: current XP
, and next level XP required
, it should go off of: pervious level XP required
, current XP
, and next level XP required
.
The reason I recommend this; even at very low XP requirements, take for example the images supplied on the ReadME.md...
Say level 2 level up requires that 300 XP, and level 3 level up requires 500 XP... The progress bar after leveling up to level 2 would already show you are already 3/5 of the way completed... As you are 300/500 XP required.
If canvacard took previous level XP
, current XP
, and next level XP
, the user could see their specific progress from their current rank to next rank.
Another EX: rank 2 = 300 XP, rank 3 = 500 XP, they are at 0/200 XP required for the level up.
This could be done by setting progress bar maximum as: nextLevelXP- previousLevelXP
.
As for showing this progression, simply use: currentXP - previousLevelXP
.
With the above situation: instead of hitting rank 2 to see 3/5 progress already completed, it would now show 0/200 progress completed. (For most scenarios, the goal is to see progression of differences in levels.. So XP from the previous level, to the next level).
TLDR; The progress bar is basically a never ending, never "resetting" to 0% progress bar. It will always show you are part way/most of the way completed to next rank. Especially when the XP is in the thousands or hundreds of thousands.
Using nextLevelXP - previousLevelXP
as the "XP goal/XP required" and currentXP - previousLevelXP
as the progression towards level up, canvacard would fit the use case much better of actually showing your progression within a rank. With this said however, I would still like to have it show 203K / 208K as the XP above the bar, as this is correct, the progression bar alone is not.