mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Curtain: add Hovercard support
Summary: Before this change, the right navigation panel (Curtain) had info without Hovercard support. After this change, all fields, like Subscribers, Tags, Referenced Files etc. have Hovercards. If you meet an UX problem with a specific field with Hovercard, you can disable that specific Hovercard, calling PHUICurtainObjectRefView::setHovercarded(false). This is an example, now with Hovercard support: {F342785} Closes T15577 Test Plan: No nuclear implosions when, on desktop and with a mouse: Browse Maniphest Task and mouse hover Authored By, Assigned To, Subscribers, Referenced Files, ... Browse Phriction document and mouse Tags, Referenced Files, Subscribers, ... Browse single commit and mouse hover Referenced Files, Subscribers, ... Browse Ponder question and mouse hover Tags, Referenced Files, Subscribers, ... Browse Differential revision and mouse hover Tags, Referenced Files, Subscribers, ... Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15577 Differential Revision: https://we.phorge.it/D25424
This commit is contained in:
parent
2ba2cbaf9b
commit
2295bcda14
1 changed files with 11 additions and 1 deletions
|
@ -7,6 +7,7 @@ final class PHUICurtainObjectRefView
|
|||
private $epoch;
|
||||
private $highlighted;
|
||||
private $exiled;
|
||||
private $hovercarded = true;
|
||||
private $exileNote = false;
|
||||
|
||||
public function setHandle(PhabricatorObjectHandle $handle) {
|
||||
|
@ -30,6 +31,11 @@ final class PHUICurtainObjectRefView
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setHovercarded($hovercarded) {
|
||||
$this->hovercarded = $hovercarded;
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getTagAttributes() {
|
||||
$classes = array();
|
||||
$classes[] = 'phui-curtain-object-ref-view';
|
||||
|
@ -155,7 +161,11 @@ final class PHUICurtainObjectRefView
|
|||
$handle = $this->handle;
|
||||
|
||||
if ($handle) {
|
||||
$title_view = $handle->renderLink();
|
||||
if ($this->hovercarded) {
|
||||
$title_view = $handle->renderHovercardLink();
|
||||
} else {
|
||||
$title_view = $handle->renderLink();
|
||||
}
|
||||
}
|
||||
|
||||
return $title_view;
|
||||
|
|
Loading…
Reference in a new issue