Add a Delete link to Differential inline comment previews
Summary: This lets you delete inlines from the preview at the bottom of the page, instead of hunting for them through the diffs. There is not yet a keyboard shortcut. The mechanism for updating the inlines in the diffs is kind of a hack and I'm sure I'm special-casing way too much, but at least it works. Test Plan: Load revision with many diffs. Create inlines all over the place. Delete them all. Mwahaha. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1433, T1431 Differential Revision: https://secure.phabricator.com/D3131
This commit is contained in:
@@ -90,6 +90,9 @@ final class DifferentialInlineCommentView extends AphrontView {
|
||||
);
|
||||
|
||||
$sigil = 'differential-inline-comment';
|
||||
if ($this->preview) {
|
||||
$sigil = $sigil . ' differential-inline-comment-preview';
|
||||
}
|
||||
|
||||
$content = $inline->getContent();
|
||||
$handles = $this->handles;
|
||||
@@ -177,6 +180,14 @@ final class DifferentialInlineCommentView extends AphrontView {
|
||||
'sigil' => 'differential-inline-preview-jump',
|
||||
),
|
||||
'Not Visible');
|
||||
$links[] = javelin_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '#',
|
||||
'mustcapture' => true,
|
||||
'sigil' => 'differential-inline-delete',
|
||||
),
|
||||
'Delete');
|
||||
}
|
||||
|
||||
if ($links) {
|
||||
|
||||
Reference in New Issue
Block a user