Skip to content

SCM - Add scmResourceGroupState context key #192009

@gjsjohnmurray

Description

@gjsjohnmurray

Commands contributed to the scm/resourceState/context can use the scmResourceState context key in their when-clauses to test the value of the contextValue property of the SourceControlResourceState.

There is no equivalent capability for commands contributed to the scm/resourceGroup/context menu. It is only possible to test the read-only id property of the SourceControlResourceGroup, which is done by checking scmResourceGroup in when-clauses.

Our SCM provider uses resource groups more dynamically than the Git provider does, and we want to vary the contents of a group's context menu (and inline command buttons) during its life. We cannot change the group's id property to achieve this, and we don't want to destroy and recreate a group in order to do so.

This issue is a feature request for the addition of an optional contextValue property on SourceControlResourceGroup, which would be exposed as a new context key named scmResourceGroupState.

If the proposal is accepted I am willing to prepare a PR.

Metadata

Metadata

Assignees

Labels

api-finalizationapi-proposalauthor-verification-requestedIssues potentially verifiable by issue authorfeature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesscmGeneral SCM compound issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions