Skip to content

Comments

Reduced Precision Number Display#8291

Open
Regisle wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
Regisle:ReducedPrecisionNumberDisplay
Open

Reduced Precision Number Display#8291
Regisle wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
Regisle:ReducedPrecisionNumberDisplay

Conversation

@Regisle
Copy link
Member

@Regisle Regisle commented Sep 7, 2024

This reduces the number of digits shown, and instead opts to show SI prefixes (k, M, B, T)
image

I just ended up applying this to everything for now, its much harder to only apply it to dps becouse then I need to tag what does and does not get it applied to, I kept the same level of precision as the base number if it had any, (and 2 decimals if it didnt), I can standardise this to 2 if we want it.

This does not modify the values stored in the xml, only the values displayed in PoB itself.

This does have issues above 15 digits, I can either add more prefixes, or can let it continue in the function through showThousandsSeparators to still get separated, but people shouldnt have numbers that big so I think this is fine

I can cleanup code to not use if statements, but it shouldnt change much, so up to maintainer what they prefer for style

@BrianSchnitzer
Copy link

It's definitely more readable, I like it. Though the SI prefix for billions is G not B right? Which makes me think you might want to just stick with semantic prefixes, and maybe all in the same case (my preference would be lowercase). I don't think anyone is worried about Kelvin just yet, maybe next league...

@Paliak Paliak added the user-interface Changes that only affect the UI label Sep 15, 2024
@Regisle Regisle force-pushed the ReducedPrecisionNumberDisplay branch from 06bd2d0 to 05fe6df Compare October 20, 2024 10:24
if #integer > 12 then
return colour..minus..integer:sub(1, #integer - 12)..fraction:gsub("%.", main.decimalSeparator).." T"
elseif #integer > 9 then
return colour..minus..integer:sub(1, #integer - 9)..fraction:gsub("%.", main.decimalSeparator).." B"
Copy link

Choose a reason for hiding this comment

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

Can we switch that to G like SI prefix and not use billion which have different meaning if you use short or long scale Wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

user-interface Changes that only affect the UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants