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

Hovercard - add project images

Summary:
adds project images. Also fiddles with HTML + CSS just a bit so we have a "picture" column and a "details" column if a picture exists.

This keeps the details all in a nice column even if there are many details that end up being taller than the picture UI.

Fixes T3991.

Test Plan: looked at a task (no pic), project (pic w/ no details), and user (pic w/ many details) hovercard and all looked good on Chrome and Safari

Reviewers: epriestley, chad

CC: chad, Korvin, epriestley, aran

Maniphest Tasks: T3991

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

authored by

Bob Trahan and committed by
epriestley
8e413152 761b6622

+47 -13
+2 -2
resources/celerity/map.php
··· 121 121 'rsrc/css/layout/phabricator-action-list-view.css' => '81383e25', 122 122 'rsrc/css/layout/phabricator-crumbs-view.css' => '2d9db584', 123 123 'rsrc/css/layout/phabricator-filetree-view.css' => 'a8c86ace', 124 - 'rsrc/css/layout/phabricator-hovercard-view.css' => '67c12b16', 124 + 'rsrc/css/layout/phabricator-hovercard-view.css' => '46a13cf0', 125 125 'rsrc/css/layout/phabricator-side-menu-view.css' => '503699d0', 126 126 'rsrc/css/layout/phabricator-source-code-view.css' => '62a99814', 127 127 'rsrc/css/phui/calendar/phui-calendar-day.css' => 'de035c8a', ··· 696 696 'phabricator-filetree-view-css' => 'a8c86ace', 697 697 'phabricator-flag-css' => '5337623f', 698 698 'phabricator-hovercard' => '4f344388', 699 - 'phabricator-hovercard-view-css' => '67c12b16', 699 + 'phabricator-hovercard-view-css' => '46a13cf0', 700 700 'phabricator-jump-nav' => 'f0c5e726', 701 701 'phabricator-keyboard-shortcut' => '1ae869f2', 702 702 'phabricator-keyboard-shortcut-manager' => 'ad7a69ca',
+3 -1
src/applications/project/phid/PhabricatorProjectPHIDTypeProject.php
··· 25 25 array $phids) { 26 26 27 27 return id(new PhabricatorProjectQuery()) 28 - ->withPHIDs($phids); 28 + ->withPHIDs($phids) 29 + ->needImages(true); 29 30 } 30 31 31 32 public function loadHandles( ··· 42 43 $handle->setName($name); 43 44 $handle->setObjectName('#'.rtrim($project->getPhrictionSlug(), '/')); 44 45 $handle->setURI("/project/view/{$id}/"); 46 + $handle->setImageURI($project->getProfileImageURI()); 45 47 46 48 if ($project->isArchived()) { 47 49 $handle->setStatus(PhabricatorObjectHandleStatus::STATUS_CLOSED);
+15 -6
src/view/widget/hovercard/PhabricatorHovercardView.php
··· 18 18 private $actions = array(); 19 19 20 20 private $color = 'blue'; 21 - 22 21 public function setObjectHandle(PhabricatorObjectHandle $handle) { 23 22 $this->handle = $handle; 24 23 return $this; ··· 109 108 $body = phutil_tag( 110 109 'div', 111 110 array( 112 - 'class' => 'profile-header-picture-frame', 113 - 'style' => 'background-image: url('.$handle->getImageURI().');', 114 - ), 115 - '') 116 - ->appendHTML($body); 111 + 'class' => 'phabricator-hovercard-body-image'), 112 + phutil_tag( 113 + 'div', 114 + array( 115 + 'class' => 'profile-header-picture-frame', 116 + 'style' => 'background-image: url('.$handle->getImageURI().');', 117 + ), 118 + '')) 119 + ->appendHTML( 120 + phutil_tag( 121 + 'div', 122 + array( 123 + 'class' => 'phabricator-hovercard-body-details', 124 + ), 125 + $body)); 117 126 } 118 127 119 128 $buttons = array();
+27 -4
webroot/rsrc/css/layout/phabricator-hovercard-view.css
··· 7 7 } 8 8 9 9 .phabricator-hovercard-wrapper { 10 + float: left; 10 11 border-radius: 5px; 11 12 width: 400px; 12 13 padding: 6px; ··· 14 15 } 15 16 16 17 .device-phone .phabricator-hovercard-wrapper { 18 + float: left; 17 19 width: 300px; 18 20 } 19 21 20 22 .phabricator-hovercard-container { 23 + float: left; 24 + width: 100%; 21 25 border: 1px solid {$greytext}; 22 26 } 23 27 ··· 27 31 } 28 32 29 33 .phabricator-hovercard-body { 30 - padding: 8px; 34 + float: left; 35 + width: 100%; 36 + padding: 8px 0px 8px 0px; 31 37 background-color: white; 32 38 color: {$darkgreytext}; 33 39 } 34 40 41 + .phabricator-hovercard-body-header, 42 + .phabricator-hovercard-body-item { 43 + margin: 0px 0px 0px 8px; 44 + } 45 + 35 46 .phabricator-hovercard-body-header { 36 47 font-size: 13px; 37 48 padding-bottom: 2px; 38 49 color: {$darkgreytext}; 39 50 } 40 51 52 + .phabricator-hovercard-body .phabricator-hovercard-body-image { 53 + clear: left; 54 + float: left; 55 + width: 58px; 56 + } 57 + 58 + .phabricator-hovercard-body .phabricator-hovercard-body-details { 59 + clear: right; 60 + float: left; 61 + width: 342px; 62 + } 63 + 41 64 .phabricator-hovercard-body .profile-header-picture-frame { 42 65 float: left; 43 - margin: 0; 44 - margin-right: 10px; 45 - margin-bottom: 5px; 66 + margin: 0px 8px 0px 8px; 46 67 width: 50px; 47 68 height: 50px; 48 69 background-position: center; ··· 50 71 } 51 72 52 73 .phabricator-hovercard-tail { 74 + width: 396px; 75 + float: left; 53 76 padding: 3px 2px; 54 77 background-color: #eeeeee; 55 78 border-bottom-left-radius: 2px;