sphinx-togglebutton icon indicating copy to clipboard operation
sphinx-togglebutton copied to clipboard

Use `sphinx-design` for our `{toggle}` directive and eventually deprecate it

Open choldgraf opened this issue 3 years ago • 0 comments

Context

Currently we use JavaScript to look for classes and convert objects with those classes into a toggle-able admonition or details block. This is what we use in MyST-NB to show/hide cells.

However, sphinx-design has its own dropdown directive that has more functionality and flexibility. It is unnecessary for us to maintain our own custom directive here as well as in Sphinx Design.

Proposal

I propose that we consider phasing out the direct use of the {toggle} directive here, by doing the following things:

  1. Make {toggle} re-use Sphinx Design by default
  2. Raise a warning suggesting that people use Sphinx Design instead
  3. Eventually deprecate the {toggle} directive.

Eventually we might even be able to deprecate this whole package if we can get the same functionality via sphinx-design and myst-nb.

Tasks and updates

No response

choldgraf avatar Jul 14 '22 12:07 choldgraf