mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Add some more UI reminder text about draft revisions
Summary: See PHI433. This beefs up reminder texts for drafts a little bit since some users in the wild aren't always seeing/remembering the existing, fairly subtle hints. Test Plan: Created a reivsion with `--draft`, viewed it, saw richer reminders. Differential Revision: https://secure.phabricator.com/D19204
This commit is contained in:
parent
10b3ddf426
commit
2de06a5375
3 changed files with 33 additions and 5 deletions
|
@ -172,10 +172,10 @@ final class DifferentialRevisionStatus extends Phobject {
|
||||||
'name' => pht('Draft'),
|
'name' => pht('Draft'),
|
||||||
// For legacy clients, treat this as though it is "Needs Review".
|
// For legacy clients, treat this as though it is "Needs Review".
|
||||||
'legacy' => 0,
|
'legacy' => 0,
|
||||||
'icon' => 'fa-file-text-o',
|
'icon' => 'fa-spinner',
|
||||||
'closed' => false,
|
'closed' => false,
|
||||||
'color.icon' => 'grey',
|
'color.icon' => 'pink',
|
||||||
'color.tag' => 'grey',
|
'color.tag' => 'pink',
|
||||||
'color.ansi' => null,
|
'color.ansi' => null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -37,9 +37,14 @@ final class DifferentialDraftField
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the author has held this revision as a draft explicitly, don't
|
// If the author has held this revision as a draft explicitly, don't
|
||||||
// show any misleading messages about it autosubmitting later.
|
// show any misleading messages about it autosubmitting later. We do show
|
||||||
|
// reminder text.
|
||||||
if ($revision->getHoldAsDraft()) {
|
if ($revision->getHoldAsDraft()) {
|
||||||
return array();
|
return array(
|
||||||
|
pht(
|
||||||
|
'This is a draft revision that has not yet been submitted for '.
|
||||||
|
'review.'),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$warnings = array();
|
$warnings = array();
|
||||||
|
@ -93,4 +98,19 @@ final class DifferentialDraftField
|
||||||
return $warnings;
|
return $warnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getWarningsForDetailView() {
|
||||||
|
$revision = $this->getObject();
|
||||||
|
|
||||||
|
if (!$revision->isDraft()) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
|
return array(
|
||||||
|
pht(
|
||||||
|
'This revision is currently a draft. You can leave comments, but '.
|
||||||
|
'no one will be notified until the revision is submitted for '.
|
||||||
|
'review.'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,14 @@ final class DifferentialRevisionEditEngine
|
||||||
return pht('Revision');
|
return pht('Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getCommentViewButtonText($object) {
|
||||||
|
if ($object->isDraft()) {
|
||||||
|
return pht('Submit Quietly');
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::getCommentViewButtonText();
|
||||||
|
}
|
||||||
|
|
||||||
protected function getObjectViewURI($object) {
|
protected function getObjectViewURI($object) {
|
||||||
return $object->getURI();
|
return $object->getURI();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue