AddonManager: Render different addon documents on a tabbed group#18199
AddonManager: Render different addon documents on a tabbed group#18199hasecilu wants to merge 2 commits intoFreeCAD:mainfrom
Conversation
|
An update to the https://wiki.freecad.org/Package_Metadata (package.xml) documentation will be required as well. |
|
I was making some tests like adding URLs on the metadata (instancezero/in3dca-freegrid@63c0474) but would be really needed? The URL of the README on the metadata is the Is there another file for which would be useful to show to users? I usually add a README file on the translations directory until now I only have put instructions there but maybe adding a table with progress for each language is informative. |
18edb91 to
4038244
Compare
|
I was thinking on extending the specification to contain the relative path of the document like: <changelog>./CHANGELOG.md</changelog>
<contributing>CONTRIBUTING.md</contributing>When we need raw or blob URL we can use the updated I don't like the README way because it directly assigns a branch on the URL: <url type="readme">https://github.com/instancezero/in3dca-freegrid/blob/main/README.md</url>And when I add a custom URL for a testing branch, the AM still tries docs from main branch, but this is an edge case. An alternative way would be to add entry like LICENSE. where file is specified <license file="LICENSE">AGPL-3.0-or-later</license>
<changelog file="CHANGELOG.md"></changelog>
<contributing file="CONTRIBUTING.md"></contributing>augmenting metadata spec with this entries we can construct the needed URLs. |
| self.dialog.documentationURLLineEdit.setText(url["location"]) | ||
| elif url["type"] == "discussion": | ||
| self.dialog.discussionURLLineEdit.setText(url["location"]) | ||
| # TODO: add changelog and contributing |
There was a problem hiding this comment.
If added to spec...
|
Hi, since you changed |
| self.contrib_browser = WidgetReadmeBrowser(self) | ||
| self.license_browser = WidgetReadmeBrowser(self) | ||
|
|
||
| # TODO: notify WB maintainers to include CHANGELOG and CONTRIBUTING files |
There was a problem hiding this comment.
We can open a tracking ticket on FreeCAD-Addons when this PR is merged.
There was a problem hiding this comment.
Can the "Addon developers" group on on FreeCAD's GitHub org emit announcements?
4038244 to
1cd132e
Compare
8607654 to
c833fc8
Compare
Previously only the README file was rendered when opening addon details, this change introduces the addition of more relevant documents: CHANGELOG, CONTRIBUTING and LICENSE.
c833fc8 to
53cb878
Compare
| contributing = auto() | ||
| license = auto() | ||
| readme = auto() | ||
| picture = auto() # TODO: for gallery |
There was a problem hiding this comment.
Could work like that if images are included on the repo, otherwise we could use URLs to the images.
| # List of urls | ||
| metadata.url.append(MetadataReader._parse_url(child)) | ||
| elif tag == "doc": | ||
| metadata.docs.append(MetadataReader._parse_doc(child)) |
There was a problem hiding this comment.
Created new tag
Tested adding testing branch to AM on settings -https://github.com/instancezero/in3dca-freegrid/tree/test/am_docs
<doc type="readme">README.md</doc>
<doc type="changelog">CHANGELOG.md</doc>
<doc type="contributing">CONTRIBUTING.md</doc>|
Thanks for helping improve FreeCAD! If the PR is still relevant, let us know by adding a comment. If you would like to keep working on this pull request, we advice to rebase it on current main branch, ask feedback from users or maintainers and engage with the community to get it forward. |
Works as expected but probably it's better to tweak a little the code. Are plans to update the package metadata format? Not sure if it really interesting to h ave the license.
Important
As of now documents URL are hardcoded, probably is better to only hardcode the
package.xmlURL and then from it parse all needed URLS, but as of now contributing or changelog are not in the specification.Fix FreeCAD/AddonManager#5