marimo
marimo copied to clipboard
Admonitions?
Description
I noticed you all do this in the docs quite a bit, and I'm a fan of them too.
I think github native supports them:
[!NOTE]
Highlights information that users should take into account, even when skimming.
[!TIP] Optional information to help a user be more successful.
[!IMPORTANT]
Crucial information necessary for users to succeed.
[!WARNING]
Critical content demanding immediate user attention due to potential risks.
[!CAUTION] Negative potential consequences of an action.
mkdocs has the following notation:
!!! note
Hello
which is what the markdown extension triggers on: https://github.com/Python-Markdown/markdown/blob/ec8c305fb14eb081bb874c917d8b91d3c5122334/markdown/extensions/admonition.py#L53
but also has ??? for collapsable.
Looks like the implementation in the docs.marimo.io actually comes from rst support?
Suggested solution
Something to consider; callouts by themselves are a little loud
callout(title="", body="", kind="", foladable=False) could make a admonition
Alternative
callouts are cool- and they're left as is
Additional context
Was just converting a notebook and thought about it again. I sort of put the beginnings of md interop in exporter/utils, but forgot to strip to out
Yea I've thought about this too.
- We can improve callout styling.
- I support extending
calloutin a backward compat way, addingtitleas an optional parameter. Do we needfoldableor can we leave that out for now?
We can have 2 callout stylings if we want - for example Chakra has 4: subtle, solid, left-accent or top-accent..
We can at least have 2: subtle and left-accent maybe
I'm a fan of folding- but get if it's a won't fix.
Might be possible to replicate the fold as a user with <details>.