[diffs/edit] No more required props (except useTokenTransform#979
Draft
amadeus wants to merge 3 commits into
Draft
[diffs/edit] No more required props (except useTokenTransform#979amadeus wants to merge 3 commits into
useTokenTransform#979amadeus wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
bcdb64d to
b4a0f84
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.