From ba00022730c79a7a0b1c35cceb2775ea854187d4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 27 Jul 2016 06:58:28 -0700 Subject: [PATCH] Remove extra margins on Calendar month view Summary: Ref T11326. This doesn't go quite as far as the mock in T11326#185932, but gets rid of the easy margins. Also cleans up some of the border rules so they're simpler and more consistent (no weird ragged edges on the far right). Test Plan: {F1738951} Reviewers: chad Reviewed By: chad Maniphest Tasks: T11326 Differential Revision: https://secure.phabricator.com/D16335 --- resources/celerity/map.php | 4 ++-- .../PhabricatorCalendarEventSearchEngine.php | 19 ++++++++----------- ...PhabricatorApplicationSearchResultView.php | 4 +--- .../css/phui/calendar/phui-calendar-month.css | 15 +++++++++------ 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 7905323a81..f6e2c41457 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -117,7 +117,7 @@ return array( 'rsrc/css/layout/phabricator-source-code-view.css' => 'cbeef983', 'rsrc/css/phui/calendar/phui-calendar-day.css' => 'f15bb6d6', 'rsrc/css/phui/calendar/phui-calendar-list.css' => '5d89cd71', - 'rsrc/css/phui/calendar/phui-calendar-month.css' => '29a5ef75', + 'rsrc/css/phui/calendar/phui-calendar-month.css' => '31cec731', 'rsrc/css/phui/calendar/phui-calendar.css' => 'daadaf39', 'rsrc/css/phui/phui-action-list.css' => 'c5eba19d', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', @@ -830,7 +830,7 @@ return array( 'phui-calendar-css' => 'daadaf39', 'phui-calendar-day-css' => 'f15bb6d6', 'phui-calendar-list-css' => '5d89cd71', - 'phui-calendar-month-css' => '29a5ef75', + 'phui-calendar-month-css' => '31cec731', 'phui-chart-css' => '6bf6f78e', 'phui-crumbs-view-css' => 'b4fa5755', 'phui-curtain-view-css' => '7148ae25', diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 86d298d069..d82e78d5b3 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -255,7 +255,7 @@ final class PhabricatorCalendarEventSearchEngine array $handles) { if ($this->isMonthView($query)) { - return $this->buildCalendarView($events, $query); + return $this->buildCalendarMonthView($events, $query); } else if ($this->isDayView($query)) { return $this->buildCalendarDayView($events, $query); } @@ -307,7 +307,7 @@ final class PhabricatorCalendarEventSearchEngine return $result; } - private function buildCalendarView( + private function buildCalendarMonthView( array $events, PhabricatorSavedQuery $query) { assert_instances_of($events, 'PhabricatorCalendarEvent'); @@ -362,11 +362,9 @@ final class PhabricatorCalendarEventSearchEngine $month_view->setBrowseURI( $this->getURI('query/'.$query->getQueryKey().'/')); - // TODO redesign-2015 : Move buttons out of PHUICalendarView? - $result = new PhabricatorApplicationSearchResultView(); - $result->setContent($month_view); - - return $result; + return id(new PhabricatorApplicationSearchResultView()) + ->setContent($month_view) + ->setCollapsed(true); } private function buildCalendarDayView( @@ -422,10 +420,9 @@ final class PhabricatorCalendarEventSearchEngine $day_view->setBrowseURI( $this->getURI('query/'.$query->getQueryKey().'/')); - $result = new PhabricatorApplicationSearchResultView(); - $result->setContent($day_view); - - return $result; + return id(new PhabricatorApplicationSearchResultView()) + ->setContent($day_view) + ->setCollapsed(true); } private function getDisplayYearAndMonthAndDay( diff --git a/src/applications/search/view/PhabricatorApplicationSearchResultView.php b/src/applications/search/view/PhabricatorApplicationSearchResultView.php index a6b8aa3b8b..45a396898b 100644 --- a/src/applications/search/view/PhabricatorApplicationSearchResultView.php +++ b/src/applications/search/view/PhabricatorApplicationSearchResultView.php @@ -1,13 +1,11 @@