From ee7b03bdf7cf8dbac2fc7d17c6a0bf99937a46a4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 23 Jan 2019 06:39:09 -0800 Subject: [PATCH] Correct an issue where the default "Settings" screen could show the wrong settings Summary: Depends on D20013. Recently, I renamed the "Account" panel to "Language". When you land on "Settings" and the first panel is an "EditEngine" panel ("Account/Langauge", "Date and Time", and "Conpherence" are all "EditEngine" panels), the engine shows the controls for the first panel. However, the "first panel" according to EditEngine and the "first panel" in the menu are currently different: the menu groups panels into topics. When I renamed "Account" to "Language", it went from conicidentally being the first panel in both lists to being the second panel in the grouped menu list and the, uh, like 12th panel in the ungrouped raw list. This made landing on "Settings" show you the right chrome, but show you a different panel's controls ("Conpherence", now alphabetically first). Instead, use the same order in both places. (This was also a pre-existing bug if you use a language which translates the panel names such that "Account" is not alphabetically first.) Test Plan: Visited "Settings", saw "Date & Time" form controls instead of "Conpherence" form controls on the default screen with "Date & Time" selected in the menu. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20016 --- .../settings/editor/PhabricatorSettingsEditEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/settings/editor/PhabricatorSettingsEditEngine.php b/src/applications/settings/editor/PhabricatorSettingsEditEngine.php index 4f16d0338b..34a6132d80 100644 --- a/src/applications/settings/editor/PhabricatorSettingsEditEngine.php +++ b/src/applications/settings/editor/PhabricatorSettingsEditEngine.php @@ -152,7 +152,7 @@ final class PhabricatorSettingsEditEngine $viewer = $this->getViewer(); $user = $object->getUser(); - $panels = PhabricatorSettingsPanel::getAllPanels(); + $panels = PhabricatorSettingsPanel::getAllDisplayPanels(); foreach ($panels as $key => $panel) { if (!($panel instanceof PhabricatorEditEngineSettingsPanel)) {