[NightColor] fix for plasmoid status and tooltip subtext
Needs RevisionPublic

Authored by pdabrowski on Mar 10 2020, 11:06 PM.

Details

Reviewers
zzag
ngraham
Group Reviewers
Plasma
VDG
Summary

Fix for NightColor plasmoid active/passive status and its tooltip subtext.
Especially noticeable when the tray icon is set to "Show when relevant".

Tray icon is visible:

  • in timed modes: when active (during night time) or inhibited
  • in "Always on" manual mode: when active (not inhibited)
Test Plan

Current behavior:

ModeConditiontray icon when Activetray icon when Inhibited
Timeddaytimehiddenvisible
Timedtransitioning period to warm colorsvisiblevisible
Timednighttimevisiblevisible
Timedtransitioning period back to normalhidden [1]visible
Always on (manual)-visiblevisible [2]

[1] this is a bug, icon should be visible here, just like when transitioning to warm colors
[2] why? this duplicates the behavior for "Always shown" tray icon, giving user no choice

New behavior:

ModeConditiontray icon when Activetray icon when Inhibited
Timeddaytimehiddenvisible
Timedtransitioning period to warm colorsvisiblevisible
Timednighttimevisiblevisible
Timedtransitioning period back to normalVISIBLE [1]visible
Always on (manual)-visibleHIDDEN [2]

UPPERCASE = changed bahavior
[1] fixed
[2] now, with simple tray icon configuration, user can decide if the icon is visible or not here

In all other cases (!monitor.available / !monitor.enabled / !monitor.running) the icon should obviously be hidden.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
pdabrowski created this revision.Mar 10 2020, 11:06 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 10 2020, 11:06 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
pdabrowski requested review of this revision.Mar 10 2020, 11:06 PM

more context lines in diff

zzag added a comment.Mar 11 2020, 7:14 AM

Fix for NightColor plasmoid active/passive status

Could you please describe what's wrong with it right now?

zzag added inline comments.Mar 11 2020, 7:39 AM
applets/nightcolor/package/contents/ui/main.qml
36–38

We want to keep the applet visible even if Night Color is inhibited so user can quickly uninhibit it. With this patch, the user would have to click the system tray to show hidden icons and after that click the applet icon to uninhibit Night Color.

pdabrowski edited the summary of this revision. (Show Details)

new patch

pdabrowski marked an inline comment as done.Mar 12 2020, 12:14 AM
pdabrowski added inline comments.
applets/nightcolor/package/contents/ui/main.qml
36–38

We want to keep the applet visible even if Night Color is inhibited so user can quickly uninhibit it.

You are right. I have modified the patch to show the icon when inhibited in timed modes.

pdabrowski marked an inline comment as done.Mar 12 2020, 12:20 AM
In D27972#625596, @zzag wrote:

Fix for NightColor plasmoid active/passive status

Could you please describe what's wrong with it right now?

I wanted the icon to hide when Night Color is not affecting color correction (both in timed modes and manual "Always on" mode). Currently the icon is almost always visible.
See updated description.

pdabrowski marked an inline comment as done.Mar 12 2020, 12:20 AM
zzag added inline comments.Mar 12 2020, 7:42 AM
applets/nightcolor/package/contents/ui/main.qml
36–38

Why only in timed modes?

I think this needs a VDG/Usability discussion.
Having the icon show when color correction is active (the status quo) imho makes sense.

zzag added a reviewer: VDG.Mar 12 2020, 7:48 AM

I think this needs a VDG/Usability discussion.

Yes!

I think this needs a VDG/Usability discussion.
Having the icon show when color correction is active (the status quo) imho makes sense.

I agree.

Could you update the description to be a bit more clear about what exactly has been changed for which cases?

pdabrowski updated this revision to Diff 78315.EditedMar 23 2020, 10:05 PM
pdabrowski edited the summary of this revision. (Show Details)
pdabrowski edited the test plan for this revision. (Show Details)

Could you update the description to be a bit more clear about what exactly has been changed for which cases?

Added a detailed comparison of the current and new behavior.

ngraham accepted this revision.Mar 24 2020, 3:59 AM

@zzag, is this okay for you?

This revision is now accepted and ready to land.Mar 24 2020, 3:59 AM
zzag added a comment.Mar 24 2020, 8:15 AM

in "Always on" manual mode: when active (not inhibited)

I still don't understand why we should hide the applet. If VDG is okay with such behavior, then feel free to push this change, I won't object or anything.

applets/nightcolor/package/contents/ui/main.qml
26

Please do not use org.kde.colorcorrect in this applet. If you need operation mode constants, please add them to the Monitor class. See D26688 for more details.

ngraham requested changes to this revision.Mar 24 2020, 1:46 PM
In D27972#633289, @zzag wrote:

in "Always on" manual mode: when active (not inhibited)

I still don't understand why we should hide the applet. If VDG is okay with such behavior, then feel free to push this change, I won't object or anything.

Actually yeah, I agree with this. I didn't notice that change, sorry. If the user has deliberately turned it always on, then having the tray icon always active by default makes it into a quick on/off toggle, which I think is handy. Sorry for missing this with my earlier review.

This revision now requires changes to proceed.Mar 24 2020, 1:46 PM
pdabrowski added a comment.EditedApr 10 2020, 3:32 PM

Maybe I should explain my motives and probably that would let us (including me) understand the goal better.

I use Night Color only occasionally and I want to be able to turn it on *manually*.
And I like my tray clean.
So I only need this icon when I have it manually engaged (i.e. un-inhibited).

But I perfectly understand the need for Timed modes, which are a great feature.
So they should provide a good user experience as well.

CURRENT STATE:

Currently there is no Manual mode available. You can select "Always on" in configuration, which will engage it every time you log in. This is not good.

And also the "[ ] Activate Night Color" checkbox together with the possibility to inhibit the feature is confusing.
There seem to be two separate ways of controlling this feature.

PROPOSAL:

Maybe we could go with something like this:

  • Night Color system is always enabled (no "[ ] Activate Night Color" checkbox in the configuration)
  • by default set to Manual mode (see screenshot below)
  • Manual mode has a configuration option for setting the state at logon: "[ ] Active at logon" (unchecked by default)
  • the only way to disable the entire feature is what currently is named inhibition , which should be renamed to Disable

We could also polish the naming... current wording used all over this feature are very confusing:

  • "activate" in the configuration
  • "Always on" as activation time in the configuration
  • "active", "inhibited", "not running", "disabled" in the tooltip
  • "On" and "Off" in the toast OSD message

My suggestion (consistent with the proposal above):

  • "Manual" mode in the configuration
  • "active", "inactive" (used in tooltip) = Night Color in effect or not
  • "disabled" (used both in the tooltip and OSD) = what currently is named inhibition

CONCLUSION:

So with the Manual mode you have 2 states toggled from the tray icon: "disabled" or "active".
And in Timed modes you can have it "disabled" from the tray icon or otherwise "inactive" (daytime) and "active" (at night).

TRAY ICON:

As for the tray icon visibility (for the states above):

  • Manual mode:
    • disabled = invisible ("Night Color is disabled")
    • active = VISIBLE ("Night Color is active")
  • Timed mode:
    • disabled = VISIBLE ("Night Color is disabled")
    • inactive = invisible ("Night Color is inactive")
    • active = VISIBLE ("Night Color is active")

And of course after setting the tray icon to "Always shown":

  • Manual mode:
    • disabled = VISIBLE ("Night Color is disabled")
    • active = VISIBLE ("Night Color is active")
  • Timed mode:
    • disabled = VISIBLE ("Night Color is disabled")
    • inactive = VISIBLE ("Night Color is inactive")
    • active = VISIBLE ("Night Color is active")
pdabrowski added a comment.EditedApr 10 2020, 4:24 PM

I totally missed the D26688 request.
And it proposes some great ideas.
So just to update my mockup accordingly:

As for the tray icon visibility (for the states above):

  • Manual mode:
    • disabled = invisible ("Night Color is disabled. Click to enable.")
    • active = VISIBLE ("Night Color is active. Click to disable.")
  • Timed mode:
    • disabled = VISIBLE ("Night Color is disabled. Click to enable.")
    • inactive = invisible ("Night Color is inactive. Activation will begin at...")
    • active = VISIBLE ("Night Color is active. Colors will return to normal at...")

And of course after setting the tray icon to "Always shown":

  • Manual mode:
    • disabled = VISIBLE ("Night Color is disabled. Click to enable.")
    • active = VISIBLE ("Night Color is active. Click to disable.")
  • Timed mode:
    • disabled = VISIBLE ("Night Color is disabled. Click to enable.")
    • inactive = VISIBLE ("Night Color is inactive. Activation will begin at...")
    • active = VISIBLE ("Night Color is active. Colors will return to normal at...")

Plus "activating" and "deactivating" states in Timed mode, treated exactly like the "active" one.

It almost sounds like we need a "full manual control" mode where it's expected that the system tray applet or keyboard shortcut will be used to turn it on and off on demand.

It almost sounds like we need a "full manual control" mode where it's expected that the system tray applet or keyboard shortcut will be used to turn it on and off on demand.

Well, isn't this what current inhibition mode does anyway? Both in manual/always-on and in timed modes.

And yes, I have a global shortcut set for this tray icon :) And it somewhat works.
The only annoying issue is that the tray widget for "Night Color Control" gets shown whenever I press this shortcut.

And btw "Night Color Control" widget is completely empty. And it is possible to run into this empty widget - either with the shortcut as mentioned above, or using the vertical bar with icons when the tray icon is hidden.
This widget could probably contain (at least) the information from the tooltip as mocked above or in D26688. Or maybe even some settings (color temperature slidebar?).

This widget could probably contain (at least) the information from the tooltip as mocked above or in D26688. Or maybe even some settings (color temperature slidebar?).

You beat me to it; adding a slidebar to manage the color temperate on-the-fly is the next logical evolution here (just like the Display Brightness Control widget, but hopefully with a much greater measure of aesthetic finesse).