settings-view icon indicating copy to clipboard operation
settings-view copied to clipboard

add hidden property

Open UziTech opened this issue 5 years ago • 10 comments
trafficstars

Description of the Change

Allow certain config settings to be hidden from the settings panel.

{
	"config": {
		"someSetting": {
			"type": "boolean",
			"default": false,
			"hidden": true
		}
	}
}

Alternate Designs

Use an automatically collapsed object to hide the settings, but they can still be shown.

image

Benefits

packages can hide configuration settings that users shouldn't change manually.

Possible Drawbacks

none

Applicable Issues

#1143

UziTech avatar Feb 20 '20 19:02 UziTech

@atom @rafeca @nathansobo any feedback?

UziTech avatar Mar 19 '20 18:03 UziTech

@atom @50Wliu @lee-dohm @Arcanemagus @jasonrudolph

Did this get looked at? Is it on anyone's TODO list?

UziTech avatar Apr 13 '20 02:04 UziTech

@atom @50Wliu @lee-dohm @Arcanemagus @jasonrudolph @rafeca @nathansobo @lkashef @smashwilson

Has anyone looked at this? I feel like it shouldn't be too much to ask for someone to look at a PR within 3 months.

UziTech avatar May 13 '20 06:05 UziTech

packages can hide configuration settings that users shouldn't change manually.

You mean via UI, cause it obviously would be able to be changed manually.

the-j0k3r avatar Jan 31 '21 16:01 the-j0k3r

Yes, which is why I said shouldn't change manually not can't change manually

UziTech avatar Jan 31 '21 18:01 UziTech

Sync-settings has a few config properties that are hidden. For example, the time of the last back. I thought about storing it in local storage instead but then ran into issues because local storage is not synced between Atom windows.

Pretty much any information a package needs to store and sync between Atom windows. As far as I know there isn't a better place to store that information.

UziTech avatar Feb 01 '21 14:02 UziTech

Use an automatically collapsed object to hide the settings, but they can still be shown

Could you explain the motivation for this? If the property is called hidden, why is the related setting visible in the UI? Hidden is the opposite of visible, this makes no sense.

Maybe you can answer the following questions:

  • are these settings just collapsed?
  • are these settings read-only in the UI and can only be edited through the Config API?
  • are they hidden in the UI unless some condition is met (e.g. atom.inDevMode())

Don't get me wrong, I understand the need for a developer to save settings that aren't meant to be edited by the user. I've done this myself using indexedDB or localStorage. If the config schema had a way to deal with "developer settings", I'd welcome it. I'm just questioning the semantics.

idleberg avatar Jul 05 '21 20:07 idleberg

are these settings just collapsed?

These settings would not be visible in the settings ui.

are these settings read-only in the UI and can only be edited through the Config API?

hidden in the ui but can be changed through the config api.

are they hidden in the UI unless some condition is met (e.g. atom.inDevMode())

always hidden

UziTech avatar Jul 05 '21 20:07 UziTech

Use an automatically collapsed object to hide the settings, but they can still be shown

That is an alternate design that works currently. This PR would hide it completely.

UziTech avatar Jul 05 '21 20:07 UziTech