From 92861cc1f000f3143be2ba8a0523a0422d1db2d3 Mon Sep 17 00:00:00 2001 From: Valerio Bozzolan Date: Thu, 6 Jul 2023 13:31:20 +0200 Subject: [PATCH] Dashboard Tabs: fix action "Move Right" Summary: It seems that if you use the "Move Right" action, you can get an unrelated error message about "Move Left": This is already the first tab. It can not move any farther to the left. This happened because there was an incomplete condition. Closes T15493 Test Plan: - visit /dashboard/panel/ and create at least two panels (please, owned by you) - visit a Dashboard, and add a Tabs Panel - take the first Tab: "Move Right" After this change, "Move Right" now always works. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15493 Differential Revision: https://we.phorge.it/D25307 --- .../panel/PhabricatorDashboardPanelTabsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php index 2b36d3f8a2..193e4580d6 100644 --- a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php +++ b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelTabsController.php @@ -327,7 +327,7 @@ final class PhabricatorDashboardPanelTabsController 'This is already the last tab. It can not move any farther to '. 'the right.')) ->addCancelButton($cancel_uri); - } else if ((string)head_key($old_config) === $target) { + } else if (!$is_next && (string)head_key($old_config) === $target) { return $this->newDialog() ->setTitle(pht('Impossible!')) ->appendParagraph(