feat(editor): Add rounded selection#757
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 292fc8c32b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds configurable rounded selection rendering to the diffs editor, updating selection range rendering and CSS while also reorganizing nearby editor-related types.
Changes:
- Adds
roundedSelectiontoEditorOptions. - Reworks selection range rendering to support rounded-corner overlays.
- Adds CSS selectors for rounded selection corners and renames component option types.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
packages/diffs/src/types.ts |
Renames/reorders editor and component-related exported interfaces. |
packages/diffs/src/editor/editor.ts |
Adds rounded-selection option and rewrites selection rendering/caching logic. |
packages/diffs/src/editor/css.ts |
Adds CSS rules for rounded selection corner rendering. |
Comments suppressed due to low confidence (1)
packages/diffs/src/types.ts:896
- Renaming the exported
DiffsEditorOptionstype without leaving an alias is a public API break:types.tsis re-exported fromsrc/index.ts, and there are no remainingDiffsEditorOptionsexports. Existing consumers importing this type will fail to compile even though this PR is about selection rendering.
export interface DiffsComponentOptions extends BaseCodeOptions {
enableGutterUtility?: boolean;
enableLineSelection?: boolean;
expandUnchanged?: boolean;
lineHoverHighlight?: 'disabled' | 'both' | 'number' | 'line';
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return; | ||
| } | ||
| const lineIndex = Number(lineNumber) - 1; | ||
| const line = Number(lineNumber) - 1; |
There was a problem hiding this comment.
Would it be worth doing parseInt(lineNumber, 10) on this and error/silently fail if isNaN(line)?
↓
Can be disabled by adding: