Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Should place extensions to update on top of "installed" list #6634

Closed
marcelgerber opened this issue Jan 24, 2014 · 8 comments
Closed

Should place extensions to update on top of "installed" list #6634

marcelgerber opened this issue Jan 24, 2014 · 8 comments
Assignees
Milestone

Comments

@marcelgerber
Copy link
Contributor

Currently when there are updates to extensions available in the installed list, they are still sorted alphabetically. It would be much better if the extensions to update where the first ones:

  • primary order: update available
  • secondary order: alphabet

Screen:
image
The second extension to update is out of view.

I'd try to get a PR ready as soon as I got your ok.

@peterflynn
Copy link
Member

@SAplayer Yeah, I think that's a great idea!

@ghost ghost assigned dangoor Jan 28, 2014
@pthiess
Copy link
Contributor

pthiess commented Jan 28, 2014

@SAplayer - I assign it to @dangoor but it would be great if you could start working on this great improvement.
Thanks a ton!

@marcelgerber
Copy link
Contributor Author

Sorry, I tried this, but I didn't get far as the .updateAvailable flag is set later on (async).
Does anybody else want to do this?

@TomMalbran
Copy link
Contributor

@SAplayer I was checking the code and each item is rendered in ExtensionManagerView.prototype._renderItem which is called in ExtensionManagerView.prototype._render or in the change events. So I was thinking, what about appending to the top of the table on render when the extension has an update and moving the item to the top of the table after a change when the extension has an update?

@peterflynn
Copy link
Member

I think by the time modelInitPromise has resolved in ExtensionManagerDialog._showDialog(), the objects will be fully populated and safe to sort.

I've always found it a little weird that InstalledViewModel happens to depend on RegistryViewModel loading to mix in some extra info to its objects, and isn't really fully initialized until that happens. If we wanted to be ambitious we could go as far as cleaning that up a bit as part of this work :-) But certainly not required.

@marcelgerber
Copy link
Contributor Author

@TomMalbran No, these functions are only affecting the Available view, not Installed.
The installed extensions are sorted in InstalledViewModel.prototype._sortFullSet, but the .updateAvailable tags are not yet set when this is called.
We'd have to re-sort this view as soon as the registry data was set and re-render everything afterwards.

@peterflynn It would be a lot easier if we did this work before doing this. But I can't do it as I'm not used to Async stuff and things like Deferred objects and so on.

@dangoor dangoor added this to the Brackets 1.0 milestone Mar 17, 2014
@larz0
Copy link
Member

larz0 commented Mar 27, 2014

+1 👍

@marcelgerber marcelgerber changed the title Should place extensions to update in top of "installed" list Should place extensions to update on top of "installed" list Mar 28, 2014
zaggino added a commit that referenced this issue Apr 3, 2014
Updated design

Check registry at most once a day

Remove updated and uninstalled extensions from update list

Use new icon sprite

Calculate when an actual update should be launched

Calculate updateCompatible for extensions

toggle icon even when registry are downloaded through extension manager

checkForUpdate is now called directly on the startup as it was before

combine the functions

download only if there're no updates available

delete icon that is no longer user

This sorts installed extensions by updateAvailable (#6634)

align = in exports

add an empty line

use localeCompare instead of ifs

use Array instead of array for preferences

do not convert new preferences

move event listener to the bottom of the file

move function to the bottom to make JSLint happy

count only compatible updates for notification icon

add comments

fix tests that were failing after changes to the model.notifyCount

fix issue when update button is disabled but newer compatible version (not latest) exists

add tests for ExtensionManager.getAvailableUpdates() method

add tests for ExtensionManager.cleanAvailableUpdates() method

move new tests
zaggino added a commit that referenced this issue Apr 22, 2014
Updated design

Check registry at most once a day

Remove updated and uninstalled extensions from update list

Use new icon sprite

Calculate when an actual update should be launched

Calculate updateCompatible for extensions

toggle icon even when registry are downloaded through extension manager

checkForUpdate is now called directly on the startup as it was before

combine the functions

download only if there're no updates available

delete icon that is no longer user

This sorts installed extensions by updateAvailable (#6634)

align = in exports

add an empty line

use localeCompare instead of ifs

use Array instead of array for preferences

do not convert new preferences

move event listener to the bottom of the file

move function to the bottom to make JSLint happy

count only compatible updates for notification icon

add comments

fix tests that were failing after changes to the model.notifyCount

fix issue when update button is disabled but newer compatible version (not latest) exists

add tests for ExtensionManager.getAvailableUpdates() method

add tests for ExtensionManager.cleanAvailableUpdates() method

move new tests
@marcelgerber
Copy link
Contributor Author

@zaggino fixed this. Thank you!
Closing.

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

No branches or pull requests

6 participants