Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Oct 30, 2025

Update component docs to new format with example-first structure

Summary

Updated all 23 component documentation pages in the default-components directory to follow a new standardized format inspired by Fumadocs. The new structure prioritizes showing working examples first, followed by usage instructions, variants, and finally the API reference.

New structure:

  1. Intro paragraph explaining the component
  2. Visual example first (no Tabs wrapper)
  3. ## Usage section with markdown code block showing basic usage
  4. ## Variants section with subsections for additional examples/variations
  5. ## Properties section at the end with API reference

Key changes:

  • Removed <Tabs> wrappers that separated "Example" and "Markdown" tabs
  • Moved all visual examples to appear immediately after the intro paragraph
  • Converted nested example sections into flat Variants subsections
  • Applied sentence case to headings (e.g., "Getting Started" → "Getting started")
  • Updated some example content to use plant-themed examples for consistency

Files updated (22 total):
accordions.mdx, accordion-groups.mdx, anchor.mdx, aside.mdx, badges.mdx, button.mdx, callouts.mdx, cards.mdx, card-groups.mdx, code-blocks.mdx, embed.mdx, endpoint-request-snippet.mdx, endpoint-response-snippet.mdx, endpoint-schema-snippet.mdx, runnable-endpoint.mdx, frames.mdx, icons.mdx, parameter-fields.mdx, steps.mdx, sticky-tables.mdx, tabs.mdx, tooltips.mdx

Review & Testing Checklist for Human

  • Preview all 23 component pages in the deployment preview - only 2 pages (Accordions, Tabs) were manually tested locally
  • Test interactive components - verify accordions expand/collapse, tabs switch correctly, tooltips appear on hover, and sticky table headers stay fixed when scrolling
  • Verify content preservation - spot check complex pages (endpoint-schema-snippet.mdx, tooltips.mdx, code-blocks.mdx) to ensure no information was lost during the significant restructuring
  • Check link functionality - verify internal links and anchor references still work, especially in pages with anchor examples (anchor.mdx) and cross-references
  • Review for additional Vale issues - CI passed but Vale wasn't run locally until after PR creation; manually check a few pages for style compliance

Test Plan

  1. Navigate through all component pages in preview deployment
  2. Test one example from each of: accordions, tabs, tooltips, sticky tables, steps
  3. Click several internal links to verify they navigate correctly
  4. Spot check 5-6 pages for content accuracy vs git diff

Notes

  • This is a documentation formatting change only - no functional code changes to component implementations
  • The structure is now consistent across all 23 component pages
  • Fixed 4 Vale style warnings found during PR review (adverbs, sentence case, punctuation)
  • Some example content intentionally changed (e.g., user/auth examples → plant-themed examples)
  • Complex pages like endpoint-schema-snippet.mdx (126 lines) had multiple nested Tabs flattened into Variants subsections

Session info:

Local testing screenshots:

  • Accordions page: Accordions screenshot
  • Tabs page: Tabs screenshot

- Move visual examples to the top of each component page
- Add Usage section with markdown code blocks
- Convert sections to Variants subsections
- Keep Properties section at the end
- Remove Tabs wrappers around examples
- Updated all 23 component pages in default-components directory

Co-Authored-By: Kapil Gowru <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

href="/learn/docs/writing-content/components/cards"
>
Generate a Python SDK and publish to PyPi
Learn how to properly water your plants
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Adverbs] Remove 'properly' if it's not important to the meaning of the statement.

## Font Awesome styles
## Variants

### Font Awesome styles
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] 'Font Awesome styles' should use sentence-style capitalization.

</Tab>
</Tabs>
<CodeBlock
links={{"PlantClient": "/learn/docs/writing-content/demo#plantclient", "createPlant": "/learn/docs/writing-content/demo#createplant"}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Quotes] Punctuation should be inside the quotes.

```python
from plantstore import PlantStore, PlantClient
<CodeBlock
links={{"/get\\w+/": "/learn/docs/writing-content/demo#get-methods", "/Plant(Store|Client)/": "/learn/docs/writing-content/demo#type-definitions"}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Quotes] Punctuation should be inside the quotes.

</ParamField>

<ParamField path="sideOffset" type="number" required={false} default={4}>
The distance in pixels between the tooltip and the trigger element.
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.

@github-actions
Copy link
Contributor

- Remove 'properly' adverb from card-groups.mdx
- Change 'Font Awesome styles' to 'Font Awesome icon styles' for sentence case
- Add trailing commas to fix punctuation in code-blocks.mdx
- Change 'in pixels' to '(in pixels)' in tooltips.mdx

Co-Authored-By: Kapil Gowru <[email protected]>
## Font Awesome styles
## Variants

### Font Awesome icon styles
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] 'Font Awesome icon styles' should use sentence-style capitalization.

</Tab>
</Tabs>
<CodeBlock
links={{"PlantClient": "/learn/docs/writing-content/demo#plantclient", "createPlant": "/learn/docs/writing-content/demo#createplant",}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Quotes] Punctuation should be inside the quotes.

</Tab>
</Tabs>
<CodeBlock
links={{"PlantClient": "/learn/docs/writing-content/demo#plantclient", "createPlant": "/learn/docs/writing-content/demo#createplant",}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Quotes] Punctuation should be inside the quotes.

```python
from plantstore import PlantStore, PlantClient
<CodeBlock
links={{"/get\\w+/": "/learn/docs/writing-content/demo#get-methods", "/Plant(Store|Client)/": "/learn/docs/writing-content/demo#type-definitions",}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Quotes] Punctuation should be inside the quotes.

```python
from plantstore import PlantStore, PlantClient
<CodeBlock
links={{"/get\\w+/": "/learn/docs/writing-content/demo#get-methods", "/Plant(Store|Client)/": "/learn/docs/writing-content/demo#type-definitions",}}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Quotes] Punctuation should be inside the quotes.

</ParamField>

<ParamField path="sideOffset" type="number" required={false} default={4}>
The distance (in pixels) between the tooltip and the trigger element.
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.

@github-actions
Copy link
Contributor

The Aside component was not rendering because it used a non-existent endpoint 'POST /plants/{plantId}'. Changed to use 'POST /chat/{domain}' which is a valid endpoint in the API definition and is used successfully in other component pages.

Co-Authored-By: Kapil Gowru <[email protected]>
@github-actions
Copy link
Contributor

- Remove trailing commas in CodeBlock links attributes (code-blocks.mdx)
- Rephrase units description to avoid Vale warning (tooltips.mdx)

Addresses Vale comments on PR #1639

Co-Authored-By: Kapil Gowru <[email protected]>
</ParamField>

<ParamField path="sideOffset" type="number" required={false} default={4}>
The distance between the tooltip and the trigger element, in pixels.
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.

@github-actions
Copy link
Contributor

Changed 'in pixels' to '(px)' to satisfy Microsoft.Units rule which flags 'in <unit>' without a numeral.

Addresses Vale comment on PR #1639

Co-Authored-By: Kapil Gowru <[email protected]>
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

Callouts help highlight important information, warnings, or tips in your documentation. They provide visual emphasis through distinct styling and icons to make key messages stand out to readers.

To display very short pieces of information like status indicators and version numbers, use the [Badges component](/docs/writing-content/components/badges)
To display very short pieces of information like status indicators and version numbers, use the [Badges component](/docs/writing-content/components/badges).
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Adverbs] Remove 'very' if it's not important to the meaning of the statement.


## Properties

### Card Group properties
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] 'Card Group properties' should use sentence-style capitalization.

| MP4 Video | `video/mp4` |
| WebM Video | `video/webm` |
| SVG Image | `image/svg+xml` |
| PNG Image | `image/png` |
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'PNG' has no definition.

---

The `<RunnableEndpoint>` component enables users to make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.
The `<RunnableEndpoint>` component lets users make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Auto] In general, don't hyphenate 'auto-detects'.

API_KEY: (
<p>
Your API key is used to authenticate requests to our API. Keep this secure and never expose it in client-side code.
Your API key is used to authenticate requests to our API. Keep this secure and never expose it in client-side code.
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.We] Try to avoid using first-person plural like 'our'.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

---

The `<RunnableEndpoint>` component enables users to make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.
The Runnable Endpoint component lets users make real HTTP requests to your APIs directly in the API Reference. It auto-detects endpoint definitions from your API specification and provides a request builder with inputs for headers, path parameters, query parameters, and request bodies.
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Auto] In general, don't hyphenate 'auto-detects'.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

The `<Callout>` component highlights important information, warnings, or tips in your documentation. Use callouts to emphasize critical details that readers shouldn't miss, such as breaking changes, prerequisites, or helpful best practices.

To display very short pieces of information like status indicators and version numbers, use the [Badges component](/docs/writing-content/components/badges)
To display very short pieces of information like status indicators and version numbers, use [badges](/docs/writing-content/components/badges).
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Adverbs] Remove 'very' if it's not important to the meaning of the statement.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

```
````

## Code blocks with Tabs
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] 'Code blocks with Tabs' should use sentence-style capitalization.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

"""Check if a number is prime."""
if num <= 1:
return False
for i in range(2, num):
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.FirstPerson] Use first person (such as ' i') sparingly.

</Tabs>
<div className="highlight-frame">
```txt title="With wordWrap" wordWrap
A very very very long line of text that may cause the code block to overflow and scroll as a result.
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Adverbs] Remove 'very' if it's not important to the meaning of the statement.

</Tabs>
<div className="highlight-frame">
```txt title="With wordWrap" wordWrap
A very very very long line of text that may cause the code block to overflow and scroll as a result.
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Adverbs] Remove 'very' if it's not important to the meaning of the statement.

</Tabs>
<div className="highlight-frame">
```txt title="With wordWrap" wordWrap
A very very very long line of text that may cause the code block to overflow and scroll as a result.
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[FernStyles.Adverbs] Remove 'very' if it's not important to the meaning of the statement.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

@devalog devalog merged commit 799a9b5 into main Nov 3, 2025
2 checks passed
@devalog devalog deleted the devin/1761852453-update-component-docs-format branch November 3, 2025 20:39
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.

2 participants