Skip to content

Commit baa998f

Browse files
garoevansepriestley
authored andcommitted
Disable full screen mode for inline comments
Summary: Full screen is a little foobar so disabling it for inline comments Fixes T5272 Test Plan: View inline comment after change, make sure full screen option has gone. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5272 Differential Revision: https://secure.phabricator.com/D9579
1 parent 5aae1ee commit baa998f

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

src/infrastructure/diff/PhabricatorInlineCommentController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ private function renderTextArea($text) {
243243
->setUser($this->getRequest()->getUser())
244244
->setSigil('differential-inline-comment-edit-textarea')
245245
->setName('text')
246-
->setValue($text);
246+
->setValue($text)
247+
->setDisableFullScreen(true);
247248
}
248249

249250
}

src/view/form/control/PhabricatorRemarkupControl.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl {
44
private $disableMacro = false;
55

6+
private $disableFullScreen = false;
7+
68
public function setDisableMacros($disable) {
79
$this->disableMacro = $disable;
810
return $this;
911
}
1012

13+
public function setDisableFullScreen($disable) {
14+
$this->disableFullScreen = $disable;
15+
return $this;
16+
}
17+
1118
protected function renderInput() {
1219
$id = $this->getID();
1320
if (!$id) {
@@ -90,15 +97,17 @@ protected function renderInput() {
9097
'href' => PhabricatorEnv::getDoclink('Remarkup Reference'),
9198
);
9299

93-
$actions[] = array(
94-
'spacer' => true,
95-
'align' => 'right',
96-
);
100+
if (!$this->disableFullScreen) {
101+
$actions[] = array(
102+
'spacer' => true,
103+
'align' => 'right',
104+
);
97105

98-
$actions['fa-arrows-alt'] = array(
99-
'tip' => pht('Fullscreen Mode'),
100-
'align' => 'right',
101-
);
106+
$actions['fa-arrows-alt'] = array(
107+
'tip' => pht('Fullscreen Mode'),
108+
'align' => 'right',
109+
);
110+
}
102111

103112
$buttons = array();
104113
foreach ($actions as $action => $spec) {

0 commit comments

Comments
 (0)