about:memory should format its units

RESOLVED DUPLICATE of bug 633653

Status

()

Firefox
General
--
enhancement
RESOLVED DUPLICATE of bug 633653
9 years ago
7 years ago

People

(Reporter: sdwilsh, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
Instead of just displaying a massive number with no units, we should display units.  Can even use http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/downloads/src/DownloadUtils.jsm#381 to avoid most of the l10n issues.
(Reporter)

Updated

9 years ago
Whiteboard: [good first bug]
I disagree that we should do the same thing.  I do not want rounding, though we could say "bytes" somewhere for those counters if we really think that the audience for that page will be confused.
Severity: normal → enhancement

Comment 2

9 years ago
see also bug 520467

Comment 3

7 years ago
Created attachment 520503 [details] [diff] [review]
Diff for Showing the Correct Unit with memory

This is a patch to Display the unit according to the size of the unit. IE Mb,Kb,Bytes according to the size it is.
(Reporter)

Comment 4

7 years ago
(In reply to comment #3)
> Created attachment 520503 [details] [diff] [review]
> Diff for Showing the Correct Unit with memory
> 
> This is a patch to Display the unit according to the size of the unit. IE
> Mb,Kb,Bytes according to the size it is.
Per comment 1, I'm not sure we actually want to do this (and if we did, we'd want to use the stuff mentioned in comment 0 so we get localization for free).

Comment 5

7 years ago
The link in Comment 0 is 404 currently. I felt it would be better to display in the actual units rather than huge numbers. I can change it to the Comment 1 method if that's the way needed.
(Reporter)

Comment 6

7 years ago
(In reply to comment #5)
> The link in Comment 0 is 404 currently. I felt it would be better to display in
> the actual units rather than huge numbers. I can change it to the Comment 1
> method if that's the way needed.
The file moved, so the link went dead.  Here is a new, more permanent link:
https://hg.mozilla.org/mozilla-central/annotate/4866be78732f/toolkit/mozapps/downloads/DownloadUtils.jsm#l386

As you can see, it does the same thing your patch does.  To localize it, we'll need to dump it in the proper string like so (need this string in browser for this page):
https://hg.mozilla.org/mozilla-central/file/4866be78732f/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.properties#l78

It would be great if shaver could chime in on this.

Comment 7

7 years ago
IMHO:  
These suggestions are not fixing anything.  Is there a screen real estate issue?

The suggestions to have a short number with a units abbreviation is actually a slight bit harder for the user to resolve which are the biggest numbers.  Right now big numbers "look" big.

If this kind of info really needs to be squeezed into a tight spot, I would consider just displaying everything in MB.  For the vast majority of use-cases anything less than a MB is insignificant.  Forcing all values into a single unit is best when user needs to compare lists of values.

Comment 8

7 years ago
The patch in bug 633653 does something similar to this btw.

Updated

7 years ago
Duplicate of this bug: 520467

Updated

7 years ago
Blocks: 640791
Bug 633653 will add units and a whole lot of other stuff.  Marking this as a dup.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 633653

Updated

7 years ago
Whiteboard: [good first bug]
You need to log in before you can comment on or make changes to this bug.