-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implement activity log to create and delete virtual machines #421
base: main
Are you sure you want to change the base?
Conversation
const iconPath = options.activityStatus === 'Success' ? activitySuccessIcon : options.activityStatus === 'Fail' ? activityFailIcon : activityProgressIcon; | ||
|
||
return { | ||
item: new GenericTreeItem(undefined, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, but for fail items, I would pass back a GenericParentTreeItem
by default since we have logic that will automatically tack on error items as children if thrown in that step 🤓
|
||
import { activityFailContext, activityFailIcon, activityProgressContext, activityProgressIcon, activitySuccessContext, activitySuccessIcon, AzureWizardExecuteStep, createUniversallyUniqueContextValue, GenericTreeItem, type ExecuteActivityOutput, type IActionContext } from "@microsoft/vscode-azext-utils"; | ||
|
||
export abstract class AzureWizardActivityOutputExecuteStep<T extends IActionContext> extends AzureWizardExecuteStep<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. For most cases it will simplify quickly hooking up new steps. For more custom cases, we can implement the execute step manually or overwrite the existing methods here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my thoughts exactly.
Relies on microsoft/vscode-azuretools#1767
This is just an idea of how we could implement this across other extensions. We could move the step I made or leave it to the extension to figure out how they want to implement all of this activity log shenanigans.
Let me know if you have any thoughts on other ways we could make it easier to implement, whether it's shared in the npm package or if there's something I did weird/stupid in this PR.
An example of what it looks like in action: