1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

Diffusion: fix missing mobile "Actions" from Manage Repo

Summary:
After this change, the page "/manage/" related to Diffusion
repositories has an "Actions" button for mobile users:

{F276113}

Before this change, that button was missing only from this
specific page, and so it was really difficult for them
(if not impossible) to edit repository's basic information:

{F276115}

Do not confuse the hamburger menu on the sidebar with this
"Actions". The hamburger contains queries like Active Repo,
All Repo, etc. Instead the Actions contains
Edit Basic Info, Allow Dangerous Changes, etc.

It seems the cause of this problem is originated from an
apparently incomplete rollback occurred in Sep 6 2017 from
Phabricator:

e1fd74ddb5

As you can see, the DiffusionRepositoryBasicsManagementPanel
was probably not completely restored from the previous
version, at least for the part related to the method
newActionList():

bb369c7b71

The method newActionList() was restored in every other
panel but no the one related to the Basics Management. So,
a new PhabricatorActionListView object was manually
created, but without generating an ID from the Celerity
utilities.

In short, this change assigns an ID to this Curtain, in
order to correctly generates a related "Actions" menu
again. Otherwise, on mobile the curtain (with all the
actions) is automatically hidden, without any alternative.

Closes T15067

Test Plan:
- Repository > Actions > Manage Repository
- Reduce the page until "Actions" appears (yeeh!)

Reviewers: O1 Blessed Committers, Cigaryno, avivey

Reviewed By: O1 Blessed Committers, Cigaryno, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Tags: #diffusion, #mobile

Maniphest Tasks: T15067

Differential Revision: https://we.phorge.it/D25109
This commit is contained in:
Valerio Bozzolan 2023-04-06 10:58:05 +02:00
parent 787a84969f
commit 524579fe64
2 changed files with 4 additions and 2 deletions

View file

@ -31,8 +31,7 @@ final class DiffusionRepositoryBasicsManagementPanel
$repository = $this->getRepository();
$viewer = $this->getViewer();
$action_list = id(new PhabricatorActionListView())
->setViewer($viewer);
$action_list = $this->newActionList();
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,

View file

@ -111,6 +111,9 @@ abstract class DiffusionRepositoryManagementPanel
final protected function newActionList() {
$viewer = $this->getViewer();
// Generating this ID allows to spawn the "Actions" menu
// on mobile on the header
$action_id = celerity_generate_unique_node_id();
return id(new PhabricatorActionListView())