Skip to content

Implement GlyphMarginWidgets - #184375

Merged
Joyce Er (joyceerhl) merged 8 commits into
mainfrom
dev/joyceerhl/youngest-crayfish
Jun 16, 2023
Merged

Joyce Er (joyceerhl) merged 8 commits into
mainfrom
dev/joyceerhl/youngest-crayfish

Conversation

@joyceerhl

@joyceerhl Joyce Er (joyceerhl) commented Jun 6, 2023 •

Copy link
Copy Markdown
Contributor

Fixes #114776
Fixes #183400
Part of #179725

Test adoption for the arrow revert widget (not checked in with this PR):

glyph-widgets.mp4

@joyceerhl Joyce Er (joyceerhl) self-assigned this Jun 6, 2023
@joyceerhl
Joyce Er (joyceerhl) marked this pull request as ready for review June 6, 2023 23:51
@vscodenpa VS Code Bot (vscodenpa) added this to the June 2023 milestone Jun 6, 2023

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good and in the right direction! I pushed a change to do the lane count computation only once per frame. I also left a couple of comments, plus there are a couple of problems that I've spotted for which I didn't add comments, as I didn't digg deeper to see what are the root causes:

  • enable "typescript.referencesCodeLens.enabled": true
  • observe how the breakpoints margins are rendered one line above than before
  • observe also that sometimes the breakpoints cannot be removed:
Kapture.2023-06-13.at.15.04.55.mp4

Comment thread src/vs/editor/browser/editorBrowser.ts Resolved
@joyceerhl

Copy link
Copy Markdown
Contributor Author

Looked into the off-by-one issue some, it looks like whitespace added by codelenses, as well as the peek view widgets, are not included in the calculation for getVerticalOffsetForLineNumber even when accounting for viewzones:

renderedWidget.domNode.setTop(ctx.getVerticalOffsetForLineNumber(renderedWidget.lineNumber, true));

I probably need a different way to calculate the top offset for each decoration, will do some digging

@joyceerhl

Copy link
Copy Markdown
Contributor Author

Fixed!

glyph-widgets-fix.mp4

@joyceerhl
Joyce Er (joyceerhl) enabled auto-merge (squash) June 15, 2023 22:42
@joyceerhl
Joyce Er (joyceerhl) merged commit 26a530f into main Jun 16, 2023
@joyceerhl
Joyce Er (joyceerhl) deleted the dev/joyceerhl/youngest-crayfish branch June 16, 2023 13:18

@zvailanu98 Zoe vailanu (zvailanu98) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coin)

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reverting a change in diff view, inserts a debug breakpoint Introduce GlyphWidgets and tackle overlapping decorations in gutter

5 participants