Skip to content
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

Support dropdown class attribute #32

Closed
psychemedia opened this issue Mar 7, 2022 · 8 comments
Closed

Support dropdown class attribute #32

psychemedia opened this issue Mar 7, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@psychemedia
Copy link

psychemedia commented Mar 7, 2022

Describe the problem/need and solution

The :class: dropdown element does not appear to be supported within a special content (admonition) block.

Are pure CSS solutions available to implement this sort of feature without then requiring any change to the HTML structure of the rendered cells other than changes to the class attribute?

Guide for implementation

No response

Tasks and updates

No response

@psychemedia psychemedia added the enhancement New feature or request label Mar 7, 2022
@psychemedia psychemedia changed the title Support dropdown class atribute Support dropdown class attribute Mar 7, 2022
@nthiery
Copy link

nthiery commented Jan 28, 2023

Dropdown admonitions in JupyterLab would be great for teaching: in particular for
tips / solutions that student don't see by default but can reveal if they feel the need for it.

Looking forward to them! Is there a timeline?

Thanks in advance!

@agoose77
Copy link
Collaborator

@nthiery are you using jupyterlab-myst in a teaching context? It's good to get a sense of who are users are.

The long-term plan for MyST support in JupyterLab is likely to become https://github.com/executablebooks/jupyterlab-mystjs. This is a MyST-first integration into JupyterLab, rather than an add-on renderer, which is what jupyterlab-myst is similar to. I recommend that you keep an eye on that repository. I can't recall exactly how feature-complete it is vs jupyterlab-myst, but I'll be contributing over there once my time frees up.

@nthiery
Copy link

nthiery commented Jan 29, 2023

Yes indeed! Admonitions are very helpful to structure the text and catch the eye
of students on specific points. So far, we have been using div's but it's not
as comfortable. Now that we have support in jupyterlab, we are progressively
migrating to myst admonitions, and we will use them much more, especially
with features like dropdowns and the like.

See e.g.:

https://nicolas.thiery.name/Enseignement/IntroScienceDonnees/Devoirs/Semaine2/1_analyse_de_donnees.html#conclusion

@nthiery
Copy link

nthiery commented Jan 29, 2023

Thanks for the pointer to jupyterlab-mystjs!

@rowanc1
Copy link
Member

rowanc1 commented Jan 30, 2023

Feel free to install the jupyterlab-mystjs extension -- it is still very new! Internal images and links are currently broken, hoping to fix up by the end of this week! Tracking internationalization here and here.

Dropdown admonitions do work though! :)

@nthiery
Copy link

nthiery commented Jan 31, 2023

Ah ah, I tried jupyterlab-mystjs and dropdown indeed worked smoothly. I am
still stuck with md:myst notebooks
and possibly internationalization, but it's getting so close now. Keep it up!

@rowanc1
Copy link
Member

rowanc1 commented Feb 13, 2023

I hope most things are fixed now with dropdowns now that the latest release has been brought together with #57.

image

There is still a pass on styles that needs to be done relatively soon (e.g. with the toggle button not rotating). The dropdown is also html/css powered now, so you can also add other classes that respond to the details[open] css if you want @psychemedia.

Please reopen or comment if I have missed something in this issue!

@rowanc1 rowanc1 closed this as completed Feb 13, 2023
@psychemedia
Copy link
Author

@rowanc1 looks good running in MyBinder to me... as you suggest, the arrow toggle is not there yet, but the essential dropdown functionality is:-)

I just need to persuade folk I work with that we should now upgrade our markdown to myst!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants