Trigger UI update after programmatic UI changes

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Trigger UI update after programmatic UI changes

Post by drmacro »

chennes wrote: Sun Aug 21, 2022 5:42 pm
drmacro wrote: Sun Aug 21, 2022 2:15 pm And, when a change is pushed to github, "blob" is added to the url and it can't read the README.
The "blob" is the rendered version of the README, it's supposed to do that. You can take a look at the ProDark preference pack to see what its supposed to look like.
Are you saying:
  • The rendered version isn't working because the README is wrong
  • The pack is not showing up in the pack list, but in the workbench list, because the README is wrong
  • Or both
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Trigger UI update after programmatic UI changes

Post by chennes »

I'm not really saying any of that -- from your post it wasn't clear to me what was happening, so I only point out that having a URL with "blob" in it is correct for the README.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Trigger UI update after programmatic UI changes

Post by drmacro »

chennes wrote: Sun Aug 21, 2022 5:54 pm I'm not really saying any of that -- from your post it wasn't clear to me what was happening, so I only point out that having a URL with "blob" in it is correct for the README.
This is what I get after any update in the git, but it is fine the first time:
blob.png
blob.png (57.31 KiB) Viewed 1057 times
And the extra repo is set:
AMExtraRepo.png
AMExtraRepo.png (97.36 KiB) Viewed 1057 times
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Trigger UI update after programmatic UI changes

Post by chennes »

Remove the ".git" from the end of the repo (and as a "best practice", add a space and the branch name).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Trigger UI update after programmatic UI changes

Post by drmacro »

chennes wrote: Sun Aug 21, 2022 6:19 pm Remove the ".git" from the end of the repo (and as a "best practice", add a space and the branch name).
I'll fix that tomorrow and try it.


Is it possible (in pre.FCMacro?) to confirm if a workbench is installed and if not, install it?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Trigger UI update after programmatic UI changes

Post by chennes »

Well, it's possible to check if a WB is installed easily enough. The Addon Manager doesn't really have an external API, but if you are distributing your pref pack as an Addon, you can list that WB as a dependency, and the AM will install it for you.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Trigger UI update after programmatic UI changes

Post by drmacro »

chennes wrote: Sun Aug 21, 2022 6:19 pm Remove the ".git" from the end of the repo (and as a "best practice", add a space and the branch name).
Ok, so that seems to have fixed the issue (well, that and the package.xml has to specify the repo without extension as well.)

A note: when AM has an extra repo specified, it never completes the progress bar when AM is opened. It is complete and if the Show or Status combo boxes are changed they show the entries from the repo or updates available.

And, I have yet to get a <depend> to load the specified workbench... what I am missing there?
(Edit: I've now attempted to get my test package.xml to specify both Glass and Lattice2. Neither show after applying the pack. Glass of course, does not meet the criteria, but for Lattice I specified what is in its package.xml <name> field (as noted in https://wiki.freecadweb.org/Package_Met ... Cdepend.3E, but it did not add Lattice upon application...)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Trigger UI update after programmatic UI changes

Post by adrianinsaval »

drmacro wrote: Mon Aug 22, 2022 12:37 pm And, I have yet to get a <depend> to load the specified workbench... what I am missing there?
(Edit: I've now attempted to get my test package.xml to specify both Glass and Lattice2. Neither show after applying the pack. Glass of course, does not meet the criteria, but for Lattice I specified what is in its package.xml <name> field (as noted in https://wiki.freecadweb.org/Package_Met ... Cdepend.3E, but it did not add Lattice upon application...)
The dependencies are installed upon downloading the addon through the addon manager, not when applying the pack, or at least that is my understanding.
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: Trigger UI update after programmatic UI changes

Post by drmacro »

adrianinsaval wrote: Mon Aug 22, 2022 2:59 pm
drmacro wrote: Mon Aug 22, 2022 12:37 pm And, I have yet to get a <depend> to load the specified workbench... what I am missing there?
(Edit: I've now attempted to get my test package.xml to specify both Glass and Lattice2. Neither show after applying the pack. Glass of course, does not meet the criteria, but for Lattice I specified what is in its package.xml <name> field (as noted in https://wiki.freecadweb.org/Package_Met ... Cdepend.3E, but it did not add Lattice upon application...)
The dependencies are installed upon downloading the addon through the addon manager, not when applying the pack, or at least that is my understanding.
Well, that could be...but, it didn't.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3884
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Trigger UI update after programmatic UI changes

Post by chennes »

That is indeed how it is supposed to work: I’m doing some refactoring in that area now, I’ll add a test case.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply