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

Change value widget in object renderer based on key #101261

Merged
merged 3 commits into from Jun 29, 2020

Conversation

9at8
Copy link
Member

@9at8 9at8 commented Jun 29, 2020

#99635

This PR adds functionality to render the correct value widget based on the key.

Providing a 'SelectBox' to select keys while adding new items will be in a separate PR.

Before

before

After

after

Settings to test

  • emmet.variables: (keys - lang, charset)
  • tsserver.watchOptions: (keys - watchFile, watchDirectory, fallbackPolling, synchronousWatchDirectory)
  • You can also change the schema of an existing setting (like files.associations)
[FILES_ASSOCIATIONS_CONFIG]: {
			'type': 'object',
			'markdownDescription': nls.localize('associations', "Configure file associations to languages (e.g. `\"*.extension\": \"html\"`). These have precedence over the default associations of the languages installed."),
			properties: {
				'foo bar': { type: 'string', default: 'baz' },
				'enum prop': { type: 'string', default: 'a', enum: ['a', 'b', 'c'] },
				'boolf': { type: 'boolean', default: false },
				'boolt': { type: 'boolean', default: true },
				'bool': { type: 'boolean' },
			},
			patternProperties: {
				'pa(tt)*ern': { type: 'string', default: 'b', enum: ['A', 'b', 'C'] },
				'another(1)*': { type: 'string', default: 'one' },
			},
			'additionalProperties': {
				'type': 'string',
				default: 'typescript',
			}
		},

@9at8 9at8 requested a review from roblourens June 29, 2020 06:00
@9at8 9at8 changed the title Change value widget based on key Change value widget in object renderer based on key Jun 29, 2020
@joaomoreno joaomoreno assigned roblourens and unassigned joaomoreno Jun 29, 2020
Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, this looks great to me. I think that debouncing the value update is a good idea

@9at8 9at8 merged commit 45b3cb4 into master Jun 29, 2020
@9at8 9at8 deleted the adi-object-renderer-dynamic-value branch June 29, 2020 18:36
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants