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

Feature: show plugins and clients in panel #5784

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

thewahome
Copy link
Contributor

@thewahome thewahome commented Nov 15, 2024

Overview

Closes #5715

Demo

image

Tasks

  • When there are clients and plugins in the current context, Kiota should show the Workspace panel expanded and listing all clients and plugins available
  • The "My workspace" panel must be in the top.
  • When there is no clients or plugins in the context, the Workspace panel should load collapsed when opening Kiota extension.
  • When there is no clients or plugins in the context and one expands the Workspace panel, we should show a "No clients or plugins are available" in the panel.
  • Only show the Clients component when there is at least 1 client in the current context. If no client was found, the node shouldn't be displayed.
  • Only show the Plugins component when there is at least 1 plugin in the current context. If no plugin was found, the node shouldn't be displayed.
  • Clients and Plugins components must to be expandable/collapsible.
  • When hovering the { } icon in any existing plugin/client, we should show the text Select. When clicking on it, the API Explorer should be loaded with the right client/plugin and right selected paths (same as the EditPaths codelense action)
  • When hovering the trash icon in any existing plugin/client, we should show the text Delete. When clicking on it for any existing plugin/client, the plugin remove should be performed.

Future work

  • the notification for regeneration should be displayed once an api is loaded.

@thewahome thewahome requested a review from a team as a code owner November 15, 2024 15:03
@thewahome thewahome marked this pull request as draft November 15, 2024 15:03
@thewahome thewahome marked this pull request as ready for review November 20, 2024 12:31
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, now that we have a unit test infrastructure in place, we should make it a habit to include unit tests to get at least a basic coverage.

}

private async deletePlugin(pluginName: string): Promise<KiotaLogEntry[] | undefined> {
const result = await vscode.window.withProgress({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of duplication between the two methods, I think we have an opportunity to refactor and reduce duplication here.

}
return element;
}

public loadWorkspaceContent(): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we're mixing concerns here, and reducing testability in the process.
The tree view providers are responsible for managing the state of the tree view, not for getting the data in the first place. I think we should split things here.

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

Successfully merging this pull request may close these issues.

Kiota Workspace panel should list all clients and plugins available in the current VS code workspace
2 participants