Add support for the µWh unit in tooltips showing energy amounts.#4246
Merged
Conversation
Codecov ReportBase: 88.50% // Head: 88.50% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #4246 +/- ##
=======================================
Coverage 88.50% 88.50%
=======================================
Files 282 282
Lines 24762 24764 +2
Branches 6617 6617
=======================================
+ Hits 21915 21917 +2
Misses 2645 2645
Partials 202 202
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
julienw
reviewed
Sep 26, 2022
| expect( | ||
| screen.getByText(/current selection:/).nextSibling | ||
| ).toHaveTextContent('0.005\u2069 mWh'); | ||
| ).toHaveTextContent('5.0\u2069 µWh'); |
Contributor
There was a problem hiding this comment.
Good thing we already had this test :-)
Contributor
|
I'm waiting for a review from the l10n folks before merging. |
flodolo
approved these changes
Sep 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changes made to the tooltip in in #4172 are very useful, but very often when looking at a short range, the value displayed is 0.001 mWh, or 0.000 mWh, which are not helpful.
Adding support for the µWh unit in the tooltip would solve this.
Here is a profile that can be used for testing: https://share.firefox.dev/3SwNOFM
The lowest non-zero value I have seen so far is about 0.003 µWh, when selecting only one sample (and I think this represents the power used by the profiler overhead), so I think we won't need an even smaller unit.
I didn't add the string for µW, as I think we would never see it (the minimum values I have ever seen for instantaneous power are around 10 mW).
deploy preview