Skip to content
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

Test CommentThreadState API #172027

Closed
2 tasks done
alexr00 opened this issue Jan 23, 2023 · 4 comments
Closed
2 tasks done

Test CommentThreadState API #172027

alexr00 opened this issue Jan 23, 2023 · 4 comments

Comments

@alexr00
Copy link
Member

alexr00 commented Jan 23, 2023

Refs: #127473

Complexity: 5

Create Issue


The CommentThreadState API has been finalized:

vscode/src/vscode-dts/vscode.d.ts

Lines 15225 to 15231 in fcb503b

/**
* The state of a comment thread.
*/
export enum CommentThreadState {
Unresolved = 0,
Resolved = 1
}

vscode/src/vscode-dts/vscode.d.ts

Lines 15290 to 15293 in fcb503b

/**
* The optional state of a comment thread, which may affect how the comment is displayed.
*/
state?: CommentThreadState;

Take a look at the API and verify that the inline documentation makes sense. Then, try out the API. One easy way to try the API is to use the comments extension sample and instead of adding a "pending" label to the comment you could set the comment thread state to Unresolved:

https://github.com/microsoft/vscode-extension-samples/blob/8431b4978c73721adb1edb3571063bfada509e7a/comment-sample/src/extension.ts#L46-L48

Verify

  • that you can see a difference in the UI treatment of resolved/unresolved comments in the Comments view.
  • that when you update the comment thread state it is reflected in the Comments view.
@alexr00 alexr00 added this to the January 2023 milestone Jan 23, 2023
@ghost ghost assigned DonJayamanne and hediet Jan 24, 2023
@hediet hediet removed their assignment Jan 24, 2023
@DonJayamanne
Copy link
Contributor

@alexr00 not sure how I'm supposed to get the latest vscode.d.ts files,
wont i need to get the proposed API enabled to test this, which means I'm really testing the proposed API at this stage?
I.e. i cannot really verify whether its stable or not until the npm package has been published (@types/vscode) with the latest bits.

Please could you provide instructions on how I could get the vscode.d.ts files to test this, also, should I be enabling proposed-api in the launch.json?

@rzhao271 rzhao271 assigned rzhao271 and unassigned DonJayamanne Jan 25, 2023
@rzhao271
Copy link
Contributor

rzhao271 commented Jan 25, 2023

It seems to me that the default state of the thread is Unresolved, but could that be clarified in the API docs?

Other than that, LGTM

@rzhao271 rzhao271 removed their assignment Jan 25, 2023
@alexr00
Copy link
Member Author

alexr00 commented Jan 25, 2023

@DonJayamanne I usually just copy the vscode.d.ts file over for testing finalizations.

@rzhao271 the default state is neither unresolved no resolved so as to preserve the existing behavior for comments.

@hediet
Copy link
Member

hediet commented Jan 25, 2023

npx vscode-dts main downloads the latest vscode.d.ts!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants