Different calendar views should order events the same
Categories
(Calendar :: Calendar Frontend, enhancement)
Tracking
(Not tracked)
People
(Reporter: henry-x, Unassigned)
References
(Blocks 1 open bug)
Details
Example of different ordering
Create two events on the same day: "Event A" from 10 to 12, "Event B" from 10 to 11. In the week view, "Event A" is positioned before "Event B". In the multiweek view, "Event B" is before "Event A".
Current differences
Basically, all views will sort events by start time, but when two events have the same start time:
- multiday views will sort with longer events first https://searchfox.org/comm-central/rev/5e5535a9f48e16789629724fe30e376177279cfc/calendar/base/content/calendar-multiday-view.js#715
- multiweek views will sort with shorter events first https://searchfox.org/comm-central/source/calendar/base/content/calendar-month-view.js#182 and https://searchfox.org/comm-central/rev/5e5535a9f48e16789629724fe30e376177279cfc/calendar/base/modules/utils/calViewUtils.jsm#356
Note also that, unlike the multiday views, the multiweek views will sort todo items before event items https://searchfox.org/comm-central/rev/5e5535a9f48e16789629724fe30e376177279cfc/calendar/base/modules/utils/calViewUtils.jsm#323
Moreover, the multiweek view has some extra steps when the start and end are the same https://searchfox.org/comm-central/rev/5e5535a9f48e16789629724fe30e376177279cfc/calendar/base/modules/utils/calViewUtils.jsm#361
Desired Ordering
We should use the same ordering for both. Perhaps with the exception of todo items (mix them with the events in the multiday views, but keep them separate in the multiweek views).
For events with the same start time, I'm not sure if we should use the multiweek or multiday approach.
Moreover, we might as well use a hashId comparison as the final comparison (here https://searchfox.org/comm-central/rev/5e5535a9f48e16789629724fe30e376177279cfc/calendar/base/modules/utils/calViewUtils.jsm#369) to ensure a total ordering.
Description
•