Repository navigation
feat(design-system): add Markdown component to ui-patterns - #46325
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a Markdown UI pattern: styled renderer primitives, a react-markdown wrapper with remark-gfm and optional lazy code highlighting, MDX documentation with ComponentPreviews, 14 demo examples, and design-system sidebar/registry registrations. ChangesMarkdown UI Pattern
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › cron-jobs.spec.ts › Cron Jobs › High Query Cost Banner › cleanup workflow: delete rows and schedule cleanup job Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ui-patterns/src/Markdown/index.tsx`:
- Around line 59-65: The MarkdownProps typing is unsafe: change the children
prop to accept string (children?: string) so consumers must pass markdown as a
string and stop casting non-string ReactNode to string in the Markdown
component; also relax the components prop to use the upstream react-markdown
Components type directly (components?: Components) instead of the stricter
Components & Record<string, React.ComponentType<any>> so valid consumer
component mappings are allowed; update the Markdown component implementation to
use children (string) directly when rendering and remove any blind (children as
string) casts and unnecessary narrowings.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: a2930b1b-f3c6-456b-b74a-5b637ed02730
📒 Files selected for processing (2)
apps/design-system/content/docs/ui-patterns/markdown.mdxpackages/ui-patterns/src/Markdown/index.tsx
💤 Files with no reviewable changes (1)
- apps/design-system/content/docs/ui-patterns/markdown.mdx
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/design-system/registry/default/example/markdown-customization.tsx`:
- Around line 4-12: The example function MarkdownCustomization mounts the
Markdown component without any markdown input so it renders blank; update
MarkdownCustomization to pass a representative markdown string to the Markdown
component (via children or the content prop depending on the Markdown API) so
the customization UI is visible; locate the Markdown component usage in
MarkdownCustomization and provide a short sample markdown (e.g.,
headings/list/code) as the prop to demonstrate ErrorCodes rendering.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 543ef562-01af-4a5f-8419-76e116e7bbd6
📒 Files selected for processing (3)
apps/design-system/content/docs/ui-patterns/markdown.mdxapps/design-system/registry/default/example/markdown-customization.tsxpackages/ui-patterns/src/Markdown/index.tsx
✅ Files skipped from review due to trivial changes (1)
- apps/design-system/content/docs/ui-patterns/markdown.mdx
Braintrust eval report
|
What kind of change does this PR introduce?
Add
MarkdowncomponentSummary by CodeRabbit