Wox-launcher / Wox

A cross-platform launcher that simply works
http://wox-launcher.github.io/Wox/
GNU General Public License v3.0
24.62k stars 2.37k forks source link

Notify when plugin update #1127

Closed Eligioo closed 1 year ago

Eligioo commented 8 years ago

Wouldn't it be a nice new feature if it would be able to notify users when there is a new version available of a plugin? Instead of uninstall and then install the plugin to fetch the latest version, and lose your settings too (not sure if plugin Settings.json will be deleted after removing a plugin, correct me if i'm wrong)

So i suggest a nice feature to wpm would be to be able to update your plugins. I recently updated my plugin several times and some users had no idea there where running on an older version.

roose commented 8 years ago

I think plugin author can itself make the update feature, for example: alfred workflows checks for update and if it available, shows "Update available" in results list.

Eligioo commented 8 years ago

I have already thought about implementing it myself. But in my opinion it's not a good thing to let every plugin developer implement his own way to let an user notice that there is an update of his plugin. Instead of one uniform way handled by the package maneger.

lances101 commented 8 years ago

@Eligioo, you are right. Manually updating each plugin could become a painful experience if every plugin developer were to use his own approach. As @roose wrote, a workaround would be to add a check your to Query function that would fetch the newest version number from http://api.getwox.com/plugin/{id} and if that version is newer display a result that would change the query to wpm install {plugin_name}. But it is a hack, not a solution.

Once WPM's backend rework gets done, I would take a look at Wox's package manager plugin for the update features. They are not codependent, so if you have the time to implement the client part - we would be happy to see a pull request for it.

If you need a point of reference, here is my view for the basic update functionality:

Once the basic functionality is there it could be extended with stuff like ignoring specific plugins for updates, auto-updates, etc. But I wouldn't prioritize on those right now.

Eligioo commented 8 years ago

@lances101 I'm willing to try to implement point 3 of your view for the basic update functionality. I like to be more involved with this project due the fact I use Wox as workflow.

I've already looked a little how the plugin manager is doing the install part of the plugins. Of course you could use small components for the update part.

The way of doing the update, how I think about it, is by sending the list of API.GetAllPlugins to a new website API endpoint wich returns a result of only the plugins that have a newer version. Wich you can than processed as a Query result.