Closed Bug 1737569 Opened 3 years ago Closed 3 years ago

multiday selection not cleared when switching between weeks, and selection appears locked

Categories

(Calendar :: Calendar Frontend, defect)

defect

Tracking

(thunderbird_esr91+ fixed, thunderbird94 wontfix)

RESOLVED FIXED
95 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird94 --- wontfix

People

(Reporter: henry-x, Assigned: henry-x)

Details

Attachments

(4 files)

Steps to Reproduce

  1. Open calendar week view.
  2. Create an event (not all day).
  3. Select the event with a mouse click.
  4. Move one week forward using the arrows.
  5. Move one week back.

Result

The event is still selected. Moreover, it cannot be visually unselected.

Expect

The event doesn't need to still be selected, and it should be possible to unselect it.

Origin

When the view is refreshed, the calendar-event-column mEventInfo is emptied https://searchfox.org/comm-central/rev/a2472c026fcf9bc25733330e9fa1e26c0429be3c/calendar/base/content/calendar-multiday-view.js#3402 but the other metadata is not. Specifically mSelectedItemIds is not emptied, which means that it accumulates event ids, and reselects them when they are displayed again https://searchfox.org/comm-central/rev/a2472c026fcf9bc25733330e9fa1e26c0429be3c/calendar/base/content/calendar-multiday-view.js#646

Assignee: nobody → henry
Status: NEW → ASSIGNED

We keep all the event metadata in one object, which is accessed through the event's hashId. This ensures each event has one set of data, which is easier to track.

Also, stopped using properties for some variables that are only used in one method.

Depends on D129491

Target Milestone: --- → 95 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/4f752113a2ed
Drop startMinute and endMinute properties. r=darktrojan
https://hg.mozilla.org/comm-central/rev/b1cd2e09b0e3
Move calendar-event-column event metadata into eventDataMap. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

You broke a test, so something isn't quite right.

Sample test log: https://treeherder.mozilla.org/logviewer?job_id=356232871&repo=comm-central&lineNumber=2647
There's two failures in the log, only the first one is because of this bug.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

There is a small window between an event item being added to the column and it's corresponding element being created. In this window, it is technically possible that selectEvent is called, so we no longer assume the element is created in this method.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/c091d2828691
Allow selecting an element in calendar-event-column before it has been created. r=darktrojan

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Summary: multiday selection not cleared when switching between weeks, and selection becomes locked → multiday selection not cleared when switching between weeks, and selection appears locked

Comment on attachment 9247725 [details]
Bug 1737569 - Drop startMinute and endMinute properties. r=darktrojan

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Calendar event selection can appear locked, and then does not correspond to the actual underlying selection status.
Testing completed (on c-c, etc.): No known tests.
Risk to taking this patch (and alternatives if risky): Medium risk. The patches introduce some refactoring.
NOTE: land with the other patches.

Attachment #9247725 - Flags: approval-comm-beta?

Comment on attachment 9247726 [details]
Bug 1737569 - Move calendar-event-column event metadata into eventDataMap. r=darktrojan

[Approval Request Comment]
See comment 7

Attachment #9247726 - Flags: approval-comm-beta?

Comment on attachment 9248223 [details]
Bug 1737569 - Allow selecting an element in calendar-event-column before it has been created. r=darktrojan

[Approval Request Comment]
See comment 7

Attachment #9248223 - Flags: approval-comm-beta?
Attachment #9247725 - Flags: approval-comm-beta? → approval-comm-esr91?
Attachment #9247726 - Flags: approval-comm-beta? → approval-comm-esr91?
Attachment #9248223 - Flags: approval-comm-beta? → approval-comm-esr91?

Sorry, just realised 94 was already marked as wontfix, and these are already in 95, so I changed the request to esr91.

Comment on attachment 9247725 [details]
Bug 1737569 - Drop startMinute and endMinute properties. r=darktrojan

[Triage Comment]
Approved for esr91

Attachment #9247725 - Flags: approval-comm-esr91? → approval-comm-esr91+

Comment on attachment 9247726 [details]
Bug 1737569 - Move calendar-event-column event metadata into eventDataMap. r=darktrojan

[Triage Comment]
Approved for esr91

Attachment #9247726 - Flags: approval-comm-esr91? → approval-comm-esr91+

Comment on attachment 9248223 [details]
Bug 1737569 - Allow selecting an element in calendar-event-column before it has been created. r=darktrojan

[Triage Comment]
Approved for esr91

Attachment #9248223 - Flags: approval-comm-esr91? → approval-comm-esr91+

Comment on attachment 9248223 [details]
Bug 1737569 - Allow selecting an element in calendar-event-column before it has been created. r=darktrojan

The patches in this bug will need to be reworked for comm-esr91 due to changes in bug 1731209 where calendar-multiday-view.js was merged with calendar-event-column.js.
Please provide a patch and re-request uplift. Thanks.

Attachment #9248223 - Flags: approval-comm-esr91+
Attachment #9247726 - Flags: approval-comm-esr91+
Attachment #9247725 - Flags: approval-comm-esr91+
Flags: needinfo?(henry)

Here's the patches merged together and 'rebased' onto 91. It just required applying the patches to 91, and then applying the rejected hunks to calendar-event-column.js.

Before I request the esr91 approval, given that I didn't have to make any manual changes, does this need a separate review?

Flags: needinfo?(henry) → needinfo?(rob)

No, a second review after a rebase isn't usually necessary go ahead and request uplift.

Flags: needinfo?(rob)

Comment on attachment 9251876 [details] [diff] [review]
bug1737569-esr91.patch

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Calendar event selection can appear locked, and then does not correspond to the actual underlying selection status.
Testing completed (on c-c, etc.): No known tests.
Risk to taking this patch (and alternatives if risky): Medium risk. The patch introduce some refactoring.

Attachment #9251876 - Flags: approval-comm-esr91?

Comment on attachment 9251876 [details] [diff] [review]
bug1737569-esr91.patch

[Triage Comment]
Approved for esr91

Attachment #9251876 - Flags: approval-comm-esr91? → approval-comm-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: