Skip to content

Point comment zone widget 'beak' arrow at single-line range (#173690) - #174291

Merged
Alex Ross (alexr00) merged 3 commits into
microsoft:mainfrom
gjsjohnmurray:fix-173690
Feb 16, 2023
Merged

Point comment zone widget 'beak' arrow at single-line range (#173690)#174291
Alex Ross (alexr00) merged 3 commits into
microsoft:mainfrom
gjsjohnmurray:fix-173690

Conversation

@gjsjohnmurray

Copy link
Copy Markdown
Contributor

This PR fixes #173690.

When a comment thread references a range not spanning multiple lines, position the 'beak' arrow to point at midpoint of the range (rounding rightward).

@gjsjohnmurray

Copy link
Copy Markdown
Contributor Author

/assign Alex Ross (@alexr00)

@alexr00 Alex Ross (alexr00) added this to the February 2023 milestone Feb 14, 2023
@gjsjohnmurray

Copy link
Copy Markdown
Contributor Author

Alex Ross (@alexr00) I know you are busy on a quickdiff PR at the moment, but I'd be grateful if you could review this one and ideally approve & merge it in time for tomorrow's Insiders. Tomorrow I'll be demoing an extension of mine called gj :: codeSpex on a public webinar, and it'd be extra-cool for the beaks to point correctly.

Out of the box that extension adds comments to editors that are using languages handled by the InterSystems Language Server, but you can make it light up in ones where languageId is typescript if you add these lines to your settings.json

	"codeSpex.languages": {
		"typescript":{
			"tokens": {
				"class": {
					"enabled": true
				},
				"constructor": {
					"enabled": true
				},
				"function": {
					"enabled": true
				},
				"method": {
					"enabled": true
				}
			}
		},
	},

Example from the Treeview Sample code:

image

@alexr00 Alex Ross (alexr00) 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.

Looks good! I just have one question.

@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) February 16, 2023 06:44
@alexr00
Alex Ross (alexr00) merged commit fb25658 into microsoft:main Feb 16, 2023
@alexr00

Copy link
Copy Markdown
Member

John Murray (@gjsjohnmurray) this didn't make it into the latest released insiders, but here's an insiders build that has it in case that's helpful for you: https://az764295.vo.msecnd.net/insider/fb256581df0c63f5b9274fb99cf59bb496523f05/VSCode-win32-x64-1.76.0-insider.zip

@gjsjohnmurray

Copy link
Copy Markdown
Contributor Author

Alex Ross (@alexr00) brilliant! Thanks very much.

Cristopher Claeys (c-claeys) pushed a commit to c-claeys/vscode that referenced this pull request Feb 16, 2023
…t#173690) (microsoft#174291)

* Point comment zone widget 'beak' arrow at single-line range (microsoft#173690)

* Remove unused variable
@gjsjohnmurray

Copy link
Copy Markdown
Contributor Author

Alex Ross (@alexr00) thanks again for that link yesterday. There doesn't seem to have been an Insiders published today yet. Do you know if there's a problem?

@alexr00

Copy link
Copy Markdown
Member

John Murray (@gjsjohnmurray) We've been plagued with build issues outside of our control and haven't been able to get a build yet :(

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 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.

'Beak' on CommentThreadZoneWidget is always placed at start of line

3 participants