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

Possible fix for month view day deadzone

Summary: Ref T8193, Possible fix for month view day deadzone

Test Plan: Open Calendar month view in Chrome, Firefox, or Safari. Verify that days with many events still link to the day views of those days.

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8193

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

+28 -11
+2 -2
resources/celerity/map.php
··· 123 123 'rsrc/css/layout/phabricator-source-code-view.css' => '2ceee894', 124 124 'rsrc/css/phui/calendar/phui-calendar-day.css' => 'c0cf782a', 125 125 'rsrc/css/phui/calendar/phui-calendar-list.css' => 'c1c7f338', 126 - 'rsrc/css/phui/calendar/phui-calendar-month.css' => '94b1750a', 126 + 'rsrc/css/phui/calendar/phui-calendar-month.css' => '476be7e0', 127 127 'rsrc/css/phui/calendar/phui-calendar.css' => 'ccabe893', 128 128 'rsrc/css/phui/phui-action-header-view.css' => '89c497e7', 129 129 'rsrc/css/phui/phui-action-list.css' => '4f4d09f2', ··· 767 767 'phui-calendar-css' => 'ccabe893', 768 768 'phui-calendar-day-css' => 'c0cf782a', 769 769 'phui-calendar-list-css' => 'c1c7f338', 770 - 'phui-calendar-month-css' => '94b1750a', 770 + 'phui-calendar-month-css' => '476be7e0', 771 771 'phui-crumbs-view-css' => '594d719e', 772 772 'phui-document-view-css' => '94d5dcd8', 773 773 'phui-feed-story-css' => 'c9f3a0b5',
+24 -5
src/view/phui/calendar/PHUICalendarMonthView.php
··· 117 117 118 118 foreach ($cell_lists_by_week as $week_of_cell_lists) { 119 119 $cells = array(); 120 + $max_count = $this->getMaxDailyEventsForWeek($week_of_cell_lists); 121 + 120 122 foreach ($week_of_cell_lists as $cell_list) { 121 - $cells[] = $this->getEventListCell($cell_list); 123 + $cells[] = $this->getEventListCell($cell_list, $max_count); 122 124 } 123 125 $rows[] = phutil_tag('tr', array(), $cells); 124 126 ··· 153 155 return $box; 154 156 } 155 157 156 - private function getEventListCell($event_list) { 158 + private function getMaxDailyEventsForWeek($week_of_cell_lists) { 159 + $max_count = 0; 160 + 161 + foreach ($week_of_cell_lists as $cell_list) { 162 + if ($cell_list['count'] > $max_count) { 163 + $max_count = $cell_list['count']; 164 + } 165 + } 166 + 167 + return $max_count; 168 + } 169 + 170 + private function getEventListCell($event_list, $max_count = 0) { 157 171 $list = $event_list['list']; 158 172 $class = $event_list['class']; 159 173 $uri = $event_list['uri']; ··· 162 176 $viewer_is_invited = $list->getIsViewerInvitedOnList(); 163 177 164 178 $event_count_badge = $this->getEventCountBadge($count, $viewer_is_invited); 165 - $cell_day_secret_link = $this->getHiddenDayLink($uri); 179 + $cell_day_secret_link = $this->getHiddenDayLink($uri, $max_count, 125); 166 180 167 181 $cell_data_div = phutil_tag( 168 182 'div', ··· 191 205 192 206 if ($date) { 193 207 $uri = $event_list['uri']; 194 - $cell_day_secret_link = $this->getHiddenDayLink($uri); 208 + $cell_day_secret_link = $this->getHiddenDayLink($uri, 0, 25); 195 209 196 210 $cell_day = phutil_tag( 197 211 'a', ··· 291 305 $event_count); 292 306 } 293 307 294 - private function getHiddenDayLink($uri) { 308 + private function getHiddenDayLink($uri, $count, $max_height) { 309 + // approximately the height of the tallest cell 310 + $height = 18 * $count + 5; 311 + $height = ($height > $max_height) ? $height : $max_height; 312 + $height_style = 'height: '.$height.'px'; 295 313 return phutil_tag( 296 314 'a', 297 315 array( 298 316 'class' => 'phui-calendar-month-secret-link', 317 + 'style' => $height_style, 299 318 'href' => $uri, 300 319 ), 301 320 null);
+2 -4
webroot/rsrc/css/phui/calendar/phui-calendar-month.css
··· 54 54 position: absolute; 55 55 left: 0; 56 56 right: 0; 57 - top: 0; 58 - bottom: 0; 59 - outline: 0; 60 57 } 61 58 62 59 table.phui-calendar-view tr td:first-child { ··· 149 146 background: transparent; 150 147 } 151 148 152 - .phui-calendar-view .phui-calendar-list { 149 + .phui-calendar-view .phui-calendar-list, 150 + .phui-calendar-view .phui-calendar-month-list { 153 151 padding: 1px; 154 152 width: auto; 155 153 }