@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.

Make "New Conversation" a workflow dialog in Conpherence

Summary: Ref T2416. My actual goal here is to stop having two places where we call the "load and display a list of threads" logic, but this is generally weird and no longer necessary with drag-and-drop-to-upload-remarkup.

Test Plan: {F37992}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2416

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

+24 -53
+8 -4
src/applications/conpherence/controller/ConpherenceController.php
··· 105 105 $nav->setMenuID('conpherence-menu'); 106 106 107 107 if (!$for_application) { 108 - $nav->addButton( 109 - 'new', 110 - pht('New Conversation'), 111 - $this->getApplicationURI('new/')); 108 + $nav->addMenuItem( 109 + id(new PhabricatorMenuItemView()) 110 + ->setName(pht('New Conversation')) 111 + ->setWorkflow(true) 112 + ->setKey('new') 113 + ->setHref($this->getApplicationURI('new/')) 114 + ->setType(PhabricatorMenuItemView::TYPE_BUTTON)); 115 + 112 116 $nav->addLabel(pht('Unread')); 113 117 $nav = $this->addConpherencesToNav( 114 118 $unread_conpherences,
+16 -49
src/applications/conpherence/controller/ConpherenceNewController.php
··· 121 121 122 122 $submit_uri = $this->getApplicationURI('new/'); 123 123 $cancel_uri = $this->getApplicationURI(); 124 - if ($request->isAjax()) { 125 - // TODO - we can get a better cancel_uri once we get better at crazy 126 - // ajax jonx T2086 127 - if ($participant_prefill) { 128 - $handle = $handles[$participant_prefill]; 129 - $cancel_uri = $handle->getURI(); 130 - } 131 - $form = id(new AphrontDialogView()) 132 - ->setSubmitURI($submit_uri) 133 - ->addSubmitButton() 134 - ->setWidth(AphrontDialogView::WIDTH_FORM) 135 - ->addCancelButton($cancel_uri); 136 - } else { 137 - $form = id(new AphrontFormView()) 138 - ->setID('conpherence-message-pane') 139 - ->setAction($submit_uri); 124 + 125 + // TODO - we can get a better cancel_uri once we get better at crazy 126 + // ajax jonx T2086 127 + if ($participant_prefill) { 128 + $handle = $handles[$participant_prefill]; 129 + $cancel_uri = $handle->getURI(); 140 130 } 141 131 142 - $form 132 + $dialog = id(new AphrontDialogView()) 133 + ->setWidth(AphrontDialogView::WIDTH_FORM) 134 + ->setUser($user) 135 + ->setTitle($title) 136 + ->addCancelButton($cancel_uri) 137 + ->addSubmitButton(pht('Create Conversation')); 138 + 139 + $form = id(new AphrontFormLayoutView()) 143 140 ->setUser($user) 144 141 ->appendChild( 145 142 id(new AphrontFormTokenizerControl()) ··· 154 151 ->setName('message') 155 152 ->setValue($message) 156 153 ->setLabel(pht('Message')) 157 - ->setPlaceHolder(pht('Drag and drop to include files...')) 158 154 ->setError($e_message)); 159 155 160 - if ($request->isAjax()) { 161 - $form->setTitle($title); 162 - return id(new AphrontDialogResponse()) 163 - ->setDialog($form); 164 - } 156 + $dialog->appendChild($form); 165 157 166 - $form 167 - ->appendChild( 168 - id(new AphrontFormSubmitControl()) 169 - ->setValue(pht('Submit')) 170 - ->addCancelButton($cancel_uri)); 171 - 172 - $this->loadStartingConpherences(); 173 - $this->setSelectedConpherencePHID(null); 174 - $this->initJavelinBehaviors(); 175 - $nav = $this->buildSideNavView('new'); 176 - $header = id(new PhabricatorHeaderView()) 177 - ->setHeader($title); 178 - 179 - $nav->appendChild( 180 - array( 181 - $header, 182 - $error_view, 183 - $form, 184 - )); 185 - 186 - return $this->buildApplicationPage( 187 - $nav, 188 - array( 189 - 'title' => $title, 190 - 'device' => true, 191 - )); 158 + return id(new AphrontDialogResponse())->setDialog($dialog); 192 159 } 193 160 }