From 4f3aad4f9f21c9b9bc8ae013f03924434deb29d2 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sat, 1 Mar 2025 20:03:06 +0100 Subject: [PATCH] Portals: Rename unused newNoMenuItemsView() to newNoContentView() Summary: Followup to rPf8b8d88 Rename uncalled `newNoMenuItemsView()` to `newNoContentView()` overwriting this method in the parent class, to fix showing more specific UI messages for empty portals. Test Plan: Code: * Grep the code for non-existing `newNoMenuItemsView` * Check code of parent class `PhabricatorProfileMenuEngine` Workflows: * Create an empty portal via http://phorge.localhost/portal/edit/form/default/, see correct (more specific) string "Use "Edit Menu" to add menu items to this portal." displayed * Click "Edit Menu" to go to http://phorge.localhost/portal/view/1/configure/global/ of that Portal just created, on the right in "Add New Menu Item..." select "Divider" and click "Create Menu Item" button, go back to portal, see correct (more specific) string "None of the visible menu items in this portal can render any content." displayed Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Tags: #dashboards Differential Revision: https://we.phorge.it/D25776 --- .../engine/PhabricatorDashboardPortalProfileMenuEngine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/dashboard/engine/PhabricatorDashboardPortalProfileMenuEngine.php b/src/applications/dashboard/engine/PhabricatorDashboardPortalProfileMenuEngine.php index 8265b306b1..41dff71454 100644 --- a/src/applications/dashboard/engine/PhabricatorDashboardPortalProfileMenuEngine.php +++ b/src/applications/dashboard/engine/PhabricatorDashboardPortalProfileMenuEngine.php @@ -32,7 +32,7 @@ final class PhabricatorDashboardPortalProfileMenuEngine return $items; } - protected function newNoMenuItemsView(array $items) { + protected function newNoContentView(array $items) { $object = $this->getProfileObject(); $builtins = $this->getBuiltinProfileItems($object); @@ -41,7 +41,7 @@ final class PhabricatorDashboardPortalProfileMenuEngine pht('New Portal'), pht('Use "Edit Menu" to add menu items to this portal.')); } else { - return $this->newNoContentView( + return $this->newEmptyView( pht('No Portal Content'), pht( 'None of the visible menu items in this portal can render any '. -- 2.51.2