Skip to content

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

@choldgraf

Description

@choldgraf

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions