Skip to content

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

Merged
alexr00 merged 3 commits intomicrosoft:mainfrom
gjsjohnmurray:fix-173690
Feb 16, 2023
Merged

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

Conversation

@gjsjohnmurray
Copy link
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
Contributor Author

/assign @alexr00

@alexr00 alexr00 added this to the February 2023 milestone Feb 14, 2023
@gjsjohnmurray
Copy link
Contributor Author

@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

Copy link
Member

@alexr00 alexr00 left a comment

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 alexr00 enabled auto-merge (squash) February 16, 2023 06:44
@alexr00 alexr00 merged commit fb25658 into microsoft:main Feb 16, 2023
@gjsjohnmurray gjsjohnmurray deleted the fix-173690 branch February 16, 2023 08:51
@alexr00
Copy link
Member

alexr00 commented Feb 16, 2023

@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
Contributor Author

@alexr00 brilliant! Thanks very much.

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
Contributor Author

@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
Member

alexr00 commented Feb 17, 2023

@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