Update readme and proposed api

This commit is contained in:
Peng Lyu
2019-03-29 10:55:26 -07:00
parent 1bc238a8b2
commit decdc8df35
2 changed files with 6 additions and 61 deletions

View File

@ -1,3 +1,9 @@
# Commenting API Example
This sample shows
- How to create a comment controller.
- How to support comment thread creation for documents.
- How to update comment actions dynamically.
![demo](./wiki-demo.gif)

View File

@ -123,37 +123,6 @@ declare module 'vscode' {
*/
userIconPath?: Uri;
/**
* @deprecated Use userIconPath instead. The avatar src of the user who created the comment
*/
gravatar?: string;
/**
* Whether the current user has permission to edit the comment.
*
* This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or
* if it is provided by a `DocumentCommentProvider` and no `editComment` method is given.
*
* DEPRECATED, use editCommand
*/
canEdit?: boolean;
/**
* Whether the current user has permission to delete the comment.
*
* This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or
* if it is provided by a `DocumentCommentProvider` and no `deleteComment` method is given.
*
* DEPRECATED, use deleteCommand
*/
canDelete?: boolean;
/**
* @deprecated
* The command to be executed if the comment is selected in the Comments Panel
*/
command?: Command;
/**
* The command to be executed if the comment is selected in the Comments Panel
*/
@ -168,26 +137,6 @@ declare module 'vscode' {
* The command to be executed when users try to delete the comment
*/
deleteCommand?: Command;
/**
* Deprecated
*/
isDraft?: boolean;
/**
* Proposed Comment Reaction
*/
commentReactions?: CommentReaction[];
}
/**
* Comment Reactions
*/
interface CommentReaction {
readonly label?: string;
readonly iconPath?: string | Uri;
count?: number;
readonly hasReacted?: boolean;
}
@ -201,11 +150,6 @@ declare module 'vscode' {
value: string;
}
export interface CommentReactionProvider {
availableReactions: CommentReaction[];
toggleReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise<void>;
}
export interface CommentingRangeProvider {
/**
* Provide a list of ranges which allow new comment threads creation or null for a given document
@ -253,11 +197,6 @@ declare module 'vscode' {
*/
emptyCommentThreadFactory?: EmptyCommentThreadFactory;
/**
* Optional reaction provider
*/
reactionProvider?: CommentReactionProvider;
/**
* Dispose this comment controller.
*/