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

Strike through archived projects in navigation crumbs

Summary:
Going to e.g. the workboard of an archived project, there is no indication when the project has been archived (the blurred project icon is only displayed if the viewport width is >920px). This can lead to confusion why a workboard is completely empty.
Thus render an archived project as strike-through in the navigation bread crumbs.

Closes T15890

Test Plan:
* Go to the {Profile, Workboard, Reports, Members, Subprojects, Reports} pages of an active and an archived project and look at the navigation crumbs bar below Phorge's global top bar.
* Create an active subproject and active milestone of an archived project (and vice versa) and look at the navigation crumbs.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #projects

Maniphest Tasks: T15890

Differential Revision: https://we.phorge.it/D25774

+31 -8
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '2f25eb4f', 11 11 'conpherence.pkg.js' => '020aebcf', 12 - 'core.pkg.css' => 'ac619266', 12 + 'core.pkg.css' => '112931ab', 13 13 'core.pkg.js' => '8c86adab', 14 14 'dark-console.pkg.js' => '187792c2', 15 15 'differential.pkg.css' => '94bb10ca', ··· 146 146 'rsrc/css/phui/phui-cms.css' => '8c05c41e', 147 147 'rsrc/css/phui/phui-comment-form.css' => '3c6679a3', 148 148 'rsrc/css/phui/phui-comment-panel.css' => 'ec4e31c0', 149 - 'rsrc/css/phui/phui-crumbs-view.css' => '614f43cf', 149 + 'rsrc/css/phui/phui-crumbs-view.css' => 'a6a337a4', 150 150 'rsrc/css/phui/phui-curtain-object-ref-view.css' => '51d93266', 151 151 'rsrc/css/phui/phui-curtain-view.css' => '68c5efb6', 152 152 'rsrc/css/phui/phui-document-pro.css' => '48e72f0a', ··· 838 838 'phui-cms-css' => '8c05c41e', 839 839 'phui-comment-form-css' => '3c6679a3', 840 840 'phui-comment-panel-css' => 'ec4e31c0', 841 - 'phui-crumbs-view-css' => '614f43cf', 841 + 'phui-crumbs-view-css' => 'a6a337a4', 842 842 'phui-curtain-object-ref-view-css' => '51d93266', 843 843 'phui-curtain-view-css' => '68c5efb6', 844 844 'phui-document-summary-view-css' => 'b068eed1',
+2 -2
src/applications/project/controller/PhabricatorProjectController.php
··· 137 137 break; 138 138 } 139 139 } 140 - 141 - $crumbs->addTextCrumb($ancestor->getName(), $crumb_uri); 140 + $archived = $ancestor->isArchived(); 141 + $crumbs->addTextCrumb($ancestor->getName(), $crumb_uri, $archived); 142 142 } 143 143 } 144 144
+16
src/view/phui/PHUICrumbView.php
··· 4 4 5 5 private $name; 6 6 private $href; 7 + private $strikethrough = false; 7 8 private $icon; 8 9 private $isLastCrumb; 9 10 private $workflow; ··· 54 55 return $this; 55 56 } 56 57 58 + /** 59 + * Render this crumb as strike-through. 60 + * 61 + * @param bool $strikethrough True to render the crumb strike-through. 62 + * @return $this 63 + */ 64 + public function setStrikethrough(bool $strikethrough) { 65 + $this->strikethrough = $strikethrough; 66 + return $this; 67 + } 68 + 57 69 public function setIcon($icon) { 58 70 $this->icon = $icon; 59 71 return $this; ··· 88 100 $classes[] = 'phui-crumb-has-icon'; 89 101 $icon = id(new PHUIIconView()) 90 102 ->setIcon($this->icon); 103 + } 104 + 105 + if ($this->strikethrough) { 106 + $classes[] = 'phui-crumb-strikethrough'; 91 107 } 92 108 93 109 // Surround the crumb name with spaces so that double clicking it only
+6 -3
src/view/phui/PHUICrumbsView.php
··· 15 15 * Convenience method for adding a simple crumb with just text, or text and 16 16 * a link. 17 17 * 18 - * @param string $text Text of the crumb. 18 + * @param string $text Text of the crumb. 19 19 * @param string $href (optional) href for the crumb. 20 + * @param bool $strikethrough (optional) Strikethrough (=inactive/disabled) 21 + * for the crumb. 20 22 * @return $this 21 23 */ 22 - public function addTextCrumb($text, $href = null) { 24 + public function addTextCrumb($text, $href = null, $strikethrough = false) { 23 25 return $this->addCrumb( 24 26 id(new PHUICrumbView()) 25 27 ->setName($text) 26 - ->setHref($href)); 28 + ->setHref($href) 29 + ->setStrikethrough($strikethrough)); 27 30 } 28 31 29 32 public function addCrumb(PHUICrumbView $crumb) {
+4
webroot/rsrc/css/phui/phui-crumbs-view.css
··· 71 71 margin: 0 4px; 72 72 } 73 73 74 + .phui-crumb-strikethrough > .phui-crumb-name { 75 + text-decoration: line-through; 76 + } 77 + 74 78 .device-phone .phui-crumb-icon { 75 79 margin-left: 7px; 76 80 }