Description
Describe the bug
Context and Expectation
I'm trying to create a multi-language API document, and I want to nest together tabs, directives etc. to organize language-specific and language-agnostic information in concise ways. I found Sphinx-Design to be helpful in that - and wanted to automate the creation of new elements by replacing manually-defined nested directives with those that are automatically defined using custom directives. However, I ran into an issue where I can create just dropdown elements just fine, and just tab-sets/tab-items just fine. ...but I can't seem to create instances where a dropdown is the parent of a tab-set.
See my reply to issue 217 for relevant error messages. I isolated this behavior in this repo and commit, which consists of a single-page Sphinx Book Theme doc with two dropdowns:
- Expected behavior: A dropdown directive is manually defined, and a manually defined tab-set directive (which, in turn, contains two tab-item elements) is inside it.
- Actual behavior: A dropdown is automatically created, but all contents of the tab-set and tab-item directives just render as plain text inside the dropdown.
Any suggestions on how to get started?
Reproduce the bug
- Create a local directive subclassed from SdDirective
- Create a Sphinx document with Sphinx-Design that calls the directive
- Populate the directive's "run" method with a constructor for multiple "tab-item" nodes
- Also add a constructor for a "tab-set" node to contain the "tab-item" nodes in the previous step
- Ditto, but for a "dropdown" node; you must convert the tab-set node into a string, or else Sphinx's build process fails?
- Build the document
Note that I made commit 97244c5
of this repo to recreate this issue in an isolated environment. Please feel free to clone and build it, as an alternative.
List your environment
- Sphinx 8.1.3
- MyST-Parser 4.0.0
- Sphinx-Design 0.6.1
- Sphinx Book Theme 1.1.3
- PyData Sphinx Theme 0.15.4 (per this issue)