Open Bug 1746895 Opened 2 years ago Updated 2 years ago

Dynamic and appropriate minimum sizes for multiday event boxes

Categories

(Calendar :: Calendar Frontend, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: henry-x, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(4 files)

The current minimum size for calendar-event-box elements in the multiday views is calculated based on getOptimalMinSize (https://searchfox.org/comm-central/rev/3fd89f9e9945ff19b9c10d62438b63d10c7eb01b/calendar/base/content/calendar-multiday-view.js#1866), which is outdated. Moreover, this only provides a min-size in the time-direction. In the other direction the box can grow arbitrarily small.

Having just two simultaneous events with alarms and/or categories on smaller screens highlights the limitations of this approach. And, events with short durations (or no duration, e.g. tasks with a due time, but no entry time) are unreadable in the rotated view.

Moreover, event names and locations can be cropped mid-way.

Proposal

We should give events a comfortable minimum size that gives enough space to read at least the first ~8 characters of their name. If there is a location, we should give enough space for it to be visible.

As such, each event box would have its own minimum size depending on its icons, whether it has a category and whether it has a shown location. We could also allow each column to have independent widths (when not-rotated) that aren't necessarily equal so we can better distribute the space we have.

This would also mean we are more likely to have a minimum length in the time direction that exceeds the duration. As such, we would need a good way to show the actual duration. My thought is we could prepend a bar that shows the actual duration of the event. See the first and second attachments.

I already made changes in bug 1713130 that will make this not too difficult to implement. But I'll wait until the event boxes are converted to html in bug 1738689 because the structure will be cleaner then.

Attachment #9256177 - Attachment description: Screenshot of the current layout. The name is cropped and the task with no-duration is unreadable. → Screenshot of the current rotated layout. The name is cropped and the task with no-duration is unreadable.
See Also: → 1754482

(In reply to Henry Wilkes (they/them) [:henry] from comment #0)

Created attachment 9256174 [details]
Mock-up of an event box with a duration indicator bar on the left hand side.

The current minimum size for calendar-event-box elements in the multiday views is calculated based on getOptimalMinSize (https://searchfox.org/comm-central/rev/3fd89f9e9945ff19b9c10d62438b63d10c7eb01b/calendar/base/content/calendar-multiday-view.js#1866), which is outdated. Moreover, this only provides a min-size in the time-direction. In the other direction the box can grow arbitrarily small.

NOTE: As part of this, we should drop the "hidden" calendar-event-box which is only used for measuring the size https://searchfox.org/comm-central/rev/4ce55228dcb23b3f8d9206080aa46efe4cf0a817/calendar/base/content/calendar-multiday-view.js#112 and drop the :not([hidden]) condition here https://searchfox.org/comm-central/rev/4ce55228dcb23b3f8d9206080aa46efe4cf0a817/calendar/base/themes/common/calendar-views.css#681

Assignee: henry → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: