From f713fa1fd7ec0096c3ca2245c782d4aae03a593d Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 21 Jan 2019 09:50:54 -0800 Subject: [PATCH] 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 --- src/__phutil_library_map__.php | 4 ++-- .../controller/PhabricatorSettingsMainController.php | 8 +++----- .../settings/editor/PhabricatorSettingsEditEngine.php | 2 +- ...ingsPanel.php => PhabricatorLanguageSettingsPanel.php} | 6 +++--- .../panelgroup/PhabricatorSettingsAccountPanelGroup.php | 2 +- .../settings/setting/PhabricatorPronounSetting.php | 2 +- .../settings/setting/PhabricatorTranslationSetting.php | 2 +- .../transactions/editengine/PhabricatorEditEngine.php | 8 +++----- 8 files changed, 15 insertions(+), 19 deletions(-) rename src/applications/settings/panel/{PhabricatorAccountSettingsPanel.php => PhabricatorLanguageSettingsPanel.php} (75%) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 132ea75367..7932a7e79e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2076,7 +2076,6 @@ phutil_register_library_map(array( 'PhabricatorAccessLog' => 'infrastructure/log/PhabricatorAccessLog.php', 'PhabricatorAccessLogConfigOptions' => 'applications/config/option/PhabricatorAccessLogConfigOptions.php', 'PhabricatorAccessibilitySetting' => 'applications/settings/setting/PhabricatorAccessibilitySetting.php', - 'PhabricatorAccountSettingsPanel' => 'applications/settings/panel/PhabricatorAccountSettingsPanel.php', 'PhabricatorActionListView' => 'view/layout/PhabricatorActionListView.php', 'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php', 'PhabricatorActivitySettingsPanel' => 'applications/settings/panel/PhabricatorActivitySettingsPanel.php', @@ -3362,6 +3361,7 @@ phutil_register_library_map(array( 'PhabricatorKeyringConfigOptionType' => 'applications/files/keyring/PhabricatorKeyringConfigOptionType.php', 'PhabricatorLDAPAuthProvider' => 'applications/auth/provider/PhabricatorLDAPAuthProvider.php', 'PhabricatorLabelProfileMenuItem' => 'applications/search/menuitem/PhabricatorLabelProfileMenuItem.php', + 'PhabricatorLanguageSettingsPanel' => 'applications/settings/panel/PhabricatorLanguageSettingsPanel.php', 'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php', 'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php', 'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php', @@ -7756,7 +7756,6 @@ phutil_register_library_map(array( 'PhabricatorAccessLog' => 'Phobject', 'PhabricatorAccessLogConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorAccessibilitySetting' => 'PhabricatorSelectSetting', - 'PhabricatorAccountSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorActionListView' => 'AphrontTagView', 'PhabricatorActionView' => 'AphrontView', 'PhabricatorActivitySettingsPanel' => 'PhabricatorSettingsPanel', @@ -9244,6 +9243,7 @@ phutil_register_library_map(array( 'PhabricatorKeyringConfigOptionType' => 'PhabricatorConfigJSONOptionType', 'PhabricatorLDAPAuthProvider' => 'PhabricatorAuthProvider', 'PhabricatorLabelProfileMenuItem' => 'PhabricatorProfileMenuItem', + 'PhabricatorLanguageSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', 'PhabricatorLegalpadApplication' => 'PhabricatorApplication', 'PhabricatorLegalpadDocumentPHIDType' => 'PhabricatorPHIDType', 'PhabricatorLegalpadSignaturePolicyRule' => 'PhabricatorPolicyRule', diff --git a/src/applications/settings/controller/PhabricatorSettingsMainController.php b/src/applications/settings/controller/PhabricatorSettingsMainController.php index 9dc84a9bd0..46246c3ce5 100644 --- a/src/applications/settings/controller/PhabricatorSettingsMainController.php +++ b/src/applications/settings/controller/PhabricatorSettingsMainController.php @@ -115,7 +115,7 @@ final class PhabricatorSettingsMainController $crumbs->setBorder(true); if ($this->user) { - $header_text = pht('Edit Settings (%s)', $user->getUserName()); + $header_text = pht('Edit Settings: %s', $user->getUserName()); } else { $header_text = pht('Edit Global Settings'); } @@ -127,15 +127,13 @@ final class PhabricatorSettingsMainController $view = id(new PHUITwoColumnView()) ->setHeader($header) - ->setFixed(true) - ->setNavigation($nav) - ->setMainColumn($response); + ->setFooter($response); return $this->newPage() ->setTitle($title) ->setCrumbs($crumbs) + ->setNavigation($nav) ->appendChild($view); - } private function buildPanels(PhabricatorUserPreferences $preferences) { diff --git a/src/applications/settings/editor/PhabricatorSettingsEditEngine.php b/src/applications/settings/editor/PhabricatorSettingsEditEngine.php index 30e831543d..4f16d0338b 100644 --- a/src/applications/settings/editor/PhabricatorSettingsEditEngine.php +++ b/src/applications/settings/editor/PhabricatorSettingsEditEngine.php @@ -101,7 +101,7 @@ final class PhabricatorSettingsEditEngine protected function getPageHeader($object) { $user = $object->getUser(); if ($user) { - $text = pht('Edit Settings (%s)', $user->getUserName()); + $text = pht('Edit Settings: %s', $user->getUserName()); } else { $text = pht('Edit Global Settings'); } diff --git a/src/applications/settings/panel/PhabricatorAccountSettingsPanel.php b/src/applications/settings/panel/PhabricatorLanguageSettingsPanel.php similarity index 75% rename from src/applications/settings/panel/PhabricatorAccountSettingsPanel.php rename to src/applications/settings/panel/PhabricatorLanguageSettingsPanel.php index a7eb3ad099..9b846bd4b6 100644 --- a/src/applications/settings/panel/PhabricatorAccountSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorLanguageSettingsPanel.php @@ -1,12 +1,12 @@ setHeader($page_header); } + $view->setFooter($content); + $page = $controller->newPage() ->setTitle($header_text) ->setCrumbs($crumbs) @@ -1256,11 +1258,7 @@ abstract class PhabricatorEditEngine $navigation = $this->getNavigation(); if ($navigation) { - $view->setFixed(true); - $view->setNavigation($navigation); - $view->setMainColumn($content); - } else { - $view->setFooter($content); + $page->setNavigation($navigation); } return $page;