Skip to content
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

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

Open
maisarissi opened this issue Nov 1, 2024 · 8 comments · May be fixed by #5826
Open

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

maisarissi opened this issue Nov 1, 2024 · 8 comments · May be fixed by #5826
Assignees
Labels

Comments

@maisarissi
Copy link
Contributor

maisarissi commented Nov 1, 2024

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
Copy link
Contributor

thewahome commented Nov 6, 2024

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

@baywet
Copy link
Member

baywet commented Nov 10, 2024

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
Copy link
Contributor Author

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
Copy link
Member

baywet commented Nov 11, 2024

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.

@calebkiage calebkiage assigned calebkiage and unassigned calebkiage Nov 13, 2024
@maisarissi maisarissi moved this from Needs Triage 🔍 to Todo 📃 in Kiota Nov 19, 2024
@thewahome thewahome self-assigned this Nov 25, 2024
@thewahome thewahome linked a pull request Nov 25, 2024 that will close this issue
@thewahome
Copy link
Contributor

@baywet and @maisarissi,
adding a "do not show this again" message is possible. However, it is permanent. Would we ever want to change this back?

@baywet
Copy link
Member

baywet commented Nov 25, 2024

I don't think so. Where is the setting stored? would an uninstall/reinstall of the extension reset it?

@thewahome thewahome moved this from Todo 📃 to In Progress 🚧 in Kiota Nov 25, 2024
@thewahome thewahome moved this from In Progress 🚧 to In Review 💭 in Kiota Nov 26, 2024
@thewahome
Copy link
Contributor

I don't think so. Where is the setting stored? would an uninstall/reinstall of the extension reset it?

It's stored in the extension's global state and persisted across VS Code sessions.
It can be reinitialized when the extension is uninstalled/reinstalled. Also if the extension is updated and the update process involves resetting the global state or changing the value

@maisarissi
Copy link
Contributor Author

So I guess this is fine and we can go that way.
Also, people will still be able to click on the Generate/Regenerate button in the API Explorer panel, so it shouldn't be a big issue making that choice "permanent" until a reset of global state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Review 💭
Development

Successfully merging a pull request may close this issue.

4 participants