Add tooltip to indicator icon
cassidyjames opened this issue · comments
Problem
A tooltip could provide some extra information before clicking or just some quicker information that feels faster to access without clicking at all.
Proposal
Add a tooltip with the status it is indicating, and maybe the middle-click action:
Battery: 95% charged, Brightness: 70%
Middle-click to show battery percent in panel
Prior Art
We added a tooltip to Applications Menu with a longer description and keyboard shortcuts.
For a start, we could just do:
98% battery
Middle-click to toggle percentage
Ideally, we could have some smarter copy for the battery when it is charging, like we do in the indicator already:
98% charged
Middle-click to toggle percentage
when it's discharging:
98% remaining
Middle-click to toggle percentage
and when it's fully charged but still connected (#155):
Charged
Middle-click to toggle percentage
98% charging
98% remaining
looks better and more uniform. imo
I'm not sure that "98% charging" sounds like proper English
While the proper English would be
98% Charged and Charging
😅
My implementation seems easy to understand IMO.
98% charged doesn't say it's still charging.
It's nitpicking at this point, but still.
I'm not sure "98% battery" sounds right here... How about showing "Battery: 98%, {status}"?
When it's idle:
Battery: 98%
Middle-click to {show/hide} percentage
When it's charging:
Battery: 98%, charging
Middle-click to {show/hide} percentage
When it's discharging:
Battery: 98% remaining
Middle-click to {show/hide} percentage
Fully charged:
Fully charged
Middle-click to {show/hide} percentage
Edit: I just realised idle and discharging should be the same state.
Reopening since this describes more ambitious strings than the branch we just merged
@pongloongyeat I think it really makes sense to just use the same strings as in the indicator itself. So x% remaining
, x% charged
, and Fully charged
. Prepending with the device name might make sense, though, so e.g. on a desktop you might get
Mouse: 55% remaining
Whereas on a laptop showing its internal battery, you'd get:
Battery: 81% remaining
The device name is shown in the indicator as well, so we should use that in the same way.