diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php index 3cf73b539e..6b4f2fe5d6 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php @@ -85,10 +85,12 @@ final class PhabricatorDashboardTabsPanelType $rename_uri = id(new PhutilURI($rename_uri)) ->replaceQueryParam('contextPHID', $context_phid); - $selected = 0; - $key_list = array_keys($config); + // In the future we may persist which panel was selected. + // At the moment we have always selected the first one. + $selected = (string)head($key_list); + $next_keys = array(); $prev_keys = array(); for ($ii = 0; $ii < count($key_list); $ii++) { @@ -111,7 +113,8 @@ final class PhabricatorDashboardTabsPanelType $name = pht('Unnamed Tab'); } - $is_selected = (string)$idx === (string)$selected; + // The $idx can be something like "0", "1" or "asdasd98". + $is_selected = (string)$idx === $selected; $tab_view = id(new PHUIListItemView()) ->setHref('#') @@ -282,7 +285,8 @@ final class PhabricatorDashboardTabsPanelType $panel_content = pht('(Invalid Panel)'); } - $is_selected = (string)$idx === (string)$selected; + // Note that $idx can be something like "0", "1" or "asdasd98". + $is_selected = (string)$idx === $selected; $content_id = celerity_generate_unique_node_id();