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
F3850483: D25447.1746112417.diff
Wed, Apr 30, 15:13
F3801385: D25447.1745949757.diff
Mon, Apr 28, 18:02
F3763305: D25447.1745839151.diff
Sun, Apr 27, 11:19
F3763304: D25447.1745839150.diff
Sun, Apr 27, 11:19
F3763303: D25447.1745839149.diff
Sun, Apr 27, 11:19
F3763302: D25447.1745839148.diff
Sun, Apr 27, 11:19
F3763301: D25447.1745839147.diff
Sun, Apr 27, 11:19
F3720316: D25447.1745708622.diff
Fri, Apr 25, 23:03

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
Branch
fix-tab-panel-selection
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 862
Build 862: arc lint + arc unit

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