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
codemirror blob view: Add support for reference panel (and fix some things) #40131
Merged
Conversation
This file contains 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
…hings) This commit adds support for using the blob view in the reference panel. Besides handling the reference panel specific props (`disableStatusBar`, `disableDecorations`), I also had to make some changes to make selecting lines and scrolling them into view work properly. The biggest change is which selection information is sent to the extension host. Instead of sending the editor's cursor position, I'm now sending the selected lines, which is what the old blob view does. This also fixes the issue with showing line decorations for selected lines (instead of just line where the current cursor is). Having a real cursor is still enabled because we need that for search (Meta+f) to work.
fkling
added
team/code-navigation
codemirror
PRs and issues related to migrating to CodeMirror
labels
Aug 9, 2022
21 tasks
umpox
reviewed
Aug 9, 2022
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.
@umpox Thanks for catching that, I didn't test that :-/ |
I disabled hovercards for the reference panel. |
umpox
approved these changes
Aug 9, 2022
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.
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
This commit adds support for using the blob view in the reference
panel. Besides handling the reference panel specific props
(
disableStatusBar
,disableDecorations
), I also had to make somechanges to make selecting lines and scrolling them into view work
properly.
The biggest change is which selection information is sent to the
extension host. Instead of sending the editor's cursor position, I'm now
sending the selected lines, which is what the old blob view does. This
also fixes the issue with showing line decorations for selected
lines (instead of just line where the current cursor is).
Having a real cursor is still enabled because we need that for search
(Meta+f) to work.
Demo: (the first part shows how line decorations are updated as the user selects additional lines)
sg-cm-blob-rp.mp4
Test plan
App preview:
Check out the client app preview documentation to learn more.