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
Refactored extensions manager #6417
Conversation
Here is a demo video: @muratmaga please have a look, several features were motivated by your use cases and feature requests. @pieper @cpinter @jamesobutler check this out and let me know if you have any comments. |
Addresses most issues/feature requests listed at: |
@lassoan these look awesome. Thanks. |
a49b417
to
2124c84
Compare
@lassoan I'm going to test this locally. Is |
Yes, please. And the check for stable release updates as well (I liked the Welcome screen option).. |
In general I'm usually strict in new features and enhancements only being in feature release versions as from a user perspective changes in functionality in a patch release like Slicer 5.0.3 is unexpected. If it was to be included then all the build improvements and documentation backports should be considered for inclusion (#6398 (review)) because the patch release would not be under strict consideration. If the desire is to get it out sooner than my choice would be to release the next feature release Slicer 5.2 sooner. This 5.2 version would just have less new features than a typical feature release. |
@muratmaga That specific commit ( |
@jcfr What is being referred to is #5502 (comment) which is update about a new stable version of Slicer being available to download. |
I am going to disagree with this, as we rely on update extensions functionality quite a bit to keep the SlicerMorph up to date with changes and additions. Currently this is broken, which I would say is an important issue for a stable that's going to be in place for next few months. From practice we know how long it takes to do a new release, even with best of our intentions. So this stable is going to be downloaded an used quite a while. |
9c7dc54 is an appropriate bug fix to include in Slicer 5.0.3 which will solve the extension update issue present in Slicer 5.0.2. However improved functionality about updating extensions through one new tab, favorited/book marked extensions, etc all of that is new features which should be in Slicer 5.2. |
@muratmaga As indicated above by @jamesobutler , if you are talking about the issue we discussed during our last meeting, I this has been fixed and backported on the maintenance branch and will be part of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When I installed the "SegmentEditorExtraEffects" extension from the install tab it downloaded and install "SegmentEditorExtraEffects" and dependent extension "MarkupsToModel", but prior to restart the "Manage Extensions" tab indicated that there were 2 items, but there was only just the primary extension. After restarting both extensions were present and the manage extension count number matched the number of items in the table.
Before Restart | After Restart |
---|---|
Update: I think this was because it was still filtering using the terms I used for the "Install" extensions tab, so no issue here.
-
I think having just the "Check for updates" button is sufficient where you can remove the action in the options menu to reduce the number of items there.
-
When there are no bookmarks the "Install all bookmarks" button is disabled, however when then are no extensions the "Check for updates" button is still enabled. I would expect consistent logic applied where "Check for updates" is disabled until there are installed extensions to check for.
=> AL: fixed in 665e885 -
Is there a functional need for the new option of "Automatically install all dependencies"? This seems like only allowing users to get into trouble? When would there be a reason to not install a dependency? Won't things not work? If things will work, then is it a true dependency?
-
I manually entered in a fake entry of
<input>
into the "Edit Bookmarks" widget and noticed that when the entry can't be found there is still a "More" hyperlink in the row, but it doesn't go anywhere.
=> AL: fixed in 2e48952
The patch makes it possible to update extensions, but without auto-update notification and the option being so much hidden, the feature is not practically available. We cannot expect that users will notice updates and update extensions. I agree that there are tons of new features in this PR and lots of changes, so there is significant risk of regressions. These would be good reasons for excluding it from Slicer-5.0. However, preview releases don't have extension updates, so this feature could only be tested in a stable release. If we wait until Slicer-5.2, we just prevent from users accessing the new feature, but the feature will not get much testing, so it won't get more mature or more stable. Slicer5 has not been announced anyway yet, so our Slicer-5.0.x versions are kind of release candidates, so we don't violate our policies very harshly by allowing in some new features. |
There is an important difference between bookmarks and udpates. Updates require network connection. Check for updates button must be always enabled because network connectivity comes and goes and the user must be able to trigger an update anytime.
The "(2)" means that clicking that button will install two updates, so that looks correct to me. We don't want filter&search to affect what extensions are will be installed/uninstalled/updated. If we find big inconsistencies then we can change the implementation, but if it's just a few questions/uncertainties here and there then it may be sufficient to document them in the user guide and/or tooltips.
Maybe we can remove the option. I added an option to allow preserving the current behavior. I agree that most of the time user should just install all required dependencies. We can remove the option to simplify the GUI if we all agree that there is no need to give users much control. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Previously the "Install from file" toolbutton was a normal toolbutton of just an icon + tooltip. Was there a reason for including text on your new toolbuttons? Do you think the new icons don't convey clearly the actions that they represent? The "Check for updates" icon is familiar enough to me, though "Install bookmarked" is not recognizable to me. The general bookmark icon is not the base shape of it so I wouldn't expect it to be bookmarked related unless I read the text. Therefore the icon for "Install bookmarked" seems pointless at the moment.
I am finalizing #6082, once done. I will rebase this PR. |
Good point. Although clicking the button has a somewhat useful function (check if the server is available, if yes, download extension metadata, if not, display an error) there no visible result of the operation is expected, so it may make sense to disable.
All the buttons are standard google material design icons for update, install, and add operations, but their meaning are probably not obvious enough, and we have lots of space there, so adding the text is useful. Since we have the text, we could remove the icons, but I think they make the GUI look a bit nicer. If people don't like the icons then we can remove them. |
Only the last commit is needed, the rest were just some unrelated experimental stuff from my development branch that I forgot to remove from my latest push (you can remove the other commits). The only thing I still need to fix is the extensions manager test. |
In the button row, "Check for updates" turns into "Update all" button. This is nice because it simplifies the button row. |
This is an interesting topic. Currently, we cannot distinguish between optional and required dependencies, so we can either consider all dependencies are optional, or all dependencies are required. I've added a note to #3704 where we can discuss this topic further. |
4d2560b
to
773cd5b
Compare
I've rebased the code, it should be all good except the extensions server test and documentation has not been updated yet. |
Summary of changes:
Possible follow up changes:
@lassoan After review the last commit adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just added some trivial comments.
e47aa41
to
bbd4d70
Compare
@lassoan This is now ready. Once reviewed, I will squash the last three commits together. I fixed the approach to instead pass |
bbd4d70
to
60d7c8c
Compare
After I am done rebuilding and doing a last round of testing, I will squash and integrate. |
@lassoan The last commit I pushed ensure install works when AutoCheck has not been enabled already. |
36f9ab3
to
c1b3a76
Compare
@jamesobutler I plan on integrating this later this evening before the round of nightly build, if you have a chance to quickly check on your side as well. Would be nice 🙏 |
Ok I will take a look again here soon and will report back so you have feedback before you integrate later tonight. |
Merci 🙏 |
I don't see any issues with the changes in this PR. Below are some issues I have observed though that are still affecting the extensions manager for users. I still get a stream of these warnings when using the extensions manager as previously mentioned in:
@jcfr You mentioned the following in one of the above threads. Is this expected to be fixed as well or no?
Also some extension icons aren't being rendered which I'm not sure why. It is an issue present in the extensions manager and in the online extensions catalog. For example BreastImplantAnalyzer specifies an icon in the s4ext file of the ExtensionsIndex and going to the path directly will show an icon, but that isn't rendered here. |
Thanks for the feedback. Regarding the mixed content warnings, I indeed have a work in progress notebook going though all extensions and s4ext and effectively listing and/or fixing them. Thanks for the reminder, it would indeed be nice to address this before announcing the release more broadly. |
Reworked the extensions manager to take advantage of new Girder_v1 APIs: - batch download of extension metadata - server provides extension dependency metadata These enabled implementing the following improvements: - Automatic update check and automatic installation can now be enabled for extensions. Previously, hundreds of requests were submitted to query all necessary extension metadata, which caused slowdowns and crashes. Now all metadata can be downloaded in batch (in 4 requests), very robustly, in 1-2 seconds. For testing purpose, batch query may also be disabled with setServerQueryWithLimitEnabled. - If updates are available then a notification marker is displayed over the extensions manager toolbar icon. - Extensions can be bookmarked and all reinstalled in a different Slicer version by a single click. Previously, all extensions that the user have ever installed was offered to be restored, and there was no option to remove any of them. Bookmarked extensions can be installed without the browser widget, which may be useful in cases where proxy servers block the communication between the extensions manager frontend and backend (because only the backend needs to be accessed). - List of bookmarks can be edited as a simple text. This makes it easy to transfer favorite extensions between computers or install a set of extensions at training events. - Extensions Manager is displayed immediately. The user does not need to wait for any downloads. All data is reloaded immediately from cache or downloaded asynchronously. - The "manage" and "restore" tabs are merged into a single tab where user can install/uninstall/update/restore. - All metadata are downloaded from Extensions Server. The metadata is cached for offline access and to reduce extensions server load. - Dependent extensions are installed automatically by default, to simplify extension installation. Manual installation (user confirmation) can be enabled in extensions settings. - All dependent extensions (even indirect dependencies) are determined at once before asking the user to install them, saving several extra clicks for some extensions. - Extension version and update time (when the package was built) is displayed for the installed extension, and also if there was any update. - Close/restart button is not enabled until batch processing (install all/update all extension) are completed. - Multiple files can be selected when installing extension from file. - Extensions server website can be opened from the extensions manager. This makes it easier to download extensions for offline installation from file or when firewall or proxy settings prevent the extensions manager from working. - Fixed display of icons of many extensions: icons that were hosted on servers with 301-redirect were not displayed. Fixes Slicer#5469 - Add last modified date for extensions Fixes Slicer#5908 - Extension updates not found in stable version Fixes Slicer#5470 - Add "Update Extension" option under Manage Extensions Fixes Slicer#5341 - Add favorite extensions list to Extensions manager See Slicer#4936 - Slicer 5.0 Extension Manager: Manage Extensions Tab icons Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillion@kitware.com> Co-authored-by: James Butler <jbutler@sonovol.com>
c1b3a76
to
5277bb8
Compare
Probably the icons are not taken from the s4ext file in the extension index but from the top-level CMakeLists.txt file. BreastImplantAnalyzer has an invalid icon: https://github.com/lancelevine/SlicerBreastImplantAnalyzer/blob/master/CMakeLists.txt |
Indeed, I have a notebook almost finalized for checking sources, updating source and creating pull request |
Are the icons for the ExtensionsManager/ExtensionsCatalog supposed to be using the links specified in the Extensions Index s4ext files? Is the icon url specified in the s4ext in the Extensions Index used for anything? |
The s4ext file in the ExtensionsIndex repository is only used by the factory machine for getting repository URLs and dependencies. All other information is ignored. The Extensions Server does not know about s4ext files in the ExtensionsIndex repository, but instead it populates its database from the I find the redundancy between the CMakeLists.txt and s4ext files in ExtensionsIndex quite confusing and it is a frequent cause of errors. Maybe we could remove all the other fields from these s4ext files to avoid redundancy. Or we could replace the s4ext files by a single json or csv file in the extensions index that contains the list of extension names, repository urls, and dependencies. That said, I would do this only when we touch the extensions infrastructure anyway. I've created an issue to keep track of this: #6434 |
Since this PR is closed and we already have an issue for the extension icons, I copy the details to that ticket (as a checklist) and we can continue the discussion there: #4936. |
@lassoan I've completed submitting PRs to all the ones you assigned to me. I've provided links to the PRs in #4936 where it is being tracked. |
Awesome, you @jamesobutler. Hopefully maintainers will respond to our PRs. |
Reworked the extensions manager to take advantage of new Girder_v1 APIs:
These enabled implementing the following improvements:
Automatic update check and automatic installation can now be enabled for extensions.
Previously, hundreds of requests were submitted to query all necessary extension
metadata, which caused slowdowns and crashes. Now all metadata can be downloaded in
batch (in 4 requests), very robustly, in 1-2 seconds.
For testing purpose, batch query may also be disabled with
setServerQueryWithLimitEnabled
.If updates are available then a notification marker is displayed over the extensions
manager toolbar icon.
Extensions can be bookmarked and all reinstalled in a different Slicer version by a
single click.
Previously, all extensions that the user have ever installed was offered to be restored, and there was no option to remove any of them. Bookmarked extensions can be installed without the browser widget, which may be useful in cases where proxy servers block the communication between the extensions manager frontend and backend (because only the backend needs to be accessed).
List of bookmarks can be edited as a simple text. This makes it easy to transfer favorite extensions between computers or install a set of extensions at training events.
Extensions Manager is displayed immediately. The user does not need to wait for any downloads.
All data is reloaded immediately from cache or downloaded asynchronously.
The "manage" and "restore" tabs are merged into a single tab where user can install/uninstall/update/restore.
All metadata are downloaded from Extensions Server. The metadata is cached for offline access and to reduce extensions server load.
Dependent extensions are installed automatically by default, to simplify extension installation.
Manual installation (user confirmation) can be enabled in extensions settings.
All dependent extensions (even indirect dependencies) are determined at once before asking the user to install them, saving several extra clicks for some extensions.
Extension version and update time (when the package was built) is displayed for the installed extension, and also if there was any update.
Close/restart button is not enabled until batch processing (install all/update all extension) are completed.
Multiple files can be selected when installing extension from file.
Extensions server website can be opened from the extensions manager. This makes it easier to
download extensions for offline installation from file or when firewall or proxy settings prevent
the extensions manager from working.
Fixed display of icons of many extensions: icons that were hosted on servers with 301-redirect were not displayed.