Skip to content

docs: fence the TSDoc usage examples (Tabs, Dropdown) so they render as code#65

Merged
lifeiscontent merged 1 commit into
mainfrom
docs/fence-tsdoc-examples
Jun 10, 2026
Merged

docs: fence the TSDoc usage examples (Tabs, Dropdown) so they render as code#65
lifeiscontent merged 1 commit into
mainfrom
docs/fence-tsdoc-examples

Conversation

@lifeiscontent

@lifeiscontent lifeiscontent commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Autodocs renders each component's description as Markdown. The Tabs and Dropdown root TSDoc had indented JSX usage examples, and Markdown parses the JSX tags as raw HTML, so the wrapper tag (</Tabs> / </Dropdown>) leaks out of the code box and the example renders broken (see the Popover report).

Fix: wrap both examples in ```tsx fenced blocks so they render as one syntax-highlighted code block. Comment-only; no code change. Same fix is on #53 (Popover) and #15 (TableEditableCell). Verified the equivalent fix renders correctly on the Popover docs page.

Autodocs renders the component description as Markdown, so an indented JSX example
gets parsed with its tags as raw HTML and the wrapper tag (e.g. </Tabs>) leaks
outside the code box. Wrap both examples in ```tsx fences so they render as a
single code block. Same fix as Popover (#53).
Copilot AI review requested due to automatic review settings June 10, 2026 14:54
@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-65-propel-storybook.vamsi-906.workers.dev

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Storybook autodocs rendering for the Tabs and Dropdown root TSDoc usage examples by converting indented JSX snippets (which Markdown can misparse as raw HTML) into fenced tsx code blocks so they render as a single syntax-highlighted code block.

Changes:

  • Fence the Tabs root TSDoc JSX usage example with a tsx Markdown code block.
  • Fence the Dropdown root TSDoc JSX usage example with a tsx Markdown code block.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/propel/src/components/tabs/index.tsx Converts the Tabs root usage example to a fenced tsx code block for correct autodocs rendering.
packages/propel/src/components/dropdown/index.tsx Converts the Dropdown root usage example to a fenced tsx code block for correct autodocs rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lifeiscontent lifeiscontent merged commit 348ea7f into main Jun 10, 2026
3 checks passed
@lifeiscontent lifeiscontent deleted the docs/fence-tsdoc-examples branch June 10, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants