-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
docs: improve how to use <details>
#10173
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be ok to modify the example
However we try to keep the docs short and concise, not to explain every MDX quirk in depth. There's the MDX docs for that.
The warning is way too visible and draw way too much attention to it while most readers shouldn't care much. I'd prefer to remove the warning entirely. If you want to keep it, make it short (max 3 lines) and add a link to relevant MDX docs page. If it's not documented on MDX, make a doc PR to MDX instead. If they don't accept the doc PR, then link to the GitHub issue/discussion explaining the problem. If details must be included, hide them by default in a <details>
element to make them less visible.
You see the idea. The goal is not for the docs to become too long because every one document every quirk ever encountered 😅 We care about the experience of reading the docs more than the exhaustiveness of it. Sometimes not having something in the doc is a feature, not a bug.
</details> | ||
|
||
</BrowserWindow> | ||
```` | ||
|
||
:::warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section is way too big and visible
Looks like Docusaurus (Prism itself?) doesn't support the highlight for |
Thanks, still think it's a bit too much but let's move on |
Oh, I've been planning to fix it if you suggest me a changing plan. I think it probably can be a little more shortened with others' help. |
I think I have to send a PR to MDX's document as you pointed out. |
Also I've just found I fell asleep before pushing the backport change to 3.3 to GitHub... |
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
Pre-flight checklist
Motivation
The current example for
<details>
is not ideal one.<div>
elements, which confuse readers (You don't have to use them; they. They're just optional and not mandatory)<div>
confuse the block and inline notationsBlock notation:
Inline notation:
Test Plan
https://deploy-preview-10173--docusaurus-2.netlify.app/docs/markdown-features#details
https://deploy-preview-10173--docusaurus-2.netlify.app/docs/3.3.2/markdown-features#details
Test links
Deploy preview: https://deploy-preview-10173--docusaurus-2.netlify.app/
Related issues/PRs