1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Expand "Settings" UI to full-width

Summary:
Depends on D19988. See D19826 for the last UI expansion. I don't have an especially strong product rationale for un-fixed-width'ing Settings since it doesn't suffer from the "mystery meat actions" issues that other fixed-width UIs do, but I like the full-width UI better and the other other fixed-width UIs all (?) have some actual rationale (e.g., large tables, multiple actions on subpanels), so "consistency" is an argument here.

Also rename "account" to "language" since both settings are language-related.

This moves away from the direction in D18436.

Test Plan:
Clicked each Settings panel, saw sensible rendering at full-width.

{F6145944}

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20005
This commit is contained in:
epriestley 2019-01-21 09:50:54 -08:00
parent f0c6ee4823
commit f713fa1fd7
8 changed files with 15 additions and 19 deletions

View file

@ -2076,7 +2076,6 @@ phutil_register_library_map(array(
'PhabricatorAccessLog' => 'infrastructure/log/PhabricatorAccessLog.php', 'PhabricatorAccessLog' => 'infrastructure/log/PhabricatorAccessLog.php',
'PhabricatorAccessLogConfigOptions' => 'applications/config/option/PhabricatorAccessLogConfigOptions.php', 'PhabricatorAccessLogConfigOptions' => 'applications/config/option/PhabricatorAccessLogConfigOptions.php',
'PhabricatorAccessibilitySetting' => 'applications/settings/setting/PhabricatorAccessibilitySetting.php', 'PhabricatorAccessibilitySetting' => 'applications/settings/setting/PhabricatorAccessibilitySetting.php',
'PhabricatorAccountSettingsPanel' => 'applications/settings/panel/PhabricatorAccountSettingsPanel.php',
'PhabricatorActionListView' => 'view/layout/PhabricatorActionListView.php', 'PhabricatorActionListView' => 'view/layout/PhabricatorActionListView.php',
'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php', 'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php',
'PhabricatorActivitySettingsPanel' => 'applications/settings/panel/PhabricatorActivitySettingsPanel.php', 'PhabricatorActivitySettingsPanel' => 'applications/settings/panel/PhabricatorActivitySettingsPanel.php',
@ -3362,6 +3361,7 @@ phutil_register_library_map(array(
'PhabricatorKeyringConfigOptionType' => 'applications/files/keyring/PhabricatorKeyringConfigOptionType.php', 'PhabricatorKeyringConfigOptionType' => 'applications/files/keyring/PhabricatorKeyringConfigOptionType.php',
'PhabricatorLDAPAuthProvider' => 'applications/auth/provider/PhabricatorLDAPAuthProvider.php', 'PhabricatorLDAPAuthProvider' => 'applications/auth/provider/PhabricatorLDAPAuthProvider.php',
'PhabricatorLabelProfileMenuItem' => 'applications/search/menuitem/PhabricatorLabelProfileMenuItem.php', 'PhabricatorLabelProfileMenuItem' => 'applications/search/menuitem/PhabricatorLabelProfileMenuItem.php',
'PhabricatorLanguageSettingsPanel' => 'applications/settings/panel/PhabricatorLanguageSettingsPanel.php',
'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php', 'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php',
'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php', 'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php',
'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php', 'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php',
@ -7756,7 +7756,6 @@ phutil_register_library_map(array(
'PhabricatorAccessLog' => 'Phobject', 'PhabricatorAccessLog' => 'Phobject',
'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorAccessibilitySetting' => 'PhabricatorSelectSetting', 'PhabricatorAccessibilitySetting' => 'PhabricatorSelectSetting',
'PhabricatorAccountSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorActionListView' => 'AphrontTagView', 'PhabricatorActionListView' => 'AphrontTagView',
'PhabricatorActionView' => 'AphrontView', 'PhabricatorActionView' => 'AphrontView',
'PhabricatorActivitySettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorActivitySettingsPanel' => 'PhabricatorSettingsPanel',
@ -9244,6 +9243,7 @@ phutil_register_library_map(array(
'PhabricatorKeyringConfigOptionType' => 'PhabricatorConfigJSONOptionType', 'PhabricatorKeyringConfigOptionType' => 'PhabricatorConfigJSONOptionType',
'PhabricatorLDAPAuthProvider' => 'PhabricatorAuthProvider', 'PhabricatorLDAPAuthProvider' => 'PhabricatorAuthProvider',
'PhabricatorLabelProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorLabelProfileMenuItem' => 'PhabricatorProfileMenuItem',
'PhabricatorLanguageSettingsPanel' => 'PhabricatorEditEngineSettingsPanel',
'PhabricatorLegalpadApplication' => 'PhabricatorApplication', 'PhabricatorLegalpadApplication' => 'PhabricatorApplication',
'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType', 'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType',
'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule', 'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule',

View file

@ -115,7 +115,7 @@ final class PhabricatorSettingsMainController
$crumbs->setBorder(true); $crumbs->setBorder(true);
if ($this->user) { if ($this->user) {
$header_text = pht('Edit Settings (%s)', $user->getUserName()); $header_text = pht('Edit Settings: %s', $user->getUserName());
} else { } else {
$header_text = pht('Edit Global Settings'); $header_text = pht('Edit Global Settings');
} }
@ -127,15 +127,13 @@ final class PhabricatorSettingsMainController
$view = id(new PHUITwoColumnView()) $view = id(new PHUITwoColumnView())
->setHeader($header) ->setHeader($header)
->setFixed(true) ->setFooter($response);
->setNavigation($nav)
->setMainColumn($response);
return $this->newPage() return $this->newPage()
->setTitle($title) ->setTitle($title)
->setCrumbs($crumbs) ->setCrumbs($crumbs)
->setNavigation($nav)
->appendChild($view); ->appendChild($view);
} }
private function buildPanels(PhabricatorUserPreferences $preferences) { private function buildPanels(PhabricatorUserPreferences $preferences) {

View file

@ -101,7 +101,7 @@ final class PhabricatorSettingsEditEngine
protected function getPageHeader($object) { protected function getPageHeader($object) {
$user = $object->getUser(); $user = $object->getUser();
if ($user) { if ($user) {
$text = pht('Edit Settings (%s)', $user->getUserName()); $text = pht('Edit Settings: %s', $user->getUserName());
} else { } else {
$text = pht('Edit Global Settings'); $text = pht('Edit Global Settings');
} }

View file

@ -1,12 +1,12 @@
<?php <?php
final class PhabricatorAccountSettingsPanel final class PhabricatorLanguageSettingsPanel
extends PhabricatorEditEngineSettingsPanel { extends PhabricatorEditEngineSettingsPanel {
const PANELKEY = 'account'; const PANELKEY = 'language';
public function getPanelName() { public function getPanelName() {
return pht('Account'); return pht('Language');
} }
public function getPanelGroupKey() { public function getPanelGroupKey() {

View file

@ -6,7 +6,7 @@ final class PhabricatorSettingsAccountPanelGroup
const PANELGROUPKEY = 'account'; const PANELGROUPKEY = 'account';
public function getPanelGroupName() { public function getPanelGroupName() {
return null; return pht('Account');
} }
protected function getPanelGroupOrder() { protected function getPanelGroupOrder() {

View file

@ -10,7 +10,7 @@ final class PhabricatorPronounSetting
} }
public function getSettingPanelKey() { public function getSettingPanelKey() {
return PhabricatorAccountSettingsPanel::PANELKEY; return PhabricatorLanguageSettingsPanel::PANELKEY;
} }
protected function getSettingOrder() { protected function getSettingOrder() {

View file

@ -10,7 +10,7 @@ final class PhabricatorTranslationSetting
} }
public function getSettingPanelKey() { public function getSettingPanelKey() {
return PhabricatorAccountSettingsPanel::PANELKEY; return PhabricatorLanguageSettingsPanel::PANELKEY;
} }
protected function getSettingOrder() { protected function getSettingOrder() {

View file

@ -1249,6 +1249,8 @@ abstract class PhabricatorEditEngine
$view->setHeader($page_header); $view->setHeader($page_header);
} }
$view->setFooter($content);
$page = $controller->newPage() $page = $controller->newPage()
->setTitle($header_text) ->setTitle($header_text)
->setCrumbs($crumbs) ->setCrumbs($crumbs)
@ -1256,11 +1258,7 @@ abstract class PhabricatorEditEngine
$navigation = $this->getNavigation(); $navigation = $this->getNavigation();
if ($navigation) { if ($navigation) {
$view->setFixed(true); $page->setNavigation($navigation);
$view->setNavigation($navigation);
$view->setMainColumn($content);
} else {
$view->setFooter($content);
} }
return $page; return $page;