Skip to content

docs: add Prompt component page and changelog entry#4863

Open
kgowru wants to merge 4 commits intomainfrom
devin/1774493154-prompt-component-docs
Open

docs: add Prompt component page and changelog entry#4863
kgowru wants to merge 4 commits intomainfrom
devin/1774493154-prompt-component-docs

Conversation

@kgowru
Copy link
Copy Markdown
Contributor

@kgowru kgowru commented Apr 9, 2026

Summary

Adds documentation for the new <Prompt> MDX component (implemented in fern-platform #9605):

  • New page at component-library/default-components/prompt.mdx — usage, variants (copy-only, single open-in, multiple open-in dropdown), "How it works" section on markdown preservation, and properties reference
  • Navigation entry in docs.yml between "Parameter field" and "Runnable endpoint"
  • Changelog entry for 2026-03-26

Updates since last revision

  • Docs page fully updated to match the redesigned Prompt component from fern-platform #9605:
    • Replaced description/icon/iconType props with the new title prop
    • Documented the new layout: title top-left, action buttons top-right (split button + dropdown), prompt preview bar with > chevron and copy button
    • Updated all examples and the Properties section to reflect the new API (title, actions, children)
  • Added a "How it works" section explaining markdown preservation (powered by remarkPromptRawContent remark plugin)
  • All examples now use markdown-rich prompt content (bold, links) to demonstrate the preservation feature

Review & Testing Checklist for Human

  • Changelog uses old props: The changelog entry (2026-03-26.mdx) still references description, icon, and iconType props which were removed in the component redesign. This needs to be updated to use title instead, and the example should match the new component API — otherwise the live example will break once the fern-platform PR ships
  • Merge ordering: The fern-platform PR (#9605) must ship before (or alongside) this PR, otherwise the <Prompt> examples won't render
  • Preview the page in a deploy preview to check layout — especially the "How it works" section, code block examples, <ParamField> rendering, and <Markdown src="/snippets/agent-directive.mdx"/> inclusion
  • Verify example links resolve: Examples reference pages like https://buildwithfern.com/learn/docs/getting-started/quickstart and https://buildwithfern.com/learn/sdks/generators/typescript/quickstart — confirm these URLs are valid
  • Verify the changelog link /learn/docs/writing-content/components/prompt resolves to the correct page once both PRs are merged

Suggested test plan: After merging fern-platform #9605, deploy a preview of this PR and navigate to the Prompt component page. Verify all example code blocks render the component correctly with the new layout (title, prompt preview bar, action buttons). Check that the changelog example also renders correctly.

Notes

  • The component page follows the same structure as existing component pages (Copy, Callout, Icon): frontmatter → agent directive snippet → intro → Usage → Variants → Properties
  • The Prompt entry in docs.yml does not set an explicit slug (unlike parameter-fields), so the auto-generated slug from the filename is used
  • ⚠️ The changelog file at fern/products/docs/pages/changelog/2026-03-26.mdx was not updated during the visual redesign pass — it still uses the old description/icon/iconType props rather than the new title prop

Link to Devin session: https://app.devin.ai/sessions/20a3aeeb0d50425f8e592b8912861201
Requested by: @kgowru


Open in Devin Review

Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

devalog and others added 2 commits April 10, 2026 13:46
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines +3 to +4
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 New changelog page missing required agent directive snippet

The new fern/products/docs/pages/changelog/2026-03-26.mdx file is missing the mandatory <Markdown src="/snippets/agent-directive.mdx"/> line. Per AGENTS.md, every new .mdx page created under fern/products/ must include this directive after the closing --- of the front matter.

Suggested change
---
---
<Markdown src="/snippets/agent-directive.mdx"/>
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


<Markdown src="/snippets/agent-directive.mdx"/>

The `<Prompt>` component displays an AI prompt card with a title, a single-line prompt preview, a copy button, and optional "Open in" action buttons for AI tools. Add it to any page so readers can quickly copy the instructions or open them directly in Cursor, Claude, or ChatGPT.
Copy link
Copy Markdown
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 'quickly' if it's not important to the meaning of the statement.

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