Page MenuHomePhorge

Dashboard Panel: fix first tab sometime not opened anymore
ClosedPublic

Authored by valerio.bozzolan on Oct 12 2023, 13:37.
Tags
None
Referenced Files
F3529425: D25447.1744862223.diff
Wed, Apr 16, 03:57
F3528984: D25447.1744858231.diff
Wed, Apr 16, 02:50
F3528137: D25447.1744847369.diff
Tue, Apr 15, 23:49
F3495334: D25447.1744788096.diff
Tue, Apr 15, 07:21
F3417766: D25447.1744615700.diff
Sun, Apr 13, 07:28
F3416987: D25447.1744612942.diff
Sun, Apr 13, 06:42
F3402314: D25447.1744566835.diff
Sat, Apr 12, 17:53
F3372757: D25447.1744251984.diff
Wed, Apr 9, 02:26

Details

Summary

After this change the first Tab ID is always selected, so we don't risk
to have no tabs opened by default under some corner cases.

This is vaguely better than the original logic that relied on the fact that
(0=="0") is true. Besides being a vaguely weird emoticon as well, now that
I look at it better.

Original logic:

https://we.phorge.it/source/phorge/browse/master/src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php;c43618a3a8bb021936fad687f04cb1a95faa23e4$289

This fixes a regression that appeared in the cute Wikimedia Phabricator
(that now is really Wikimedia Phorge). Their homepage should be gorgeous again,
without blank space due to unopened silly tabs.

Closes T15651

Test Plan
  • Have a Tab Panel (/dashboard/panel/).
  • Be sure that the first Tab is automatically selected (again?)

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

add useful comment (at least in my opinion) about $idx

This revision is now accepted and ready to land.Oct 16 2023, 06:19