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

Open "Help" menu links in a new window

Summary: Fixes T11243. Seems reasonable to open this stuff in a new window so you don't put any application state in Herald, etc., at risk -- looking in this menu for help with a currently-executing workflow is reasonable and normal.

Test Plan: Clicked a help menu link, saw it open in a new page.

Reviewers: avivey, chad

Reviewed By: chad

Maniphest Tasks: T11243

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

+16 -3
+4 -2
src/applications/base/PhabricatorApplication.php
··· 183 183 $item = id(new PHUIListItemView()) 184 184 ->setName($article['name']) 185 185 ->setIcon('fa-book') 186 - ->setHref($article['href']); 186 + ->setHref($article['href']) 187 + ->setOpenInNewWindow(true); 187 188 188 189 $items[] = $item; 189 190 } ··· 203 204 $item = id(new PHUIListItemView()) 204 205 ->setName($spec['name']) 205 206 ->setIcon('fa-envelope-o') 206 - ->setHref($href); 207 + ->setHref($href) 208 + ->setOpenInNewWindow(true); 207 209 $items[] = $item; 208 210 } 209 211 }
+12 -1
src/view/phui/PHUIListItemView.php
··· 29 29 private $indented; 30 30 private $hideInApplicationMenu; 31 31 private $icons = array(); 32 + private $openInNewWindow = false; 32 33 33 - public function setHideInApplicationMenu($hide) { 34 + public function setOpenInNewWindow($open_in_new_window) { 35 + $this->openInNewWindow = $open_in_new_window; 36 + return $this; 37 + } 38 + 39 + public function getOpenInNewWindow() { 40 + return $this->openInNewWindow; 41 + } 42 + 43 + public function setHideInApplicationMenu($hide) { 34 44 $this->hideInApplicationMenu = $hide; 35 45 return $this; 36 46 } ··· 294 304 'class' => implode(' ', $classes), 295 305 'meta' => $meta, 296 306 'sigil' => $sigil, 307 + 'target' => $this->getOpenInNewWindow() ? '_blank' : null, 297 308 ), 298 309 array( 299 310 $aural,