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

Fix bug where sometimes plugin could not be removed from UI #2115

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

garrettjstevens
Copy link
Collaborator

This fixes #2052 by not using the name at all when removing plugins and instead relying on the plugin URL to identify which plugin to remove.

@garrettjstevens garrettjstevens self-assigned this Jul 9, 2021
@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jul 9, 2021
@codecov
Copy link

codecov bot commented Jul 9, 2021

Codecov Report

Merging #2115 (c746512) into main (b223419) will decrease coverage by 0.02%.
The diff coverage is 26.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2115      +/-   ##
==========================================
- Coverage   62.02%   62.00%   -0.03%     
==========================================
  Files         476      476              
  Lines       22789    22790       +1     
  Branches     5350     5350              
==========================================
- Hits        14134    14130       -4     
- Misses       8374     8379       +5     
  Partials      281      281              
Impacted Files Coverage Δ
products/jbrowse-desktop/src/Loader.tsx 0.00% <ø> (ø)
products/jbrowse-desktop/src/jbrowseModel.js 17.80% <0.00%> (+0.24%) ⬆️
products/jbrowse-web/src/Loader.tsx 61.64% <ø> (ø)
products/jbrowse-web/src/jbrowseModel.js 57.44% <0.00%> (+0.60%) ⬆️
products/jbrowse-web/src/sessionModelFactory.ts 59.07% <0.00%> (ø)
...c/PluginStoreWidget/components/InstalledPlugin.tsx 63.15% <20.00%> (-3.51%) ⬇️
...nt/src/PluginStoreWidget/components/PluginCard.tsx 90.00% <66.66%> (-4.74%) ⬇️
...ginStoreWidget/components/InstalledPluginsList.tsx 84.61% <100.00%> (ø)
packages/core/PluginManager.ts 92.34% <0.00%> (-1.81%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b223419...c746512. Read the comment docs.

Copy link
Member

@elliothershberg elliothershberg left a comment

Choose a reason for hiding this comment

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

Makes sense to me! These changes look good.

@cmdcolin
Copy link
Collaborator

cmdcolin commented Jul 9, 2021

You may be able to use pluginManager.runtimePluginDefinitions instead of looping over all plugins and looking at pluginMetadata.url. The pluginDefinitions have a URL, and were added specifically to support loading runtimePlugins on the webworker end, but should work for this issue too.

@garrettjstevens
Copy link
Collaborator Author

You may be able to use pluginManager.runtimePluginDefinitions instead of looping over all plugins and looking at pluginMetadata.url.

This PR does use runtimePluginDefinitions to check to see if a plugin is installed. It only loops over the session plugins and checks the metadata to differentiate between session and non-session runtime plugins.

@rbuels rbuels added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Jul 13, 2021
@rbuels rbuels merged commit b0602fc into main Jul 13, 2021
@rbuels rbuels deleted the 2052_plugin_uninstall branch July 13, 2021 18:57
@garrettjstevens garrettjstevens changed the title Use URL instead of name to remove plugins Fix bug where sometimes plugin could not be removed from UI Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't uninstall plugin in UI due to name inconsistencies
4 participants