[Merged] PR #5131: Addon Manager Redesign
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Merged] PR #5131: Addon Manager Redesign
I could use some testers for the newly-refactored Addon Manager. Details in the PR. It's mostly under-the-hood changes that implement support for the new package.xml metadata file, and for preference packs, but there are a few user-interface tweaks in there as well:
Edited to add: As the PR evolved I ended up changing the UI much more significantly after all: see post below.
Here's what it looked like at the beginning of this PR:
Edited to add: As the PR evolved I ended up changing the UI much more significantly after all: see post below.
Here's what it looked like at the beginning of this PR:
Re: PR #5131: Addon Manager Refactor
Indeed those are massive changes hard to review from a mobile.
Just a question : what is the currently minimal Python version required for FreeCAD? I saw you're using some "recent" features.
And another one not directly linked : is there a thread already to discuss metadata system?
Just a question : what is the currently minimal Python version required for FreeCAD? I saw you're using some "recent" features.
And another one not directly linked : is there a thread already to discuss metadata system?
Re: PR #5131: Addon Manager Refactor
We require Python 3.6 for 0.20 -- I don't think I used anything that required anything newer than that, but please let me know if you see something.
The main (recent) metadata discussion is here.
The main (recent) metadata discussion is here.
Re: PR #5131: Addon Manager Refactor
ATM I just saw function annotations and f-strings which were (IIRC) respectively introduced in 3.3 and 3.6, so everything looks fine. Just backporting could eventually be a problem.
Re: PR #5131: Addon Manager Refactor
Hello Chennes!chennes wrote: ↑Wed Oct 27, 2021 6:54 pm I could use some testers for the newly-refactored Addon Manager. Details in the PR. It's mostly under-the-hood changes that implement support for the new package.xml metadata file, and for preference packs, but there are a few user-interface tweaks in there as well:
AddonManagerRefactor.PNG
I have question to new "Addon manager" - will be updated in weekly built in next sunday?
Have nice day!
Marcin
Re: PR #5131: Addon Manager Refactor
I'd prefer to get a few other people to test it in PR form before I merge it, so I don't know if I'll make it into this week's weekly, or wait until next.
Re: PR #5131: Addon Manager Refactor
Would it be possible to cache the addon data that is fetched at Addon Manager startup ?
I, as an example, have a slow internet connection (180 kB/s) so every Addon Manager startup is around 1mn 20s long.
It would be great to have a Refresh button in the Addon Manager window (maybe with a text, next to it, saying "last refresh on 2021/10/21"), and maybe a parameter to configure the refresh policy :
- always = on every Addon Manager startup
- on first Addon Manager startup of a FC session
- manual (the refresh button)
Also, the workbenches that have a metadata file, don't get their README.md displayed.
Would it be possible to display either the README, below the metadata, or another specific AddonManager.md file so that the workbench author can have control on the presentation of the workbench into the Addon Manager ?
I, as an example, have a slow internet connection (180 kB/s) so every Addon Manager startup is around 1mn 20s long.
It would be great to have a Refresh button in the Addon Manager window (maybe with a text, next to it, saying "last refresh on 2021/10/21"), and maybe a parameter to configure the refresh policy :
- always = on every Addon Manager startup
- on first Addon Manager startup of a FC session
- manual (the refresh button)
Also, the workbenches that have a metadata file, don't get their README.md displayed.
Would it be possible to display either the README, below the metadata, or another specific AddonManager.md file so that the workbench author can have control on the presentation of the workbench into the Addon Manager ?
Re: PR #5131: Addon Manager Refactor
Yes - in fact, the metadata is already being cached, but so few repos have it that it's unnoticeable. I'd like to institute caching of the READMEs as well, but that won't happen in this PR. It's on my radar: even on a fast internet connection, it seems stupid for a second launch of AM in the same FreeCAD session to take so long. I like your parameter suggestion, I'll file it away for when I'm working on that project. I'd really like cache reload to happen in the background, so you can continue to use the AM even while that's processing.
I want to move us away from having to scrape the HTML of the README from an online renderer: so my ideal solution is to display the README (which would be cached, of course) only if the user has the Markdown library installed. The HTML scraping only works for Github right now, and is very fragile.Also, the workbenches that have a metadata file, don't get their README.md displayed.
Would it be possible to display either the README, below the metadata, or another specific AddonManager.md file so that the workbench author can have control on the presentation of the workbench into the Addon Manager ?
Re: PR #5131: Addon Manager Refactor
OK, I redesigned the GUI, taking some more cues from @mnesarco's ExtMan. It looks and works much more like e.g. Ubuntu's software manager now, including displaying the README.md file wholesale whenever possible. I will talk to the packagers about getting the Markdown library included as part of the normal FreeCAD installation so we can eliminate the scraping code eventually.
I also implemented much more aggressive caching of the downloaded data, so the whole thing should feel faster now, especially after the first cache is done. Basically everything that is ever downloaded is cached, with a user-configurable cache lifetime. And the GUI should be responsive even while the macro list and metadata cache are being updated, and the update check is being conducted.
Here's how it looks now:
Expanded view Compact view: Details page:
I also implemented much more aggressive caching of the downloaded data, so the whole thing should feel faster now, especially after the first cache is done. Basically everything that is ever downloaded is cached, with a user-configurable cache lifetime. And the GUI should be responsive even while the macro list and metadata cache are being updated, and the update check is being conducted.
Here's how it looks now:
Expanded view Compact view: Details page:
mnesarco wrote: Ping
Re: PR #5131: Addon Manager Redesign
Hi @chennes, it looks pretty good. Nice work.