Skip to content

Remove Activate, Deactivate and Restart Revision Commands when not applicable #356

Merged
motm32 merged 4 commits intomainfrom
meganmott/fix-163
May 4, 2023
Merged

Remove Activate, Deactivate and Restart Revision Commands when not applicable #356
motm32 merged 4 commits intomainfrom
meganmott/fix-163

Conversation

@motm32
Copy link
Copy Markdown
Contributor

@motm32 motm32 commented Apr 28, 2023

Fixes #163.
Fixes #322.

@motm32 motm32 requested a review from a team as a code owner April 28, 2023 18:05
@alexweininger
Copy link
Copy Markdown
Member

boo

@nturinski
Copy link
Copy Markdown
Member

Discussed offline: Leverage the enablement property rather than just starting up an inactive revision for the user.

@motm32 motm32 changed the title Activate revision when restarting inactive revision Remove Activate, Deactivate and Restart Revision Commands when not applicable May 3, 2023
@motm32
Copy link
Copy Markdown
Contributor Author

motm32 commented May 3, 2023

Enablement does not work in this case so just removing the commands from view when they are not applicable.

Comment thread src/tree/RevisionItem.ts Outdated
iconPath: this.iconPath,
description,
contextValue: 'revision',
contextValue: `${this.revision.active ? 'active' : 'inactive'};revision`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The context value string should be created using the createContextValue util. It makes sure the values are sorted and deduped.

Comment thread src/tree/RevisionItem.ts Outdated
label: this.revision.name,
iconPath: this.iconPath,
description,
contextValue: `${this.revision.active ? 'active' : 'inactive'};revision`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

value passed to createContextValue should be like ['active', 'revision']. The util adds the ; too.

@motm32 motm32 merged commit a1e577c into main May 4, 2023
@motm32 motm32 deleted the meganmott/fix-163 branch May 4, 2023 23:26
@microsoft microsoft locked and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

4 participants