Closes T8114, Calendar day view should start at 8am at the latest and hour of first event at the earliest.
Details
Details
- Reviewers
epriestley chad - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T8114: Day view should show the day starting at 8am
- Commits
- Restricted Diffusion Commit
rPddb62d1ec376: Calendar day view should start at 8am at the latest and hour of first event…
Open day view on day with all day event and event at 5am, all day events should all be stacked at the top of the day view table, and day should start at 5am.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think I caught one actual problem (views with no events at all) -- either fix that or let me know it works fine?
src/view/phui/calendar/PHUICalendarDayView.php | ||
---|---|---|
111–112 | Maybe this would be more clear as something like: $first_visible_hour = min($first_event_hour->format('G'), 8); if ($hour->format('G') < $first_visible_hour) { continue; } Best I can come up with. Actually, I'd guess this might cause a problem on days with no events ("Trying to call method format() on null."). So maybe it's like: $first_visible_hour = 8; if ($first_event_hour) { $first_event_hour_number = $first_event_hour->format('G'); if ($first_event_hour_number < $first_visible_hour) { $first_visible_hour = $first_event_hour_number; } } if ($hour->format('G') < $first_visible_hour) { continue; } That could be a little cleaner, maybe, as: $early_hours = array(8); if ($first_event_hour) { $early_hours[] = $first_event_hour->format('G'); } if (hour->format('G') < min($early_hours)) { continue; } | |
165 | For days with no all day events, does this render something anything funky? | |
webroot/rsrc/css/phui/calendar/phui-calendar-day.css | ||
10–12 | Unused |
src/view/phui/calendar/PHUICalendarDayView.php | ||
---|---|---|
165 | Nope. Looks okay with no events. |