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

Admonitions? #1340

Closed
dmadisetti opened this issue May 8, 2024 · 3 comments · Fixed by #1447
Closed

Admonitions? #1340

dmadisetti opened this issue May 8, 2024 · 3 comments · Fixed by #1447
Labels
enhancement New feature or request

Comments

@dmadisetti
Copy link
Contributor

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

@akshayka
Copy link
Contributor

akshayka commented May 8, 2024

Yea I've thought about this too.

  1. We can improve callout styling.
  2. I support extending callout in a backward compat way, adding title as an optional parameter. Do we need foldable or can we leave that out for now?

@mscolnick
Copy link
Contributor

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

image

@akshayka akshayka added the enhancement New feature or request label May 9, 2024
@dmadisetti
Copy link
Contributor Author

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>.

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

Successfully merging a pull request may close this issue.

3 participants