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
Custom extensions #45
Conversation
Docs require sphinxcontrib-details-directive, and use it instead of sphinx-design dropdown directive. This also reverts the currently erroneous fix to jbms#15. Add `md-tab-set` & `md-tab-item` directives. Update docs with new page on how to use these new directives.
- updates docs about the details directive - adds page that demonstrates how to use the md-mermaid directive.
I've started seeing a deprecation warning when executing
Seems to only appear in python v3.10+ or could be caused by pip v22.0.4 - CI is currently using python v3.9.x and pip v22.0.3 EDIT: This warning is resolved by putting import setuptools # pylint: disable=wrong-import-order before the import to |
Overall, great work here! I think we should try to fix the indicator line beneath the tab. Probably adding some console.log statements to the javascript code may help in figuring out what is going on. |
I looked into the indicator line issue -- turns out it is a bug in mkdocs-material which appears to have been fixed in the insiders version. I reported it here: |
Thanks for making the changes --- it is true there are many ways to implement things and it is not always clear what the best approach is --- I think it is true that your initial approach of using a post transform was perfectly valid. I just was recently trying to improve the efficiency of documentation generation for tensorstore, where due to the large number of pages generated for the api documentation, it can be rather slow, so I was acutely aware of efficiency concerns. My thinking is also that ideally the docutils nodes represent semantically meaningful things, and then the HTML translator converts that to HTML. In this case, the input elements aren't really a semantically meaningful thing on their own, they are just how it happens to be implemented in HTML, so it seems nice to encapsulate that in the HTML translator if possible. |
Regarding the indicator line issue -- if that doesn't get fixed in upstream mkdocs-material soon that should be easy to fix here. I also think it would be fairly easy to implement the linked tabs feature if we want it, though I wonder if that should be enabled via a |
Whatever upstream does to do it would be preferable. If it ends up being harder to implement here, then I would also favor a
I wouldn't be surprised if we could support both approaches (global & tab-item keys) - not simultaneously I imagine. |
It wouldn't be hard to support it exactly as in mkdocs-material --- logically though it seems like it may be more useful to allow the user more flexibility. As you note --- it is easier to support additional options in rst than in markdown. |
Thanks! |
Either way, we'd have to brush up on rxjs syntax if the |
I still don't fully understand pushing tags directly. I tagged the merge commit f925a44 with v0.4.0, but the CI didn't seem to run on that commit. Docs are also not updated because the CI didn't run on main branch. |
Yeah I can take a look at adding the linked support. I am bit confused by what is going on with github actions --- we have seen issues before with it not triggering on this repository. The config is identical to what I have on other repositories where it seems to work reliably, so I'm not sure what is going on here. |
Actually I'm not seeing your tag. After you create a tag locally, you have to specifically push the tags to the remote repository:
|
Its got to be related to PRs coming from other forks. I just switched my remotes to only use this repo from here on out. They recently added a new event (for security concerns) specific to this situation. You can also use RTD updated the "stable" build on the merging of this PR, so I think its related to event.
I did, but then I removed it when I realized the CI wasn't triggered for main. I'm going to try adding a |
well I got it to publish, but it keeps triggering twice
This might be problematic for some scenarios of bumped version numbers. As witnessed when I pushed v0.3.1 tag:
|
Yeah, it will trigger twice, but I think that isn't too big of a deal. The error you are seeing is for an upload to the test PyPI instance. Only the action run triggered by the tag push will upload to the non-test PyPI instance. |
Unfortunately, such an error will cause the badge on the readme to indicate the failure to upload to test-pypi. I believe we can tell the workflow to ignore the error for that specific step |
New Directives
These new directives are automatically added to doc builds because they are tied to our CSS:
md-tab-set
andmd-tab-item
which resolves Content tabs #43 (includes a new doc page to demonstrate CSSclass
/id
usage)md-mermaid
to expose the implementation merged in from upstream (includes a new doc page to demonstrate CSSclass
/id
usage).Patches
sphinxcontrib-details-directive
which is applied only when the directive is installed. This patch allows us to use the:class:
option to specify styling for collapsible admonitions. resolves CSS for details/summary html tags is tied to admonitions' CSS #15 againsphinx-design
in docs' builds, but addssphinxcontrib-details-directive
to the docs' extensions/reqs.Known bug (very minor annoyance)
Upon page refresh, the tabs' highlighted bottom border always resets to the first tab (unexpected behavior), but the displayed tab content and highlighted tab label do not reset (expected behavior). I suspect it has something to do with how the JS loads on page refresh, but I'm not too concerned at this point.
before refresh
after refresh