executablebooks / sphinx-panels

A sphinx extension for creating panels in a grid layout
https://sphinx-panels.readthedocs.io
MIT License
86 stars 20 forks source link

Directive for dropdown/toggle with no title? #19

Open chrisjsewell opened 4 years ago

chrisjsewell commented 4 years ago

things like code cells.. Maybe that's out-of-scope for this directive though?

Yeh thats a bit more tricky. I think for details there has to be at least some kind of element above the content that you're hiding, as opposed to the button to the side that you have now. It doesn't have to be a whole banner though, e.g. the emoji buttons on this page uses details

Originally posted by @chrisjsewell in https://github.com/executablebooks/sphinx-panels/issues/14#issuecomment-629417723

chrisjsewell commented 4 years ago

What would be the "ideal" UI/UX for this? i.e. what would the content look like closed/open, where does the user click to collapse/expand?

In sphinx-togglebutton: sphinx-togglebutton-collapse-output

In jupyter-lab: jupyter-lab-collapse-output

chrisjsewell commented 4 years ago

Note that, if this was to fully supersede sphinx-togglebutton, it would also need to cover the use case of adding togglability to existing containers: https://sphinx-togglebutton.readthedocs.io/en/latest/#toggling-content-by-adding-classes. This is particularly neccessary for collapsible cells in MyST-NB: https://myst-nb.readthedocs.io/en/latest/use/hiding.html