Skip to content

[diffs/edit] No more required props (except useTokenTransform#979

Draft
amadeus wants to merge 3 commits into
beta-1.3from
amadeus/edit-fix-forced-options
Draft

[diffs/edit] No more required props (except useTokenTransform#979
amadeus wants to merge 3 commits into
beta-1.3from
amadeus/edit-fix-forced-options

Conversation

@amadeus

@amadeus amadeus commented Jul 14, 2026

Copy link
Copy Markdown
Member

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.

  • - Test
  • - Update docs to reflect new world

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Jul 14, 2026 8:53pm
pierre-docs-diffshub Ready Ready Preview Jul 14, 2026 8:53pm
pierre-docs-trees Ready Ready Preview Jul 14, 2026 8:53pm
pierrejs-diff-demo Ready Ready Preview Jul 14, 2026 8:53pm

Request Review

amadeus added 3 commits July 14, 2026 13:18
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.
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.

1 participant