mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11:04 +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:
parent
f0c6ee4823
commit
f713fa1fd7
8 changed files with 15 additions and 19 deletions
|
@ -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',
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorAccountSettingsPanel
|
||||
final class PhabricatorLanguageSettingsPanel
|
||||
extends PhabricatorEditEngineSettingsPanel {
|
||||
|
||||
const PANELKEY = 'account';
|
||||
const PANELKEY = 'language';
|
||||
|
||||
public function getPanelName() {
|
||||
return pht('Account');
|
||||
return pht('Language');
|
||||
}
|
||||
|
||||
public function getPanelGroupKey() {
|
|
@ -6,7 +6,7 @@ final class PhabricatorSettingsAccountPanelGroup
|
|||
const PANELGROUPKEY = 'account';
|
||||
|
||||
public function getPanelGroupName() {
|
||||
return null;
|
||||
return pht('Account');
|
||||
}
|
||||
|
||||
protected function getPanelGroupOrder() {
|
||||
|
|
|
@ -10,7 +10,7 @@ final class PhabricatorPronounSetting
|
|||
}
|
||||
|
||||
public function getSettingPanelKey() {
|
||||
return PhabricatorAccountSettingsPanel::PANELKEY;
|
||||
return PhabricatorLanguageSettingsPanel::PANELKEY;
|
||||
}
|
||||
|
||||
protected function getSettingOrder() {
|
||||
|
|
|
@ -10,7 +10,7 @@ final class PhabricatorTranslationSetting
|
|||
}
|
||||
|
||||
public function getSettingPanelKey() {
|
||||
return PhabricatorAccountSettingsPanel::PANELKEY;
|
||||
return PhabricatorLanguageSettingsPanel::PANELKEY;
|
||||
}
|
||||
|
||||
protected function getSettingOrder() {
|
||||
|
|
|
@ -1249,6 +1249,8 @@ abstract class PhabricatorEditEngine
|
|||
$view->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;
|
||||
|
|
Loading…
Reference in a new issue