Skip to content
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

Media: Show Storage Count to 2 Decimal Places When <1% #86124

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

Aurorum
Copy link
Contributor

@Aurorum Aurorum commented Jan 8, 2024

Fixes #83556

Proposed Changes

  • Shows the Media storage count to 2 decimal places instead of as an integer.

The idea - in theory anyway - is that this will stop users contacting Support concerned about a 'bug' of their storage count not working; in practice, their storage capacity is just so great that it still rounds to 0%.

I don't mind restricting this to sites with less than 1% of storage, but I didn't see the harm in including this for all sites.

Testing Instructions

A code review is probably sufficient to be honest, but you can see this in the Media Library. The 0% issue is most notable on a site with a lot of storage and a fair amount of files, causing users to be confused about the storage limit breaking.

Screenshot 2024-01-08 at 23 26 18

cc @paulopmt1 @lupus2k: looks like you touched this last - would you mind giving it a quick spin if you have a second? Thanks!

@paulopmt1
Copy link
Contributor

I remember we intentionally rounded those numbers in the past (4225-gh-Automattic/dotcom-forge#issuecomment-1771983829). @obenland, would you recall if that was also to avoid support?

If you decide to move that forward @Aurorum, please also check the native version of it to ensure it works the same way: 4225-gh-Automattic/dotcom-forge#issuecomment-1766931148

@Aurorum
Copy link
Contributor Author

Aurorum commented Jan 9, 2024

Thanks! I'm afraid that's a private repo so I can't see what it refers to, but I think this rounding would only be for the display anyway?

@paulopmt1
Copy link
Contributor

Thanks! I'm afraid that's a private repo so I can't see what it refers to, but I think this rounding would only be for the display anyway?

That's correct, the rounding was only for displaying it to the user.

@obenland
Copy link
Member

this will stop users contacting Support concerned about a 'bug' of their storage count not working

Is that something that happens on a wider scale? If not, let's leave it as is and keep it visually simpler.

@Aurorum
Copy link
Contributor Author

Aurorum commented Jan 10, 2024

@obenland I've see it pop up myself in Support every now and then, but cc @cuemarie who made the original issue for details.

I've switched it so that it's only 2 decimal points under 1% though. I think that achieves best of both worlds?

@Aurorum Aurorum changed the title Media: Show Storage Count to 2 Decimal Places Media: Show Storage Count to 2 Decimal Places When <1% Jan 10, 2024
@cuemarie
Copy link

I've switched it so that it's only 2 decimal points under 1% though. I think that achieves best of both worlds?

Apologies for my delay @Aurorum – I think this makes perfect sense! The only time I run into this in chat is when there is less than 1% usage, as customers think there's a bug because their usage then says 0%, so I think this would sufficiently address that.

Copy link
Contributor

@paulopmt1 paulopmt1 left a comment

Choose a reason for hiding this comment

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

It's working as expected! Nice work @Aurorum!

Less than 1%: More than 1%
image image
image image

@paulopmt1 paulopmt1 merged commit e300d53 into Automattic:trunk Sep 27, 2024
6 checks passed
@paulopmt1
Copy link
Contributor

Thanks so much for your contribution @Aurorum!

TimBroddin pushed a commit that referenced this pull request Sep 30, 2024
* Media: Show Storage Count to 2 Decimal Places

* Only apply to <1%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Calypso Media Usage - Improve how we display % storage used for low-media sites
4 participants