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

Plugins that don't carry nodes aren't shown - despite installed - in the Palette Manager #4271

Open
ralphwetzel opened this issue Aug 10, 2023 · 5 comments

Comments

@ralphwetzel
Copy link
Contributor

ralphwetzel commented Aug 10, 2023

As explained by @knolleary in this forum post, plugins that don't carry nodes aren't shown - despite installed - in the Palette Manager.

Consequentially, such a plugin can be installed - yet it can neither be updated nor removed via this mean.

I'm intending to raise a PR to overcome this limitation:
The objective would be to integrate those kind of plugins into the list of "Installed Nodes". Once done, this label might not be 100% correct anymore - but changing it should be subject of a separate discussion.

@knolleary
Copy link
Member

Hi @ralphwetzel

The whole palette manager code is a bit of a muddle right now and been long overdue a tidy up. I can't remember the specifics (because it was quite a while ago), but there were reasons why adding pure plugin modules to that list wasn't so trivial to get done and potentially needed a bigger piece of rework on how the palette manager manages its information.

There are also some lifecycle challenges; not all plugins could be dynamically added/removed cleanly and needed a full restart of Node-RED. And as they don't get listed on the flow library, then they don't show up in the catalogue to install.

So I suspect its a bit of a can of worms, but if you want to dive in, you are most welcome to go through it.

@ralphwetzel
Copy link
Contributor Author

So I suspect its a bit of a can of worms, but if you want to dive in, you are most welcome to go through it.

😄
Some initial digging through the code gives me the impression that there's a chance for a lite implementation - which might not be too elegant, but could serve the need. Let's see if this is feasible...

@ralphwetzel
Copy link
Contributor Author

Preliminary progress report:

image

Feedback welcome!

Do you agree with the fa-puzzle-piece icon - or would you prefer to see the fa-plug ... or anything else?

@knolleary, could you provide some examples of plugins that behave like you described, e.g.

  • are not in the flow library
  • show issues when being upgraded / removed?
  • (additionally) carry a plugin and nodes

Knowing those would be very beneficial for maturity testing!

@knolleary
Copy link
Member

@ralphwetzel looks good.

The main two plugins we have are:

  • nrlint (not in the flow library)
  • node-red-debugger (in the flow library)

Neither of them include a node as well. I can't immediately think of such an example you can test with - may have to create a test plugin for it.

Happy with the puzzle piece icon for now.

@ralphwetzel
Copy link
Contributor Author

@knolleary You were right. This corner of Node-RED is a can of worms. 😉

Thus it took a while to implement the data management, yet now should be done.
Reviewers might notice that I'm proposing the addition of an onremove function that (future) plugins should implement to clean their remains in editor & runtime after removal. Further details explained in the PR.

I'm thinking about aligning the labeling in the editor, e.g. from "Installed nodes" to "Installed modules" et al. Do you have an opinion on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants