VSCodeTriageBot / testissues

Clone of the vscode issue stream.
36 stars 22 forks source link

UI: Make workspace/foldings settings reflect more clearly true/false/unchanged #48711

Open VSCodeTriageBot opened 3 days ago

VSCodeTriageBot commented 3 days ago

This issue is somewhat related to -188612, but I'd like to propose this as a mostly UI change to make the current functionality more clear.

Currently, for workspace or folder settings, we can see (Modified elsewhere) for settings which have been set in the User settings:

image

It seems a bit unclear to me what the values of a checkbox actually mean in Workspace settings. My mental model, possibly wrong, is that the Workspace settings selectively override User settings. Generally, I would expect to have approximately three kinds of values (for boolean settings) in Workspace settings: set to true at this level, set to false at this level, and leave unchanged (which might be shown as true or false as inherited, though I'd hope in a different way than the previous two).

Instead, I see this, for example, for Text Editor -> Multi-File Diff Editor:

-- Step 0

--- User

[✔] Experimental: Enabled [ ] Minimap: Autohide [✔] Minimap: Enabled

--- Workspace

[✔] Experimental: Enabled [ ] Minimap: Autohide [✔] Minimap: Enabled

-- Step 1

Now, in User, I unset Experimental: Enabled:

--- User

[ ] Experimental: Enabled [ ] Minimap: Autohide [✔] Minimap: Enabled

--- Workspace

[✔] Experimental: Enabled (Modified in User) [ ] Minimap: Autohide [✔] Minimap: Enabled

Comment: What does having the checkmark in Workspace's version of Experimental: Enabled mean? I would expect it to mean that the setting is true at the Workspace level, either because it's overridden at the Workspace level or because it was inherited (though again I'd love the UI to distinguish between these). Though, to the best of my understanding, that setting actually is false at the Workspace level despite this checkbox mark, which I find very confusing; workspace.json does not contain the setting multiDiffEditor.experimental.enabled, and it is disabled at the User settings level.

-- Step 2

I untoggle and retoggle Workspace -> Experimental: Enabled (i.e. click twice on the setting). Now, I have:

--- User

[ ] Experimental: Enabled [ ] Minimap: Autohide [ ] Minimap: Enabled

--- Workspace

[ ✔] Experimental: Enabled (Also modified in User) [✔] Minimap: Autohide [ ] Minimap: Enabled

(and now workspace.json shows the setting).

Comment: So, presumably in this case the word "also" is supposed to alert me to the fact that I have changed this setting here.

-- Step 3

I untoggle User->Experimental: Enabled. Now I have:

--- User

[ ] Experimental: Enabled (Modified in Workspace) [ ] Minimap: Autohide [✔] Minimap: Enabled

--- Workspace

[ ✔] Experimental: Enabled [ ] Minimap: Autohide [✔] Minimap: Enabled

Comment: Apart from the Modified in Workspace in User settings, this looks identical to Step 0. Now, though, the setting is true (set in workspace.json). I find it baffling that there is no difference in Workspace settings to Step 0 despite 1) me having changed that setting in Workspace; 2) that setting actually ending up being true instead of false in the Workspace level.


Analysis: To me, as a programmer, it would be clearest to think of the settings at the deeper levels (i.e. Workspace and Folder) as one of these options:

  1. Set to true at this level
  2. Set to false at this level
  3. Inherit setting (which the UI should perhaps display distinctly as inherited as false or inherited as true)

Or for non-boolean settings,

  1. Set to value X
  2. Inherit setting (which the UI should show differently from the setting being set to that value at this level)

(and possibly a reset to default at this level setting, but I think that's a different wishlist item).