Skip to content

Commit 298604c

Browse files
author
epriestley
committedSep 18, 2014
Rename "beta" to "prototype" and document support policy
Summary: Fixes T6084. Changes: - Rename `phabricator.show-beta-applications` to `phabricator.show-prototypes`, to reinforce that these include early-development applications. - Migrate the config setting. - Add an explicit "no support" banner to the config page. - Rename "Beta" to "Prototype" in the UI. - Use "bomb" icon instead of "half star" icon. - Document prototype applications in more detail. - Explicitly document that we do not support these applications. Test Plan: - Ran migration. - Resolved "obsolete config" issue. - Viewed config setting. - Browsed prototypes in Applications app. - Viewed documentation. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley, hach-que Maniphest Tasks: T6084 Differential Revision: https://secure.phabricator.com/D10493
1 parent 444ced1 commit 298604c

29 files changed

+185
-83
lines changed
 

‎conf/default.conf.php

-3
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,6 @@
630630
// be enabled in production.
631631
'phabricator.developer-mode' => false,
632632

633-
// Should Phabricator show beta applications on the homepage
634-
'phabricator.show-beta-applications' => false,
635-
636633
// Contains a list of uninstalled applications
637634
'phabricator.uninstalled-applications' => array(),
638635

‎resources/celerity/map.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
return array(
99
'names' => array(
10-
'core.pkg.css' => 'f4235a32',
10+
'core.pkg.css' => '3317a3ad',
1111
'core.pkg.js' => 'cbdbd552',
1212
'darkconsole.pkg.js' => 'df001cab',
1313
'differential.pkg.css' => '36884139',
@@ -38,7 +38,7 @@
3838
'rsrc/css/application/auth/auth.css' => '1e655982',
3939
'rsrc/css/application/base/main-menu-view.css' => 'aceca0e9',
4040
'rsrc/css/application/base/notification-menu.css' => '6aa0a74b',
41-
'rsrc/css/application/base/phabricator-application-launch-view.css' => '8b7e271d',
41+
'rsrc/css/application/base/phabricator-application-launch-view.css' => '5d71008f',
4242
'rsrc/css/application/base/standard-page-view.css' => 'dd860661',
4343
'rsrc/css/application/chatlog/chatlog.css' => '852140ff',
4444
'rsrc/css/application/config/config-options.css' => '7fedf08b',
@@ -705,7 +705,7 @@
705705
'path-typeahead' => 'f7fc67ec',
706706
'people-profile-css' => '5402f7a5',
707707
'phabricator-action-list-view-css' => '9ee9910a',
708-
'phabricator-application-launch-view-css' => '8b7e271d',
708+
'phabricator-application-launch-view-css' => '5d71008f',
709709
'phabricator-busy' => '6453c869',
710710
'phabricator-chatlog-css' => '852140ff',
711711
'phabricator-content-source-view-css' => '4b8b05d4',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
$old_key = 'phabricator.show-beta-applications';
4+
$new_key = 'phabricator.show-prototypes';
5+
6+
echo "Migrating '{$old_key}' to '{$new_key}'...\n";
7+
8+
if (PhabricatorEnv::getEnvConfig($new_key)) {
9+
echo "Skipping migration, new data is already set.\n";
10+
return;
11+
}
12+
13+
$old = PhabricatorEnv::getEnvConfigIfExists($old_key);
14+
if (!$old) {
15+
echo "Skipping migration, old data does not exist.\n";
16+
return;
17+
}
18+
19+
PhabricatorConfigEntry::loadConfigEntry($new_key)
20+
->setIsDeleted(0)
21+
->setValue($old)
22+
->save();
23+
24+
echo "Done.\n";

‎src/applications/base/PhabricatorApplication.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function isInstalled() {
5353
return true;
5454
}
5555

56-
$beta = PhabricatorEnv::getEnvConfig('phabricator.show-beta-applications');
57-
if (!$beta && $this->isBeta()) {
56+
$prototypes = PhabricatorEnv::getEnvConfig('phabricator.show-prototypes');
57+
if (!$prototypes && $this->isPrototype()) {
5858
return false;
5959
}
6060

@@ -65,7 +65,7 @@ public function isInstalled() {
6565
}
6666

6767

68-
public function isBeta() {
68+
public function isPrototype() {
6969
return false;
7070
}
7171

‎src/applications/calendar/application/PhabricatorCalendarApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getTitleGlyph() {
2828
return "\xE2\x8C\xA8";
2929
}
3030

31-
public function isBeta() {
31+
public function isPrototype() {
3232
return true;
3333
}
3434

‎src/applications/chatlog/application/PhabricatorChatLogApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function getIconName() {
1818
return 'chatlog';
1919
}
2020

21-
public function isBeta() {
21+
public function isPrototype() {
2222
return true;
2323
}
2424

‎src/applications/config/check/PhabricatorSetupCheckExtraConfig.php

+4
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ public static function getAncientConfig() {
190190
'differential.show-host-field' => $differential_field_reason,
191191
'differential.show-test-plan-field' => $differential_field_reason,
192192
'differential.field-selector' => $differential_field_reason,
193+
'phabricator.show-beta-applications' => pht(
194+
'This option has been renamed to `phabricator.show-prototypes` '.
195+
'to emphasize the unfinished nature of many prototype applications. '.
196+
'Your existing setting has been migrated.'),
193197
);
194198

195199
return $ancient_config;

‎src/applications/config/option/PhabricatorCoreConfigOptions.php

+23-11
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public function getOptions() {
2424

2525
$path = getenv('PATH');
2626

27+
$proto_doc_href = PhabricatorEnv::getDoclink(
28+
'User Guide: Prototype Applications');
29+
$proto_doc_name = pht('User Guide: Prototype Applications');
30+
2731
return array(
2832
$this->newOption('phabricator.base-uri', 'string', null)
2933
->setLocked(true)
@@ -86,25 +90,33 @@ public function getOptions() {
8690
'Phabricator instances are running on both domains, this will '.
8791
'create a collision preventing you from logging in.'))
8892
->addExample('dev', pht('Prefix cookie with "dev"')),
89-
$this->newOption('phabricator.show-beta-applications', 'bool', false)
93+
$this->newOption('phabricator.show-prototypes', 'bool', false)
9094
->setBoolOptions(
9195
array(
92-
pht('Install Beta Applications'),
93-
pht('Uninstall Beta Applications')
96+
pht('Enable Prototypes'),
97+
pht('Disable Prototypes')
9498
))
9599
->setSummary(
96100
pht(
97101
'Install applications which are still under development.'))
98102
->setDescription(
99103
pht(
100-
"Phabricator includes 'Beta' applications which are in an early ".
101-
"stage of development. They range from very rough prototypes to ".
102-
"relatively complete (but unpolished) applications.\n\n".
103-
"By default, Beta applications are not installed. You can enable ".
104-
"this option to install them if you're interested in previewing ".
105-
"upcoming features.\n\n".
106-
"After enabling Beta applications, you can selectively uninstall ".
107-
"them (like normal applications).")),
104+
"IMPORTANT: The upstream does not provide support for prototype ".
105+
"applications.".
106+
"\n\n".
107+
"Phabricator includes prototype applications which are in an ".
108+
"**early stage of development**. By default, prototype ".
109+
"applications are not installed, because are often not yet ".
110+
"developed enough to be generally usable. You can enable ".
111+
"this option to install them if you're developing Phabricator ".
112+
"or are interested in previewing upcoming features.".
113+
"\n\n".
114+
"To learn more about prototypes, see [[ %s | %s ]].".
115+
"\n\n".
116+
"After enabling prototypes, you can selectively uninstall them ".
117+
"(like normal applications).",
118+
$proto_doc_href,
119+
$proto_doc_name)),
108120
$this->newOption('phabricator.serious-business', 'bool', false)
109121
->setBoolOptions(
110122
array(

‎src/applications/diffusion/controller/DiffusionRepositoryNewController.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ public function processRequest() {
4747
array(
4848
pht(
4949
'Create a new, empty repository which Phabricator will host. '.
50-
'For instructions on configuring repository hosting, see %s. '.
51-
'This feature is new and in beta!',
50+
'For instructions on configuring repository hosting, see %s.',
5251
$doc_link),
5352
))
5453
->addButton(

‎src/applications/drydock/application/PhabricatorDrydockApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getApplicationGroup() {
3030
return self::GROUP_UTILITIES;
3131
}
3232

33-
public function isBeta() {
33+
public function isPrototype() {
3434
return true;
3535
}
3636

‎src/applications/fact/application/PhabricatorFactApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function getApplicationGroup() {
2222
return self::GROUP_UTILITIES;
2323
}
2424

25-
public function isBeta() {
25+
public function isPrototype() {
2626
return true;
2727
}
2828

‎src/applications/fund/application/PhabricatorFundApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getApplicationGroup() {
2626
return self::GROUP_UTILITIES;
2727
}
2828

29-
public function isBeta() {
29+
public function isPrototype() {
3030
return true;
3131
}
3232

‎src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getEventListeners() {
3636
);
3737
}
3838

39-
public function isBeta() {
39+
public function isPrototype() {
4040
return true;
4141
}
4242

‎src/applications/meta/controller/PhabricatorApplicationDetailViewController.php

+18-6
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,22 @@ private function buildPropertyView(
7777
phutil_tag('em', array(), $application->getFlavorText()));
7878
}
7979

80-
if ($application->isBeta()) {
80+
if ($application->isPrototype()) {
81+
$proto_href = PhabricatorEnv::getDoclink(
82+
'User Guide: Prototype Applications');
83+
$learn_more = phutil_tag(
84+
'a',
85+
array(
86+
'href' => $proto_href,
87+
'target' => '_blank',
88+
),
89+
pht('Learn More'));
90+
8191
$properties->addProperty(
82-
pht('Release'),
83-
pht('Beta'));
92+
pht('Prototype'),
93+
pht(
94+
'This application is a prototype. %s',
95+
$learn_more));
8496
}
8597

8698
$overview = $application->getOverview();
@@ -160,9 +172,9 @@ private function buildActionView(
160172
->setHref(
161173
$this->getApplicationURI(get_class($selected).'/install/'));
162174

163-
$beta_enabled = PhabricatorEnv::getEnvConfig(
164-
'phabricator.show-beta-applications');
165-
if ($selected->isBeta() && !$beta_enabled) {
175+
$prototypes_enabled = PhabricatorEnv::getEnvConfig(
176+
'phabricator.show-prototypes');
177+
if ($selected->isPrototype() && !$prototypes_enabled) {
166178
$action->setDisabled(true);
167179
}
168180

‎src/applications/meta/controller/PhabricatorApplicationUninstallController.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ public function processRequest() {
2727

2828
$view_uri = $this->getApplicationURI('view/'.$this->application);
2929

30-
$beta_enabled = PhabricatorEnv::getEnvConfig(
31-
'phabricator.show-beta-applications');
30+
$prototypes_enabled = PhabricatorEnv::getEnvConfig(
31+
'phabricator.show-prototypes');
3232

3333
$dialog = id(new AphrontDialogView())
3434
->setUser($user)
3535
->addCancelButton($view_uri);
3636

37-
if ($selected->isBeta() && !$beta_enabled) {
37+
if ($selected->isPrototype() && !$prototypes_enabled) {
3838
$dialog
39-
->setTitle(pht('Beta Applications Not Enabled'))
39+
->setTitle(pht('Prototypes Not Enabled'))
4040
->appendChild(
4141
pht(
42-
'To manage beta applications, enable them by setting %s in your '.
42+
'To manage prototypes, enable them by setting %s in your '.
4343
'Phabricator configuration.',
44-
phutil_tag('tt', array(), 'phabricator.show-beta-applications')));
44+
phutil_tag('tt', array(), 'phabricator.show-prototypes')));
4545
return id(new AphrontDialogResponse())->setDialog($dialog);
4646
}
4747

‎src/applications/meta/query/PhabricatorAppSearchEngine.php

+18-11
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function buildSavedQueryFromRequest(AphrontRequest $request) {
2424
'installed',
2525
$this->readBoolFromRequest($request, 'installed'));
2626
$saved->setParameter(
27-
'beta',
28-
$this->readBoolFromRequest($request, 'beta'));
27+
'prototypes',
28+
$this->readBoolFromRequest($request, 'prototypes'));
2929
$saved->setParameter(
3030
'firstParty',
3131
$this->readBoolFromRequest($request, 'firstParty'));
@@ -51,9 +51,16 @@ public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
5151
$query->withInstalled($installed);
5252
}
5353

54-
$beta = $saved->getParameter('beta');
55-
if ($beta !== null) {
56-
$query->withBeta($beta);
54+
$prototypes = $saved->getParameter('prototypes');
55+
56+
if ($prototypes === null) {
57+
// NOTE: This is the old name of the 'prototypes' option, see T6084.
58+
$prototypes = $saved->getParameter('beta');
59+
$saved->setParameter('prototypes', $prototypes);
60+
}
61+
62+
if ($prototypes !== null) {
63+
$query->withPrototypes($prototypes);
5764
}
5865

5966
$first_party = $saved->getParameter('firstParty');
@@ -92,13 +99,13 @@ public function buildSearchForm(
9299
)))
93100
->appendChild(
94101
id(new AphrontFormSelectControl())
95-
->setLabel(pht('Beta'))
96-
->setName('beta')
97-
->setValue($this->getBoolFromQuery($saved, 'beta'))
102+
->setLabel(pht('Prototypes'))
103+
->setName('prototypes')
104+
->setValue($this->getBoolFromQuery($saved, 'prototypes'))
98105
->setOptions(
99106
array(
100107
'' => pht('Show All Applications'),
101-
'true' => pht('Show Beta Applications'),
108+
'true' => pht('Show Prototype Applications'),
102109
'false' => pht('Show Released Applications'),
103110
)))
104111
->appendChild(
@@ -229,8 +236,8 @@ protected function renderResultList(
229236
$item->addIcon('fa-times', pht('Uninstalled'));
230237
}
231238

232-
if ($application->isBeta()) {
233-
$item->addIcon('fa-star-half-o grey', pht('Beta'));
239+
if ($application->isPrototype()) {
240+
$item->addIcon('fa-bomb grey', pht('Prototype'));
234241
}
235242

236243
if (!$application->isFirstParty()) {

‎src/applications/meta/query/PhabricatorApplicationQuery.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ final class PhabricatorApplicationQuery
44
extends PhabricatorCursorPagedPolicyAwareQuery {
55

66
private $installed;
7-
private $beta;
7+
private $prototypes;
88
private $firstParty;
99
private $nameContains;
1010
private $unlisted;
@@ -27,8 +27,8 @@ public function withInstalled($installed) {
2727
return $this;
2828
}
2929

30-
public function withBeta($beta) {
31-
$this->beta = $beta;
30+
public function withPrototypes($prototypes) {
31+
$this->prototypes = $prototypes;
3232
return $this;
3333
}
3434

@@ -99,9 +99,9 @@ public function loadPage() {
9999
}
100100
}
101101

102-
if ($this->beta !== null) {
102+
if ($this->prototypes !== null) {
103103
foreach ($apps as $key => $app) {
104-
if ($app->isBeta() != $this->beta) {
104+
if ($app->isPrototype() != $this->prototypes) {
105105
unset($apps[$key]);
106106
}
107107
}

‎src/applications/meta/view/PhabricatorApplicationLaunchView.php

-10
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ protected function getTagContent() {
4343
),
4444
$application->getName());
4545

46-
if ($application->isBeta()) {
47-
$content[] = javelin_tag(
48-
'span',
49-
array(
50-
'aural' => false,
51-
'class' => 'phabricator-application-beta',
52-
),
53-
"\xCE\xB2");
54-
}
55-
5646
$content[] = phutil_tag(
5747
'span',
5848
array(

‎src/applications/nuance/application/PhabricatorNuanceApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function getTitleGlyph() {
1414
return "\xE2\x98\x8E";
1515
}
1616

17-
public function isBeta() {
17+
public function isPrototype() {
1818
return true;
1919
}
2020

0 commit comments

Comments
 (0)
Failed to load comments.