Page MenuHomePhorge

Panels list: fix missing welcome page
ClosedPublic

Authored by valerio.bozzolan on May 31 2024, 12:24.
Tags
None
Referenced Files
F3021302: D25674.1740789240.diff
Fri, Feb 28, 00:34
F2996015: D25674.1740361231.diff
Sun, Feb 23, 01:40
F2996013: D25674.1740361225.diff
Sun, Feb 23, 01:40
F2995872: D25674.1740356475.diff
Sun, Feb 23, 00:21
F2985502: D25674.1740059244.diff
Wed, Feb 19, 13:47
F2961619: D25674.1739168355.diff
Sun, Feb 9, 06:19
F2949721: D25674.1738664375.diff
Mon, Feb 3, 10:19
F2949695: D25674.1738660059.diff
Mon, Feb 3, 09:07

Details

Summary

The method getNewUserBody() was never designed for a list controller.
The method was just orphan. Now, instead, it's non-orphan, and it works
as expected.

This bug was highlighted by Andre Klapper, since their linter was screaming
about inconsistences in the current nonsense usage of getNewUserBody():

D25649

The code was just moved from the list controller, to the search engine.

  • PhabricatorDashboardPanelListController (from)
  • PhabricatorDashboardPanelSearchEngine (to)

Bonus point:

Adjusted the icon and the title to talk about "Panels" and not "Dashboards".

Added also some inline documentation with an hint about ?nux=1.
So now we can easily remember how to test this kind of things.

Closes T15844

Test Plan

In both these pages, you finally see a welcome message, not just in Maniphest:

In both these pages, if you have no elements, you finally see a welcome message,
and not just in Maniphest:

Check that the welcome message helps you in creating a new Panel, and that
talks about Panels, and that have the lovely icon of a Panel.

Diff Detail

Repository
rP Phorge
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1309
Build 1309: arc lint + arc unit

Event Timeline

I confirm that all other 21 definitions of function getNewUserBody() are in *Engine.php files/classes, except the one fixed/moved by this very patch.

I can also confirm that http://phorge.localhost/dashboard/panel/?nux=1 displays a nice Welcome to Panels box instead of the line No panels found. when using ?nux=1 after applying this patch, just like other applications do in this case.

Thus this approach looks correct to me.

This revision is now accepted and ready to land.Jun 3 2024, 17:21