microsoft / vscode-azurecontainerapps

Azure Container Apps extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurecontainerapps
MIT License
33 stars 13 forks source link

Don't show `editScalingRange` on another `ScaleItem` if a draft item already exists #758

Closed MicroFish91 closed 1 month ago

MicroFish91 commented 1 month ago

Fix an issue where editScalingRange was showing up on other revision items even when a draft node already existed. In my opinion, it's confusing / doesn't make sense to allow users to try editing other revisions simultaneously when another draft already exists.

nturinski commented 1 month ago

An alternative to this method is to keep showing the command, but throw an error when they try to edit another scale item that isn't the current draft.

My thoughts on why this might be less confusing is because sometimes users don't understand/remember why commands mysteriously disappeared on them. By having the error, it will remind the user that "oh, hey, I do have a current working draft"

nturinski commented 1 month ago

I'm okay with either approach, just wanted to hear thoughts

MicroFish91 commented 1 month ago

Yeah hmm, let me think on this one a bit. I think I initially wanted to do it that way as well but for some reason I decided against it. I'll get back to you

MicroFish91 commented 1 month ago

Couldn't remember a good reason not to do it the way you mentioned, I think it's a better solution as well because it's simpler for us to understand and now we can use these utility functions to easily add the same checks to other template items