Skip to content

Conversation

@remorses
Copy link
Contributor

Summary

  • Add <diff> as a built-in React component by registering DiffRenderable in the component catalogue
  • Add React example demonstrating diff viewer with theme cycling, view modes (unified/split), and keybindings
  • Add diff-demo to core examples index

Copilot AI review requested due to automatic review settings November 29, 2025 11:51
Copilot finished reviewing on behalf of remorses November 29, 2025 11:52
Copy link

Copilot AI left a comment

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 adds support for the <diff> component in React by registering DiffRenderable from the core library as a built-in React component. The changes enable React developers to render diff viewers with features like unified/split views, syntax highlighting, and multiple theme support.

  • Register DiffRenderable in the React component catalogue
  • Add TypeScript type definitions for DiffProps
  • Create a React example demonstrating the diff component with theme cycling, view modes, and keyboard controls
  • Register the diff demo in the core examples index

Reviewed changes

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

Show a summary per file
File Description
packages/react/src/types/components.ts Import DiffRenderable and DiffRenderableOptions types; define DiffProps type
packages/react/src/components/index.ts Register DiffRenderable as the diff component in the base component catalogue
packages/react/jsx-namespace.d.ts Add diff to JSX intrinsic elements with DiffProps type
packages/react/examples/diff.tsx New example showcasing diff viewer with themes, view modes, and keyboard shortcuts
packages/core/src/examples/index.ts Register diff-demo in the core examples list

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

…scriptions

- added a table of contents for easier navigation.
- expanded sections for layout & display, input, and code & diff components with examples.
Copy link
Collaborator

@msmps msmps left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding this 🫡 I've updated the readme etc...

This is unrelated but flagged with @kommander
image

@msmps msmps merged commit e931bed into sst:main Nov 29, 2025
4 checks passed
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