Improve Event Grid Local Development Experience#3984
Conversation
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 😋
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 |
nturinski
left a comment
There was a problem hiding this comment.
For files that are edited due to your prettier, I think you can unstage those changes and just not push them up. I can't be sure, but it looks like there are some files that are only formatting changes, right?
As far as directory structure goes, I think there are enough EventGrid specific files that we should just create an executeFunction/eventGrid folder.
nturinski
left a comment
There was a problem hiding this comment.
Overall looking great. Most of my comments are just nits or small questions. Nice work!
Improve the local development experience for EventGrid functions.
What this PR does:
When customer clicks on "Execute Function Now..." button, if it's an EventGrid function, the user is prompted to choose an event type from a list of supported file types:

The customer then selects one of sample event types under that event source, pulled from this repo:
If "send sample request" is selected, EventGrid function gets triggered with sample request.
If "modify sample request" is selected, a new window opens with the sample request:
Missing / Next steps:
.prettierrcfile configuration that would keeping the existing styling as-is. Any help there is appreciated.Open questions:
❓Do I need to do something extra to make localization work? I followed the pattern I saw of using the
localizefunction, 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
.vscodedirectory. 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.jsonfile, 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?