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

Allow navigation breadcrumbs to be marked as "always visible" so they show up on phones

Summary:
See PHI624. Some of the mobile navigation and breadcrumbs in support pacts aren't as good as they could be.

In particular, we generally collapse crumbs on mobile to just the first and last crumbs. The first crumb is the application; the last is the current page.

On `/PHIxxx` pages, the first crumb isn't very useful since the Support landing page is two levels up: you usually want to go back to the pact, not all the way back to the Support landing page.

We also don't need the space since the last crumb (`PHIxxx`) is always small.

Allow Support and other similar applications to tailor the crumb behavior more narrowly if they end up in situations like this.

Test Plan:
- With an additional change to instances (see next diff), viewed a support issue page (`/PHI123`) on mobile and desktop.
- Saw a link directly back to the pact on both mobile and desktop.

Reviewers: amckinley

Reviewed By: amckinley

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

+26 -3
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => '15191c65', 12 - 'core.pkg.css' => 'cb8ae4dc', 12 + 'core.pkg.css' => '8be474cc', 13 13 'core.pkg.js' => 'e1f0f7bd', 14 14 'differential.pkg.css' => '06dc617c', 15 15 'differential.pkg.js' => 'c2ca903a', ··· 144 144 'rsrc/css/phui/phui-cms.css' => '504b4b23', 145 145 'rsrc/css/phui/phui-comment-form.css' => 'ac68149f', 146 146 'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad', 147 - 'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb', 147 + 'rsrc/css/phui/phui-crumbs-view.css' => '10728aaa', 148 148 'rsrc/css/phui/phui-curtain-view.css' => '2bdaf026', 149 149 'rsrc/css/phui/phui-document-pro.css' => '8af7ea27', 150 150 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', ··· 810 810 'phui-cms-css' => '504b4b23', 811 811 'phui-comment-form-css' => 'ac68149f', 812 812 'phui-comment-panel-css' => 'f50152ad', 813 - 'phui-crumbs-view-css' => '6ece3bbb', 813 + 'phui-crumbs-view-css' => '10728aaa', 814 814 'phui-curtain-view-css' => '2bdaf026', 815 815 'phui-document-summary-view-css' => '9ca48bdf', 816 816 'phui-document-view-css' => '878c2f52',
+21
src/view/phui/PHUICrumbView.php
··· 8 8 private $isLastCrumb; 9 9 private $workflow; 10 10 private $aural; 11 + private $alwaysVisible; 11 12 12 13 public function setAural($aural) { 13 14 $this->aural = $aural; ··· 16 17 17 18 public function getAural() { 18 19 return $this->aural; 20 + } 21 + 22 + /** 23 + * Make this crumb always visible, even on devices where it would normally 24 + * be hidden. 25 + * 26 + * @param bool True to make the crumb always visible. 27 + * @return this 28 + */ 29 + public function setAlwaysVisible($always_visible) { 30 + $this->alwaysVisible = $always_visible; 31 + return $this; 32 + } 33 + 34 + public function getAlwaysVisible() { 35 + return $this->alwaysVisible; 19 36 } 20 37 21 38 public function setWorkflow($workflow) { ··· 96 113 ->addClass('phui-crumb-view'); 97 114 } else { 98 115 $classes[] = 'phabricator-last-crumb'; 116 + } 117 + 118 + if ($this->getAlwaysVisible()) { 119 + $classes[] = 'phui-crumb-always-visible'; 99 120 } 100 121 101 122 $tag = javelin_tag(
+2
webroot/rsrc/css/phui/phui-crumbs-view.css
··· 55 55 } 56 56 57 57 .device-phone .phui-crumb-view.phabricator-last-crumb .phui-crumb-name, 58 + .device-phone .phui-crumb-view.phui-crumb-always-visible .phui-crumb-name, 59 + .device-phone .phui-crumb-view.phui-crumb-always-visible + .phui-crumb-divider, 58 60 .device-phone .phui-crumb-view.phui-crumb-has-icon, 59 61 .device-phone .phui-crumb-has-icon + .phui-crumb-divider { 60 62 display: inline-block;