Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sliedes opened this issue Jul 2, 2024 · 2 comments
Closed
Assignees

Comments

@sliedes
Copy link

sliedes commented Jul 2, 2024

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).

@rzhao271
Copy link
Contributor

rzhao271 commented Jul 2, 2024

Near-duplicate of #58038. Also see #58038 (comment).

Step 3 differs from Step 0 because the workspace setting has the modified indicator (blue bar) to the left of it, but I agree that the UI is very confusing.

@rzhao271
Copy link
Contributor

rzhao271 commented Dec 9, 2024

Closing in favour of #58038.

@rzhao271 rzhao271 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants