wbond / package_control

The Sublime Text package manager
https://packagecontrol.io
4.79k stars 814 forks source link

New setting to prompt package upgrade #911

Open huot25 opened 9 years ago

huot25 commented 9 years ago

One feature I would like to see implemented is a way for package control to notify the user that upgrades are available, but not trigger the update automatically.

Some of my users have stated that the automatic updates are disruptive is some cases when they are working on a large-scale projects. They would prefer to be notified that a package has an update and delay downloading until they are ready.

I know you can disable automatic downloads. However, if you do, there is no notification that updates are available until you manually run the process.

FichteFoll commented 9 years ago

I like this idea.

Do you have any proposals on how that prompt should be like? Message dialog? Status bar message? Other?

huot25 commented 9 years ago

I think having it in the status bar would get lost, unless it persists until the packages are updated. Even then I think adding anything more to the status bar might get overwhelming since we can add our own elements to it and it changes in various contexts.

A message dialog may work for now and I think this would be the best option, but I really don't like how disruptive they can be. I know, I am being picky :-)!

Another enhancement idea I have for Sublime are Flash Messages. Basically a small window/tooltip that would display for a short period of time in the bottom right of the window. Since we have html support in tooltips, I think something like this would be faily simple to implement. I am going to post something on userecho when I get a few minutes to do a mockup. This would be ideal for this scenario.

FichteFoll commented 9 years ago

The status bar text would be permanent until the updates were performed. I personally prefer that method over a disruptive message dialog. I guess providing a setting for the user to choose his preferred method sounds good here.

Flash messages sound like a good idea, especially with the minihtml. There is a package that provides similar cross-platform functionality, but a built-in version is certainly better. Please also open an issue here.

DisposaBoy commented 8 years ago

Please do something about this, and preferrably make it default to prompt instead of the current automatic updates.

Due to https://github.com/DisposaBoy/GoSublime/issues/702, I'm now aware the people are having their plugins automatically updated in the background while they work.

I'd like to point out that it's a dangerous thing to do because some plugins have runtime state that is not reloaded when you update them and this can lead to anything from broken behaviour in the plugin to Sublime Text crashing and taking all the user's unsaved changes with it.

wbond commented 8 years ago

@DisposaBoy Users can turn off automatic upgrades and perform updates manually. An explicit intent of Package Control was to keep packages updated automatically. It sounds like you may want to write an install note indicating that your package can't handle hot reloads and needs users to manually upgrade.

FichteFoll commented 8 years ago

Because Sublime Text does not have a notification system (or similar) in place that would satisfy the requirements for subtle but noticable messaging and could support individual "hyperlinks" like minihtml popups do to show an individual package's changelog before the update, I don't think there is a way currently to do this in a reasonable and user-friendly way for the majority of PC users.

@DisposaBoy, regarding your specific issue, it looks to me like you are causing CHANGELOG.md to open manually because there is no messages.json file in your repo, which would interface with Package Control. As such, I believe it is your duty to tell your users to explicitly disable automatic updates for "GoSublime" in their settings and only manually upgrade and restart, if there is an issue with hot-reloading your package (which is definitely possible considering how Python handles global state with its module loading). Package Control can not reasonably change this behavior and updating packages by default is a, at least in my opinion, reasonable default and changing this after many years would be disastrous at best.

That said, I still support this enhancement proposal, but I just don't see a way currently to reliably implement it, given what Sublime Text's API provides for visual user feedback, and would rather not spend time on such a feature if it works perfectly fine for the majority of users already.