-
-
Couldn't load subscription status.
- Fork 782
Centralize info for API documentation #3836
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
Conversation
e60516a to
3428181
Compare
|
Note: if you're building this locally, make sure to pass -r to tox to rebuild the environment. The dependencies list hasn't changed, but it needs the updated version of BeeWare Docs Tools. |
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.
This looks great! As RTD was being unusually slow, I pulled the PR down to build, and go through every updated page to verify how it's rendering. I found a couple of issues, noted below. The one that might toss a wrench into things is the need for the Toga APIs By Platform Component list to be primarily formatted as inline code. Otherwise, this is an excellent update. Cheers!
I'm not sure this is necessary. That said, I know Russ has thing about broken links, so I'll let him speak to this. This PR isn't so big that I wouldn't recommend adding this if desired. A lot of this content is repeated, so the review process is pretty smooth, which is the concern. |
Fix wrong widget poppies Co-authored-by: Kattni <[email protected]>
Fix another wrong widget oopsie Co-authored-by: Kattni <[email protected]>
I do indeed have a thing about broken links. If there's a relatively simple workaround that will turn all However, I agree it that be a separate PR. |
|
@johnzhou721 Heads up / reminder on incoming merge conflicts for #3769 — sorry! |
|
@HalfWhitt No, not your fault. I should've caught this issue and shaved this yak sooner when I thought about updating the Qt documentation. |
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.
An awesome cleanup - thanks!
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! Thanks for the update! I really like the YAML setup.
This is an attempt to consolidate some of the info for the API component documentation, so that there's less repetition, and thus less possibility of drift. It also fixes #3818 (changing all the title/links in the "APIs by platform" page to normal text and page links instead of code cross references) and makes a bit of progress toward #3819 by fixing some title case in the touched files.
As of beeware/beeware-docs-tools#69, the BeeWare docs tools support the creation of custom macros in Python code. I've added a macros module, and defined macros in it for generating:
There was already some drift between the descriptions on the index page, the individual pages, and the CSV; I mostly went with what was on the index, except for a few which were more fleshed out on the individual page. I've also put a period at the end of each, since this was inconsistent (and some do contain full sentences).
As John pointed out, there was some drift in the supported platforms in the tabbed screenshot views too; now they pull directly from the CSV. They also all include automatically generated alt text, e.g. "MainWindow on macOS". ImageView was the sole component that used the same image file for multiple platforms; rather than make an exception in the code, I copied and renamed the file. I imagine we can live with an extra 30 KB... but let me know if you'd prefer the opposite approach.
I also fixed a broken link that was pointing to tutorial/tutorial-1.html. (Edit: not only did I accidentally not commit that, I'd missed a newer change to the same link and had to rebase to pull it in.)
Speaking of which, all the ".html" URLs from the old docs are broken with this overhaul. Perhaps mkdocs-redirects would be worth looking into... but this PR is already pretty big.[Edit: handled in RTD settings]Speaking of things that might still be good to do:
pymdownx.blocks.htmlapproach or maybe even this fork of attr-list (or applying its changes to the more current code).widgets_by_platform.csvtoapis_by_platform.csv, since it's not just widgets (and to match the pages' actual title). I didn't change the markdown file's name though, or any others, to make them more consistent or in line with their titles. That can be a separate thing to (potentially) do, and appropriately redirect.PR Checklist: