RFC: [Device Notifier] Provide inline feedback
Review Request #126688 - Created Jan. 9, 2016 and submitted
|Kai Uwe Broulik|
Instead of showing a detached status bar with the device name, show the message below the device.
When removing a device, device notifier will pop up and a "You can now safely remove this device" message will show up; after 5 seconds the message and the device will disappear. When trying to unmount a device and it fails, device notifier will show up with an error message that will stay there until device notifier is closed or another message appears.
This review consists of two patches: one for fixing the device notifications engine's wording (I'm open to better verbalizations) and one for the device notifier
There a still a couple of glitches:
- the layout doesn't properly reset at times (eg. the delegate height doesn't update) or fails to show certain items (also looks like a Qt bug)
- sometimes the delegates suddenly overlap each other beacuse the section thing gets confused when the one item is already gone in the model (looks like a Qt bug)
- the "no devices" heading doesn't know that there's still a pseudo-device there
- it cannot actually highlight the device that was safely removed (it's no longer part of the model and thus has no index), we could do a hack for this though
- the message doesn't disappear reliably or spontaneously re-appears
- depending on your screen dpi you sometimes get a black and white Info icon but the error thing is always red, there's a smaller variant for the former but not the latter apparently, also it seems we lack a proper "task done" icon, Oxygen had one
Gut feeling feedback:
- the error message's icon could take the place of the eject icon
- the "safely remove" icon could go away, text made italic (not sure if there's prior art in the HIG, I'm just imagining it would look less invasive)
I'd set the dely until the popup closes again shorter, though. This is just a feedback message that things happened as expected, so throwing the popup in the user's face for five seconds is too much distraction in that case (especially as nothing bad happens if the user misses the feedback). I'd just use the standard notification delay (or is that five seconds?). When unmounting failed, however, it should stay for five seconds because it's important that the user knows that the should not unplug the device.
- Use emblem icon
- Try harder to prevent the message from spontaneously re-appearing
- Change wording from "The device can now be safely removed" to "This device can now be safely removed"
Revision 2 (+211 -281)
- Work around the "no devices" heading overlapping if there's a delayRemove item
- Use emblem-information (I did not want to use emblem-success as it looks the same as the mounted icon) and emblem-error , please add them to the Breeze icon theme
- Try harder to keep the delegate heights sane
- Reduce device disappearance delay to 3s (from 5s) to be consistent with the time at which it will collapse again
Someone suggested to style it like this: https://i.imgur.com/nPVhWr9.png
While I'm not a huge fan of that excessive green background I agree that perhaps the message should be more prominently displayed, ie. moving back to showing the icon next to the message and maybe adding a faint highlight behind the item.
Status: Closed (submitted)
Submitted with commit 1ed7209f08aa69cec7847c606da8a2fc091dc603 by Kai Uwe Broulik to branch master.