docs: change default <story> language to html#4798
Conversation
|
There was a problem hiding this comment.
Pull request overview
Updates the documentation rendering so <Story> defaults to showing HTML output (web-first), reducing the need to manually specify language="html" across MDX pages.
Changes:
- Set the MDX
<Story>wrapper component to defaultlanguagetohtmland forward it toLiveComponent. - Remove redundant
language="html"usages from several MDX docs. - Explicitly set
language="react"for React-focused Dropdown examples that should still default to React.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/www/app/content/components/table/no/code.mdx | Drops explicit language="html" for a Story example. |
| apps/www/app/content/components/dropdown/no/overview.mdx | Drops explicit language="html" from the preview Story. |
| apps/www/app/content/components/dropdown/no/code.mdx | Drops explicit language="html" from the preview Story. |
| apps/www/app/content/components/dropdown/en/code.mdx | Removes language="html" from preview and sets language="react" for React sections. |
| apps/www/app/_components/mdx-components/mdx-components.tsx | Changes <Story> default language to html and forwards language to LiveComponent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Story story="WithoutTrigger" language="react"/> | ||
|
|
||
| ### Controlled | ||
|
|
||
| If you submit `open`, then you use `Dropdown` controlled. You can use `onClose` to get notified when `Dropdown` wants to close. | ||
|
|
||
| Note that we do not use `onClick` on the trigger, the dropdown handles this internally and sends to `onOpen` and `onClose`. | ||
|
|
||
| <Story story="ControlledEn" /> | ||
| <Story story="ControlledEn" language="react"/> |
There was a problem hiding this comment.
These Story tags use language="react"/> without a space before the self-closing "/>". Please format them consistently with the rest of the file as ... language="react" /> (or run the formatter) to avoid inconsistent markup.
|
Preview deployments for this pull request: www - |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Now that we are going web-first it makes sense that the default language for
<story>ishtml.This will also help us reduce having to set
langauge='html'on overview and a11y pages.