microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.94k stars 6.6k forks source link

Win.11 Settings deals different with disabled controls #20173

Open Jay-o-Way opened 2 years ago

Jay-o-Way commented 2 years ago

Description of the new feature / enhancement

In Windows 11 Settings - when a function is disabled, some underlying controls are disabled too. However, this only applies to interactive controls (buttons, checkboxes, etc.). I propose to change this, to follow Windows.

Scenario when this would be used?

Supporting information

Part of Windows 11 Settings.

niels9001 commented 2 years ago

It depends on where you look in Settings I guess :)

You can see below that some controls are disabled (inc. the settings title) or hidden completely.

SettingsIsEnabled

The easiest thing to do is to just hide all settings (under the module ToggleSwitch) - so we don't need to worry about any of the states.

Jay-o-Way commented 2 years ago

Ah yes. I could find about a handful of these cases in all of Win11 settings. In any case there is a situation where the specific setting is made impossible by a different, specific setting. Example: Time (zone) and automatic adjustment.

Hiding ALL the PT settings is overkill. Win11 Settings does show your idea in some areas, but only for a few settings inside/under an Expander. Example: Nightlight and schedule.

Aside from the details, I assume we agree it would be good to have Microsoft PowerToys settings look like Microsoft Windows settings.

Jay-o-Way commented 2 years ago

@niels9001 I started to look into this and found some related issues. Added them in the main comment.

niels9001 commented 2 years ago

@niels9001 I started to look into this and found some related issues. Added them in the main comment.

I agree with most things.. Settings could use a proper refactor at this point (and moving to e.g. MVVM Toolkit so it's easier to maintain). But not expecting this to be a priority atm.

For any visual glitches I'd just collapse all settings panels so we do not need to worry about (incorrect) disabled states 😄.

Jay-o-Way commented 2 years ago

@niels9001 this is what it looks like: https://youtu.be/NPQY8gnXUhU I have a branch with changes already. Would you have some time to dig into the Viewmodels/settings? I don't know how to do that yet.

Jay-o-Way commented 1 year ago

@niels9001 how do you think it looks so far? Something you would want to help with? (That branch is getting merge conflicts)

niels9001 commented 1 year ago

Oh just seeing this now.. Looking at your branch I'm not sure if this would be the right approach: it requires manually setting IsEnabled on every single component for every setting. This introduces a lot of overhead, is error-prone and lots of additional XAML lines😣. There might also be controls that do not have a proper disabled state that are now tackled by the SettingsCard Disabled state.

I'd say that we need to fix the controls that do not render correctly or just collapse all settings when the module is disabled (that would be the easiest/cleanest solution: we don't need to worry about visual or disabled states - everything would just be collapsed).

Jay-o-Way commented 1 year ago

...it requires manually setting IsEnabled on every single component for every setting. This introduces a lot of overhead, is error-prone and lots of additional XAML lines

@niels9001 Is it possible to set some sort of cascading style, similar to what you did with the ChildrenTransitions > SettingsCardsAnimations ?