-
Notifications
You must be signed in to change notification settings - Fork 37k
Inline edit - implement side by side rendering of suggestions #219444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
hediet
reviewed
Jul 5, 2024
Comment on lines
+61
to
+66
| const instance = this.instantiationService.createInstance(GhostTextWidget, this.editor, { | ||
| ghostText: constObservable(ghostText), | ||
| minReservedLineCount: constObservable(0), | ||
| targetTextModel: constObservable(this.editor.getModel() ?? undefined), | ||
| range: constObservable(edit.range) | ||
| }); |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This potentially causes performance issues, as you re-create the widget on every edit change.
Better only create the widget once and pass in the data as observable!
hediet
approved these changes
Jul 5, 2024
bpasero
approved these changes
Jul 5, 2024
bcf3c36 to
e4070ae
Compare
…and remove strike-through
e4070ae to
2cce8a0
Compare
aaronchucarroll
pushed a commit
to aaronchucarroll/vscode
that referenced
this pull request
Jul 10, 2024
…oft#219444) * Make widget derived out of edit value * initial side-by-side rendering of suggestions * Keep old UI in some scenarios * Handle scrolling * Use embedded text editor to display suggestions * Add diff decorations * Apply decorations on the original code in side-by-side rendering * try to solve flickering... and fail at it * Make background colouring always enabled for inner-line suggestions, and remove strike-through
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
CC: @hediet