Closed Bug 1637133 Opened 11 months ago Closed 11 months ago

Convert the body of the calendar summary dialog into a custom element

Categories

(Calendar :: Dialogs, task)

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 78.0

People

(Reporter: pmorris, Assigned: pmorris)

References

Details

Attachments

(4 files)

This is preparation for bug 1631902. By converting the part of the summary dialog that displays a calendar item's details into a custom element, we can then use that custom element to show multiple items in the ICS import dialog. This should also help with bug 1575195.

Simpler to replace this custom element with a utility function
that converts a calIDateTime into a string to display, which was
the primary functionality of the custom element.

Move the part of the dialog that displays a summary of a calendar
item into a custom element so it can be reused more than once
in a given scope/dialog/ window. This will be soon be used to
show summaries of multiple events in the ICS file import dialog.
Update the code to support multiple event summaries in a given
scope.

Depends on D74796

That last patch is the main one (sorry Geoff that it ended up being so large). Moving the body of the calendar summary dialog into a custom element entailed changing a lot of code that assumed the summary dialog context with a single calendar item. Basically passing arguments into the functions rather than using getElementById, etc. I converted IDs to classes to avoid having duplicate IDs in a single scope when we use this for the ICS import dialog.

The parallel non-summary event/task dialog still uses IDs in most places, but I converted some of them to classes for consistency. I thought about converting more of them, but held off since the patch was already too large.

The context menu for location links just landed, while I was already working on this. It will need to be reworked a bit before this can be used in the ICS calendar dialog, but I haven't done that yet.

Attachment #9147503 - Attachment description: Bug 1637133 - Refactor calendar summary dialog code. r?darktrojan → Bug 1637133 - Refactor calendar summary dialog to use a custom element. r?darktrojan
Attachment #9147503 - Attachment description: Bug 1637133 - Refactor calendar summary dialog to use a custom element. r?darktrojan → Bug 1637133 - Refactor calendar summary dialog to use a custom element. r=darktrojan

This needs a try run then it should be ready to land. I haven't done a try run yet due to the current bustage.

The try run shows at least one test (bct1) that needs fixing before this is ready to land.

Attachment #9147500 - Attachment description: Bug 1637133 - Refactor to remove 'calendar-item-date-input' custom element. r?darktrojan → Bug 1637133 - Refactor to remove 'calendar-item-date-input' custom element. r=darktrojan

Fixed the browser_taskView.js test by adding some conditionals to the first patch. Also rebased the first patch and modified one line to incorporate changes from bug 1634912.
Successful try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=30d2d3f89cc7de83fdb3b8f3936c22f13b452885

Target Milestone: --- → 78

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3c657c39ada5
Refactor to remove 'calendar-item-date-input' custom element. r=darktrojan
https://hg.mozilla.org/comm-central/rev/120372d6f96b
Refactor recurrence functions for summary dialog. r=darktrojan
https://hg.mozilla.org/comm-central/rev/cddacd682d3b
Refactor slightly reminders code in calendar summary dialog. r=darktrojan
https://hg.mozilla.org/comm-central/rev/c0c2cc7c1b7d
Refactor calendar summary dialog to use a custom element. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Regressions: 1647170
You need to log in before you can comment on or make changes to this bug.