[diffs/edit] No more required props (except useTokenTransform - #979
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bcdb64d to
b4a0f84
Compare
b4a0f84 to
8761b99
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Moving the caret in edit mode reused the selected-lines state, which could replace an existing line selection and disturb its callbacks or gutter utility. Track the editor active line independently and derive one visual highlight where selected lines take precedence. Preserve both states across diff row refreshes so each retains its latest value.
Entering Edit mode with line selection, gutter utilities, or hover highlighting enabled currently turns those interactions off and clears selected lines. Preserve the configured interaction options while enabling only the token transformer required by the editor. Keep editor active-line styling separate from selected-line styling, protect gutter utility gestures from editor selection handlers, and exercise the behavior across playground views.
Update editor documentation and live examples to stop disabling gutter utilities, line selection, and hover highlighting in edit mode. Keep useTokenTransformer enabled in prerendered examples because the editor still requires it, and refresh the generated homepage fixture.
Dragging a gutter utility now updates the line range and selection lifecycle even when ordinary line selection is disabled. Ordinary gutter drags remain disabled, and callbacks retain the completed gesture range when utility code changes the current selection. Preserve editor text selections during gutter-owned gestures and render the cursor line independently from selected diff lines. Retry incomplete renders, avoid rewriting unchanged ranges, and keep both states visible across supported themes.
Clarify that gutter utility gestures emit selection lifecycle callbacks even when ordinary line selection is disabled.
Added and deleted gutter numbers kept their base colors on the editor cursor line because the Agent UI override excluded the obsolete `data-active` attribute. Exclude `data-editor-active-line` instead and update the generated demo snapshot so the editor active-line styling can apply.
Select a line in edit mode and move the cursor onto it: the theme current-line background can obscure the selection and addition or deletion color. Resolve decoration, diff, selection, editor active, and hover colors as ordered layers. Derive active emphasis from the resolved semantic color, retain theme borders as a fallback cue, and prevent gutter numbers from receiving the selection mix twice.
20a1e2a to
21b162f
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21b162f215
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Edit inside a collapsed diff region, then move the caret or update the line selection: virtualized views can keep showing the previous line state after rebuilding their rows. Flush deferred selected and active-line writes after virtualized managers bind to the rebuilt DOM, and cover the region-changing render path.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
* fix(diffs): Keep editor active line separate from selected lines Moving the caret in edit mode reused the selected-lines state, which could replace an existing line selection and disturb its callbacks or gutter utility. Track the editor active line independently and derive one visual highlight where selected lines take precedence. Preserve both states across diff row refreshes so each retains its latest value. * fix(diffs): Preserve interactions in edit mode Entering Edit mode with line selection, gutter utilities, or hover highlighting enabled currently turns those interactions off and clears selected lines. Preserve the configured interaction options while enabling only the token transformer required by the editor. Keep editor active-line styling separate from selected-line styling, protect gutter utility gestures from editor selection handlers, and exercise the behavior across playground views. * docs(diffs): Remove obsolete editor option overrides Update editor documentation and live examples to stop disabling gutter utilities, line selection, and hover highlighting in edit mode. Keep useTokenTransformer enabled in prerendered examples because the editor still requires it, and refresh the generated homepage fixture. * fix(diffs): Keep text and line selections independent Dragging a gutter utility now updates the line range and selection lifecycle even when ordinary line selection is disabled. Ordinary gutter drags remain disabled, and callbacks retain the completed gesture range when utility code changes the current selection. Preserve editor text selections during gutter-owned gestures and render the cursor line independently from selected diff lines. Retry incomplete renders, avoid rewriting unchanged ranges, and keep both states visible across supported themes. * docs(diffs): Document gutter utility selection callbacks Clarify that gutter utility gestures emit selection lifecycle callbacks even when ordinary line selection is disabled. * fix(docs): Respect editor active lines in Agent UI Added and deleted gutter numbers kept their base colors on the editor cursor line because the Agent UI override excluded the obsolete `data-active` attribute. Exclude `data-editor-active-line` instead and update the generated demo snapshot so the editor active-line styling can apply. * Fix playground with new selection states * fix(diffs): Compose editor active lines with diff states Select a line in edit mode and move the cursor onto it: the theme current-line background can obscure the selection and addition or deletion color. Resolve decoration, diff, selection, editor active, and hover colors as ordered layers. Derive active emphasis from the resolved semantic color, retain theme borders as a fallback cue, and prevent gutter numbers from receiving the selection mix twice. * fix(diffs): Flush line state after virtualized rerenders Edit inside a collapsed diff region, then move the caret or update the line selection: virtualized views can keep showing the previous line state after rebuilding their rows. Flush deferred selected and active-line writes after virtualized managers bind to the rebuilt DOM, and cover the region-changing render path.
Made it so we can preserve all line selection, annotation and line highlights while in edit mode.
Of course a dev could still choose to change specific props on a per file basis if necessary.