microsoft / kiota

OpenAPI based HTTP Client code generator
https://aka.ms/kiota/docs
MIT License
3.01k stars 210 forks source link

Add notification to users to "Generate"/"Regenerate" after loading an API in API Explorer #5712

Open maisarissi opened 3 weeks ago

maisarissi commented 3 weeks ago

As part of our integrated history with Teams Toolkit when generating API Plugin for existing APIs, we are seeing a drop in how many users go back to TTK after landing in Kiota.

One of our assumptions is that folks are lost and don't know what to do to complete the flow. To increase the number of users being successful when coming from TTK, we should add a notification to help users. However, I do see it as an opportunity and valid scenario for all users.

Proposal

Once an API is loaded, we should show a notification with an action button.

Image

Acceptance Criteria

  1. We should always show a notification after a API is loaded in the API Explorer.
  2. After loading an API in the API explorer when creating a plugin, no matter the source, Kiota should show the notification Click on Generate after selecting the paths in the API Explorer with a button labeled Generate.
  3. The Generate button in the notification must do exactly the same as the existing Generate button Image in the API Explorer.
  4. If one is regenerating their existing clients/plugins, Kiota should show the notification with Click on Regenerate after selecting the paths in the API Explorer and a button labeled Regenerate.
  5. The Regenerate button in the notification must do exactly the same as the existing Re-generate button Image in the API Explorer.
  6. Both Generate and Regenerate buttons in the notification should be aware of the source and complete the flow as expected. (E.g. source=ttk or no source at all)
thewahome commented 2 weeks ago

When an API is loaded there are no items selected by default for Generate to function. Regenerate would work though

baywet commented 2 weeks ago

Can I ask a "do not show again" button on this notification? The rationale being that for users who know what they are doing, those helper notifications add noise and should they should be able to disable/get rid of them.

maisarissi commented 1 week ago

When an API is loaded there are no items selected by default for Generate to function. Regenerate would work though

This would lead to the same experience as when hitting the API Explorer generate button, which is showing a notification saying there is no endpoints selected. Not super great experience, but the issue right now is that people are not completing the flow and the assumption is that they don't know what they need to do.

Can I ask a "do not show again" button on this notification? The rationale being that for users who know what they are doing, those helper notifications add noise and should they should be able to disable/get rid of them.

We absolutely can, we need a way to store that info and not show the notification to that user again though. How can we accomplish that?

baywet commented 1 week ago

We absolutely can, we need a way to store that info and not show the notification to that user again though. How can we accomplish that?

We should look at the documentation to see if there is any local settings storage API for vscode extensions (I think there is, looking at @thewahome to do the research here). Otherwise a configuration file under the user profile should do the trick.