microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
290 stars 133 forks source link

Improve Event Grid Local Development Experience #3984

Closed hossam-nasr closed 7 months ago

hossam-nasr commented 8 months ago

Improve the local development experience for EventGrid functions.

What this PR does:

image

image

image

image

image

Missing / Next steps:

Open questions:

❓Do I need to do something extra to make localization work? I followed the pattern I saw of using the localize function, but I'm not sure how the code I used as the first argument gets used. ❓Right now, I create the temp files that store these sample files in the .vscode directory. Would it be better if I saved it elsewhere, such as the OS temp file directory, by default? ❓Because of the way the button and code lens need to be registered at the extension level, they appear in any .eventgrid.json file, even if no function is currently being executed or the function app is even running. Is there a way to stop them from showing unless the function app is running and a function is being executed?

MicroFish91 commented 8 months ago

For some reason, I couldn't find a .prettierrc file configuration that would keeping the existing styling as-is. Any help there is appreciated.

Yeah, we don't use prettier defaults in our extensions. I tended to use it as well in my own projects but had to turn off a lot of the default formatting to keep our work projects from getting auto formatted on save 😋

Do I need to do something extra to make localization work? I followed the pattern I saw of using the localize function, but I'm not sure how the code I used as the first argument gets used.

At first glance, the way you're using it looks okay to me. I wouldn't worry too much about the string id, the new vscode.l10n localization method we should eventually be migrating to will no longer be requiring us to designate the id to be passed at all anymore if I recall correctly.