@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't render a grip on tasks returned over AJAX to non-draggable UIs

Summary:
Fixes T5140. When you ajax-edit a task and we send back a full-size card, we currently always put a drag grip on it.

If you clicked the "edit" thing from a priority-ordered list, this is appropriate. However, if you clicked it from some other type of list, it is not.

Pass the expected grippableness through the call.

Test Plan:
- Edited a task from a reorderable (priority-ordered) view, got grip.
- Edited a task from a nonreorderable (author-ordered) view, got no grip.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5140

Differential Revision: https://secure.phabricator.com/D10282

+9 -3
+3 -2
src/applications/maniphest/controller/ManiphestController.php
··· 44 44 } 45 45 46 46 protected function renderSingleTask(ManiphestTask $task) { 47 - $user = $this->getRequest()->getUser(); 47 + $request = $this->getRequest(); 48 + $user = $request->getUser(); 48 49 49 50 $phids = $task->getProjectPHIDs(); 50 51 if ($task->getOwnerPHID()) { ··· 58 59 59 60 $view = id(new ManiphestTaskListView()) 60 61 ->setUser($user) 61 - ->setShowSubpriorityControls(true) 62 + ->setShowSubpriorityControls(!$request->getStr('ungrippable')) 62 63 ->setShowBatchControls(true) 63 64 ->setHandles($handles) 64 65 ->setTasks(array($task));
+1
src/applications/maniphest/controller/ManiphestTaskEditController.php
··· 547 547 ->addHiddenInput('template', $template_id) 548 548 ->addHiddenInput('responseType', $response_type) 549 549 ->addHiddenInput('order', $order) 550 + ->addHiddenInput('ungrippable', $request->getStr('ungrippable')) 550 551 ->addHiddenInput('columnPHID', $request->getStr('columnPHID')); 551 552 552 553 if ($parent_task) {
+5 -1
src/applications/maniphest/view/ManiphestTaskListView.php
··· 90 90 )); 91 91 92 92 if ($this->showBatchControls) { 93 + $href = new PhutilURI('/maniphest/task/edit/'.$task->getID().'/'); 94 + if (!$this->showSubpriorityControls) { 95 + $href->setQueryParam('ungrippable', 'true'); 96 + } 93 97 $item->addAction( 94 98 id(new PHUIListItemView()) 95 99 ->setIcon('fa-pencil') 96 100 ->addSigil('maniphest-edit-task') 97 - ->setHref('/maniphest/task/edit/'.$task->getID().'/')); 101 + ->setHref($href)); 98 102 } 99 103 100 104 $list->addItem($item);