Remove duplicate inline scaffold in 2up renderer
Summary: Ref T2009. Remove the 4 (!!) copies of this code. Test Plan: - Added, edited, and removed inline comments in 2up view. - Stacked a bunch of comments on the same line and saw the JS place them correctly. - Created an image diff and added, edited and removed inlines on it. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T2009 Differential Revision: https://secure.phabricator.com/D12000
This commit is contained in:
@@ -20,4 +20,12 @@ abstract class PHUIDiffInlineCommentRowScaffold extends AphrontView {
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getRowAttributes() {
|
||||
// TODO: This is semantic information used by the JS when placing comments
|
||||
// and using keyboard navigation; we should move it out of class names.
|
||||
return array(
|
||||
'class' => 'inline',
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final class PHUIDiffOneUpInlineCommentRowScaffold
|
||||
phutil_tag('td', $attrs, $inline),
|
||||
);
|
||||
|
||||
return phutil_tag('tr', array(), $cells);
|
||||
return phutil_tag('tr', $this->getRowAttributes(), $cells);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ final class PHUIDiffTwoUpInlineCommentRowScaffold
|
||||
phutil_tag('td', $right_attrs, $right_side),
|
||||
);
|
||||
|
||||
return phutil_tag('tr', array(), $cells);
|
||||
return phutil_tag('tr', $this->getRowAttributes(), $cells);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user