Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2630177
D25447.1732051914.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25447.1732051914.diff
View Options
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
@@ -85,10 +85,12 @@
$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 @@
$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 @@
$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();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 21:31 (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
979166
Default Alt Text
D25447.1732051914.diff (1 KB)
Attached To
Mode
D25447: Dashboard Panel: fix first tab sometime not opened anymore
Attached
Detach File
Event Timeline
Log In to Comment