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

Update Profiles to look like Project UI

Summary: Updates People profiles to look more like Project profiles. This removes Conpherence and Flag links. Don't think you like Conpherence links much and for Flags maybe we can put them in the quick create menu?

Test Plan:
View profiles with and without Badges.

{F1069365}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+76 -47
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '956d6a9f', 10 + 'core.pkg.css' => 'ab6cb6b8', 11 11 'core.pkg.js' => '573e6664', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 93 93 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 94 94 'rsrc/css/application/policy/policy.css' => '957ea14c', 95 95 'rsrc/css/application/ponder/ponder-view.css' => '7b0df4da', 96 - 'rsrc/css/application/project/project-view.css' => 'ea27bd1f', 96 + 'rsrc/css/application/project/project-view.css' => '5c32ce0a', 97 97 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 98 98 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 99 99 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', ··· 123 123 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 124 124 'rsrc/css/phui/phui-badge.css' => 'f25c3476', 125 125 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 126 - 'rsrc/css/phui/phui-box.css' => '04e9369f', 126 + 'rsrc/css/phui/phui-box.css' => '6240d401', 127 127 'rsrc/css/phui/phui-button.css' => 'd6ac72db', 128 128 'rsrc/css/phui/phui-crumbs-view.css' => '414406b5', 129 129 'rsrc/css/phui/phui-document-pro.css' => '8799acf7', ··· 793 793 'phui-action-panel-css' => '91c7b835', 794 794 'phui-badge-view-css' => 'f25c3476', 795 795 'phui-big-info-view-css' => 'bd903741', 796 - 'phui-box-css' => '04e9369f', 796 + 'phui-box-css' => '6240d401', 797 797 'phui-button-css' => 'd6ac72db', 798 798 'phui-calendar-css' => 'ccabe893', 799 799 'phui-calendar-day-css' => 'd1cf6f93', ··· 842 842 'policy-edit-css' => '815c66f7', 843 843 'policy-transaction-detail-css' => '82100a43', 844 844 'ponder-view-css' => '7b0df4da', 845 - 'project-view-css' => 'ea27bd1f', 845 + 'project-view-css' => '5c32ce0a', 846 846 'raphael-core' => '51ee6b43', 847 847 'raphael-g' => '40dde778', 848 848 'raphael-g-line' => '40da039e',
+1 -1
src/applications/people/controller/PhabricatorPeopleProfileManageController.php
··· 28 28 29 29 $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); 30 30 $profile_icon = id(new PHUIIconView()) 31 - ->setIconFont($profile_icon.' grey'); 31 + ->setIconFont($profile_icon); 32 32 $profile_title = $profile->getDisplayTitle(); 33 33 34 34 $header = id(new PHUIHeaderView())
+58 -39
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 29 29 30 30 $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); 31 31 $profile_icon = id(new PHUIIconView()) 32 - ->setIconFont($profile_icon.' grey'); 32 + ->setIconFont($profile_icon); 33 33 $profile_title = $profile->getDisplayTitle(); 34 34 35 35 $header = id(new PHUIHeaderView()) 36 36 ->setHeader($user->getFullName()) 37 37 ->setSubheader(array($profile_icon, $profile_title)) 38 - ->setImage($picture); 38 + ->setImage($picture) 39 + ->setProfileHeader(true); 39 40 40 - $actions = id(new PhabricatorActionListView()) 41 - ->setObject($user) 42 - ->setUser($viewer); 41 + $can_edit = PhabricatorPolicyFilter::hasCapability( 42 + $viewer, 43 + $user, 44 + PhabricatorPolicyCapability::CAN_EDIT); 43 45 44 - $class = 'PhabricatorConpherenceApplication'; 45 - if (PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { 46 - $href = id(new PhutilURI('/conpherence/new/')) 47 - ->setQueryParam('participant', $user->getPHID()); 48 - 49 - $can_send = $viewer->isLoggedIn(); 50 - 51 - $actions->addAction( 52 - id(new PhabricatorActionView()) 53 - ->setIcon('fa-comments') 54 - ->setName(pht('Send Message')) 55 - ->setWorkflow(true) 56 - ->setDisabled(!$can_send) 57 - ->setHref($href)); 46 + if ($can_edit) { 47 + $id = $user->getID(); 48 + $header->setImageEditURL($this->getApplicationURI("picture/{$id}/")); 58 49 } 59 50 60 - 61 - $properties = $this->buildPropertyView($user, $actions); 51 + $properties = $this->buildPropertyView($user); 62 52 $name = $user->getUsername(); 63 53 64 - $object_box = id(new PHUIObjectBoxView()) 65 - ->setHeader($header) 66 - ->addPropertyList($properties); 54 + $feed = $this->buildPeopleFeed($user, $viewer); 55 + $feed = phutil_tag_div('project-view-feed', $feed); 67 56 68 - $feed = id(new PHUIObjectBoxView()) 69 - ->setHeaderText(pht('Recent Activity')) 70 - ->appendChild($this->buildPeopleFeed($user, $viewer)); 57 + $badges = $this->buildBadgesView($user); 71 58 72 - $badges = $this->buildBadgesView($user); 59 + if ($badges) { 60 + $columns = id(new PHUITwoColumnView()) 61 + ->addClass('project-view-badges') 62 + ->setMainColumn( 63 + array( 64 + $properties, 65 + $feed, 66 + )) 67 + ->setSideColumn( 68 + array( 69 + $badges, 70 + )); 71 + } else { 72 + $columns = array($properties, $feed); 73 + } 73 74 74 75 $nav = $this->getProfileMenu(); 75 76 $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_PROFILE); 76 77 77 78 $crumbs = $this->buildApplicationCrumbs(); 79 + $crumbs->setBorder(true); 80 + 81 + require_celerity_resource('project-view-css'); 82 + $home = phutil_tag( 83 + 'div', 84 + array( 85 + 'class' => 'project-view-home', 86 + ), 87 + array( 88 + $header, 89 + $columns, 90 + )); 78 91 79 92 return $this->newPage() 80 93 ->setTitle($user->getUsername()) ··· 82 95 ->setCrumbs($crumbs) 83 96 ->appendChild( 84 97 array( 85 - $object_box, 86 - $badges, 87 - $feed, 98 + $home, 88 99 )); 89 100 } 90 101 91 102 private function buildPropertyView( 92 - PhabricatorUser $user, 93 - PhabricatorActionListView $actions) { 103 + PhabricatorUser $user) { 94 104 95 105 $viewer = $this->getRequest()->getUser(); 96 106 $view = id(new PHUIPropertyListView()) 97 107 ->setUser($viewer) 98 - ->setObject($user) 99 - ->setActionList($actions); 108 + ->setObject($user); 100 109 101 110 $field_list = PhabricatorCustomField::getObjectFields( 102 111 $user, 103 112 PhabricatorCustomField::ROLE_VIEW); 104 113 $field_list->appendFieldsToPropertyList($user, $viewer, $view); 105 114 115 + if ($view->isEmpty()) { 116 + return null; 117 + } 118 + 119 + $view = id(new PHUIBoxView()) 120 + ->setColor(PHUIBoxView::GREY) 121 + ->appendChild($view) 122 + ->addClass('project-view-properties'); 123 + 106 124 return $view; 107 125 } 108 126 ··· 132 150 $flex->addItem($item); 133 151 } 134 152 135 - $box = id(new PHUIObjectBoxView()) 136 - ->setHeaderText(pht('Badges')) 137 - ->appendChild($flex); 153 + $box = id(new PHUIObjectBoxView()) 154 + ->setHeaderText(pht('Badges')) 155 + ->appendChild($flex) 156 + ->setBackground(PHUIBoxView::GREY); 138 157 } 139 158 } 140 159 ··· 161 180 'requires but just a single step.')); 162 181 $view = $builder->buildView(); 163 182 164 - return phutil_tag_div('phabricator-project-feed', $view->render()); 183 + return $view->render(); 165 184 166 185 } 167 186
+8
webroot/rsrc/css/application/project/project-view.css
··· 54 54 .project-view-home .phui-box-grey .phui-object-item-list-view { 55 55 padding: 8px; 56 56 } 57 + 58 + .device-desktop .phui-two-column-view.project-view-badges .phui-side-column { 59 + width: 364px; 60 + } 61 + 62 + .profile-no-badges { 63 + padding: 24px 0; 64 + }
+4 -2
webroot/rsrc/css/phui/phui-box.css
··· 39 39 border-bottom: 2px solid #fff; 40 40 } 41 41 42 - .phui-box-blue .phui-info-severity-nodata, 43 - .phui-box-grey .phui-info-severity-nodata { 42 + .phui-object-box.phui-box-blue div.phui-info-severity-nodata, 43 + .phui-object-box.phui-box-grey div.phui-info-severity-nodata { 44 44 background: transparent; 45 45 padding: 12px 4px; 46 46 text-align: center; 47 + border: none; 48 + color: {$greytext}; 47 49 }