Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8730f968
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8730f968
编写于
4月 19, 2018
作者:
P
Peng Lyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
explicit reply comment thread command
上级
4ef75189
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
26 deletion
+26
-26
extensions/git-extended/src/prView/prProvider.ts
extensions/git-extended/src/prView/prProvider.ts
+6
-8
extensions/git-extended/src/review/reviewMode.ts
extensions/git-extended/src/review/reviewMode.ts
+8
-7
src/vs/editor/common/modes.ts
src/vs/editor/common/modes.ts
+1
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+1
-1
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+1
-1
src/vs/workbench/api/node/extHostComments.ts
src/vs/workbench/api/node/extHostComments.ts
+1
-1
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
...s/comments/electron-browser/commentsEditorContribution.ts
+8
-7
未找到文件。
extensions/git-extended/src/prView/prProvider.ts
浏览文件 @
8730f968
...
...
@@ -150,14 +150,12 @@ export class PRProvider implements vscode.TreeDataProvider<PRGroupTreeItem | Pul
};
}
});
let
reply
=
{
command
:
'
diff-
'
+
element
.
prItem
.
number
+
'
-post
'
,
title
:
'
Add single comment
'
};
let
actions
=
[
{
command
:
'
diff-
'
+
element
.
prItem
.
number
+
'
-post
'
,
title
:
'
Add single comment
'
}
];
let
actions
=
[
reply
];
const
_onDidChangeCommentThreads
=
new
vscode
.
EventEmitter
<
vscode
.
CommentThreadChangedEvent
>
();
setTimeout
(()
=>
_onDidChangeCommentThreads
.
fire
({
changed
:
[],
added
:
[],
removed
:
[]
}),
5000
);
...
...
@@ -226,7 +224,7 @@ export class PRProvider implements vscode.TreeDataProvider<PRGroupTreeItem | Pul
gravatar
:
comment
.
user
.
avatar_url
};
}),
actions
:
actions
reply
:
reply
});
}
...
...
extensions/git-extended/src/review/reviewMode.ts
浏览文件 @
8730f968
...
...
@@ -38,6 +38,7 @@ export class ReviewMode {
private
_commentsCache
:
Map
<
String
,
Comment
[]
>
;
private
_localFileChanges
:
FileChangeTreeItem
[]
=
[];
private
_actions
:
vscode
.
Command
[]
=
[];
private
_reply
:
vscode
.
Command
=
null
;
private
_lastCommitSha
:
string
;
private
_onDidChangeCommentThreads
=
new
vscode
.
EventEmitter
<
vscode
.
CommentThreadChangedEvent
>
();
...
...
@@ -132,12 +133,12 @@ export class ReviewMode {
}
});
this
.
_
actions
=
[
{
command
:
this
.
_prNumber
+
'
-post
'
,
title
:
'
Add single comment
'
}
];
this
.
_
reply
=
{
command
:
this
.
_prNumber
+
'
-post
'
,
title
:
'
Add single comment
'
};
this
.
_actions
=
[
this
.
_reply
];
this
.
registerCommentProvider
();
...
...
@@ -282,7 +283,7 @@ export class ReviewMode {
gravatar
:
comment
.
user
.
avatar_url
};
}),
actions
:
this
.
_actions
reply
:
this
.
_reply
});
}
...
...
src/vs/editor/common/modes.ts
浏览文件 @
8730f968
...
...
@@ -943,7 +943,7 @@ export interface CommentThread {
readonly
resource
:
string
;
readonly
range
:
IRange
;
readonly
comments
:
Comment
[];
readonly
actions
:
Command
[]
;
readonly
reply
:
Command
;
}
export
interface
NewCommentAction
{
...
...
src/vs/monaco.d.ts
浏览文件 @
8730f968
...
...
@@ -5033,7 +5033,7 @@ declare namespace monaco.languages {
readonly
resource
:
string
;
readonly
range
:
IRange
;
readonly
comments
:
Comment
[];
readonly
actions
:
Command
[]
;
readonly
reply
:
Command
;
}
export
interface
NewCommentAction
{
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
8730f968
...
...
@@ -775,7 +775,7 @@ declare module 'vscode' {
resource
:
Uri
;
range
:
Range
;
comments
:
Comment
[];
actions
?:
Command
[]
;
reply
?:
Command
;
}
interface
NewCommentAction
{
...
...
src/vs/workbench/api/node/extHostComments.ts
浏览文件 @
8730f968
...
...
@@ -118,7 +118,7 @@ function convertCommentThread(vscodeCommentThread: vscode.CommentThread, command
resource
:
vscodeCommentThread
.
resource
.
toString
(),
range
:
extHostTypeConverter
.
fromRange
(
vscodeCommentThread
.
range
),
comments
:
vscodeCommentThread
.
comments
.
map
(
convertComment
),
actions
:
vscodeCommentThread
.
actions
.
map
(
commandsConverter
.
toInternal
)
reply
:
vscodeCommentThread
.
reply
?
commandsConverter
.
toInternal
(
vscodeCommentThread
.
reply
)
:
null
};
}
...
...
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
浏览文件 @
8730f968
...
...
@@ -268,14 +268,14 @@ export class ReviewZoneWidget extends ZoneWidget {
this
.
_commentsElement
.
appendChild
(
newCommentNode
.
domNode
);
}
const
commentForm
=
$
(
'
.comment-form
'
).
appendTo
(
this
.
_bodyElement
).
getHTMLElement
();
const
textArea
=
<
HTMLTextAreaElement
>
$
(
'
textarea
'
).
appendTo
(
commentForm
).
getHTMLElement
();
const
formActions
=
$
(
'
.form-actions
'
).
appendTo
(
commentForm
).
getHTMLElement
();
if
(
this
.
_commentThread
.
reply
)
{
const
commentForm
=
$
(
'
.comment-form
'
).
appendTo
(
this
.
_bodyElement
).
getHTMLElement
();
const
textArea
=
<
HTMLTextAreaElement
>
$
(
'
textarea
'
).
appendTo
(
commentForm
).
getHTMLElement
();
const
formActions
=
$
(
'
.form-actions
'
).
appendTo
(
commentForm
).
getHTMLElement
();
for
(
const
action
of
this
.
_commentThread
.
actions
)
{
const
button
=
$
(
'
button
'
).
appendTo
(
formActions
).
getHTMLElement
();
button
.
onclick
=
async
()
=>
{
let
newComment
=
await
this
.
commandService
.
executeCommand
(
action
.
id
,
this
.
_commentThread
.
threadId
,
this
.
editor
.
getModel
().
uri
,
lineNumber
,
textArea
.
value
);
let
newComment
=
await
this
.
commandService
.
executeCommand
(
this
.
_commentThread
.
reply
.
id
,
this
.
_commentThread
.
threadId
,
this
.
editor
.
getModel
().
uri
,
lineNumber
,
textArea
.
value
);
if
(
newComment
)
{
textArea
.
value
=
''
;
this
.
_commentThread
.
comments
.
push
(
newComment
);
...
...
@@ -286,7 +286,7 @@ export class ReviewZoneWidget extends ZoneWidget {
$
(
this
.
_secondaryHeading
).
safeInnerHtml
(
secondaryHeading
);
}
};
button
.
textContent
=
action
.
title
;
button
.
textContent
=
this
.
_commentThread
.
reply
.
title
;
}
this
.
_resizeObserver
=
new
ResizeObserver
(
entries
=>
{
...
...
@@ -538,7 +538,8 @@ export class ReviewController implements IEditorContribution {
endLineNumber
:
lineNumber
,
endColumn
:
0
},
actions
:
newCommentAction
.
actions
reply
:
null
// actions: newCommentAction.actions
},
{},
this
.
themeService
,
this
.
commandService
);
this
.
_zoneWidget
.
onDidClose
(
e
=>
{
this
.
_zoneWidget
=
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录