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

Hover hint on calendar list items should appear on the most convenient side of the item

Summary: Hover hint on calendar list items should be to the right in day view, left in profile view, on top in month view

Test Plan: Open profile view, calendar items should have a left hover. Open day view, calendar items should have a right hover. Open month view, calendar items should have top hover.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9606

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

+22 -4
+1
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 223 223 $events = msort($events, 'getEpochStart'); 224 224 $day_view = id(new PHUICalendarWeekView()) 225 225 ->setViewer($viewer) 226 + ->setView('week') 226 227 ->setEvents($events) 227 228 ->setWeekLength(3) 228 229 ->render();
+7 -1
src/view/phui/calendar/PHUICalendarListView.php
··· 85 85 } 86 86 87 87 $tip = $this->getEventTooltip($event); 88 - $tip_align = ($this->getView() == 'day') ? 'E' : 'N'; 88 + if ($this->getView() == 'day') { 89 + $tip_align = 'E'; 90 + } else if ($this->getView() == 'month') { 91 + $tip_align = 'N'; 92 + } else { 93 + $tip_align = 'W'; 94 + } 89 95 $content = javelin_tag( 90 96 'a', 91 97 array(
+3 -2
src/view/phui/calendar/PHUICalendarMonthView.php
··· 90 90 $max_daily = 15; 91 91 $counter = 0; 92 92 93 - $list = new PHUICalendarListView(); 94 - $list->setViewer($viewer); 93 + $list = id(new PHUICalendarListView()) 94 + ->setViewer($viewer) 95 + ->setView('month'); 95 96 foreach ($all_day_events as $item) { 96 97 if ($counter <= $max_daily) { 97 98 $list->addEvent($item);
+11 -1
src/view/phui/calendar/PHUICalendarWeekView.php
··· 4 4 private $events; 5 5 private $dateTime; 6 6 private $weekLength = 7; 7 + private $view = 'day'; 7 8 8 9 public function setEvents($events) { 9 10 $this->events = $events; ··· 25 26 public function setWeekLength($week_length) { 26 27 $this->weekLength = $week_length; 27 28 return $this; 29 + } 30 + 31 + public function setView($view) { 32 + $this->view = $view; 33 + return $this; 34 + } 35 + 36 + private function getView() { 37 + return $this->view; 28 38 } 29 39 30 40 public function render() { ··· 64 74 65 75 $list = id(new PHUICalendarListView()) 66 76 ->setUser($this->getViewer()) 67 - ->setView('day'); 77 + ->setView($this->getView()); 68 78 69 79 if (count($events) == 0) { 70 80 $list->showBlankState(true);