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

plugin-catalog: Rework installed list to include all plugins #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vyncent-t
Copy link
Contributor

@vyncent-t vyncent-t commented Nov 20, 2024

Description

Solves Issue: #2586

This PR addresses the issue observed during our ContribuFest at KubeCon, where users expressed confusion about the Installed view in the Plugin Catalog. Specifically, users were expecting to find their development plugins in the Installed view, but only plugins installed via the Plugin Catalog were listed.

To resolve this, this PR proposes the following updates:

  • Unified Installed View: The Installed view in the Plugin Catalog will now display all installed plugins, regardless of their installation source.
  • Categorization:
    • Plugins installed via the Plugin Catalog will appear under a section titled Installed from the Plugin Catalog.
    • Plugins installed from other sources will appear under a section titled Other Installed Plugins.
  • Link to Plugin Details: Each plugin entry will include a link to its respective details/settings page to provide more information and configuration options.

These changes aim to improve user experience by consolidating plugin information in one view while maintaining clarity about their source and functionality.


Image

image


Changes Made

  1. Updated the Plugin Catalog Installed view to:
    • Display all plugins (both catalog-installed and non catalog-installed).
    • Categorize plugins into Installed from the Plugin Catalog and Other Installed Plugins.
  2. Added links to plugin details/settings for each listed plugin.

Steps to Test

  1. Open the Plugin Catalog in the Headlamp application.
  2. Install a plugin via the Plugin Catalog.
  3. Add a plugin manually to simulate a non-catalog installation.
  4. Navigate to the Installed view and confirm:
    • Plugins are categorized under Installed from the Plugin Catalog or Other Plugins.
    • Each plugin has a working link to its details/settings page.

Notes

  • Plugins listed under Other Plugins will not include uninstall functionality if they were not installed via the Plugin Catalog.

@vyncent-t vyncent-t added enhancement New feature or request plugin-catalog labels Nov 20, 2024
@vyncent-t vyncent-t self-assigned this Nov 20, 2024
Copy link
Contributor

@joaquimrocha joaquimrocha left a comment

Choose a reason for hiding this comment

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

Thanks. Left some comments.

}}
>
<Typography variant="h6" components="h2">
Installed from the Plugin Catalog
Copy link
Contributor

Choose a reason for hiding this comment

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

The title of the section is already "Installed". So here we could just have Plugins from the Catalog.

}}
>
<Typography variant="h6" components="h2">
Other Installed Plugins
Copy link
Contributor

Choose a reason for hiding this comment

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

And here we could use Other Plugins

getter: otherInstalledPlugins => (
<Box>
<Link
routeName={`pluginDetails`}
Copy link
Contributor

Choose a reason for hiding this comment

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

This lliteral is not replacing any var, so it may be "pluginDetails" instead (no {} needed either).

@@ -81,8 +152,25 @@ export function PluginInstalledList() {
}
}

function fetchOtherInstalledPlugins() {
const storedPlugins = localStorage.getItem('headlampPluginSettings');
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the correct way to get the plugins? I think there's currently an issue related to this, since it mentions plugins settings but we have the package.json stored there, although it's likely a bug.
See #this comment.

<Box>
<Link
routeName={`pluginDetails`}
params={{ name: otherInstalledPlugins.name }}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should (in a different commit) make sure that the names of plugins are separated into org+name. We can use the org as the author. See:
headlamp-k8s/headlamp#2572

Copy link
Contributor

@skoeva skoeva left a comment

Choose a reason for hiding this comment

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

pending: retrieve plugin info from backend instead of local storage

pending: plugin origin changes merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin-catalog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants