Closed maximousblk closed 3 years ago
Hi,
There are many example of details/summary view on this D2 website: https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/default_props
MDX currently has some limitations, it does not have proper support for "markdown interleaving"
The trick is to skip lines around your details content, and MDX will understand that the inner content is MDX, and you'd be able to use MDX syntax.
Anyway, I wouldn't be against having first-class support for this kind of feature.
Also think we could style it a bit better, as I think it can be hard to see the "end" of the details view.
There are many advanced exemples possible here, some are lightweight / CSS only: https://freefrontend.com/html-details-summary-css/ https://codepen.io/frogmcw/pen/deqRwa
Can be an issue for MLH
@yangshun could this be in Infima?
that looks good to me :)
@slorber Is it alright if I take up this issue to work on?
Hi @FocalChord
I think this should be done in Infima, so I'm not against but we should see first with @yangshun if you can have access
@maximousblk will implement this in https://github.com/facebook/docusaurus/issues/2924
Do we really need to have a special syntax, or using details/summary tags with MDX is good enough?
it would be better to keep it consistent with other admonitions but it's fine if there's a reason to not do that.
We can add that :::details
syntax but it would be a different feature as it requires extending the markdown syntax with remark. We may be able to leverage our existing admonitions plugin to do so.
π Feature
A callout that functions like the HTML details tag
Have you read the Contributing Guidelines on issues?
yes
Motivation
I was trying to put logs in my documentation and it was not ideal because I had to use HTML for all the content inside the details tag
Pitch
Syntax (nothing new):