Closed Bug 428496 Opened 18 years ago Closed 18 years ago

Editing event or dismissing alarm collapses Today/Tomorrow/Soon section in Agenda

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: berend.cornelius09)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 Build Identifier: Lightning 0.8 build 2008030520 When I dismiss an alarm (from a recurring event), the right hand side panel "Events and Tasks", which had previously had Today/Tomorrow and Soon all expanded, shrinks back so that the events under each of these headings are no longer displayed (the + next to each heading is shown again). If I go back to the panel and I click the + next to each heading, the list of events expands properly. Reproducible: Always Steps to Reproduce: 1. Set an event with an alarm 2. Expand the headings for Today / Tomorrow / Soon in the right hand side panel so that events under each heading is showing and the "-"(minus sign) is displayed next to each heading 3. Dismiss the event alarm from the Alarm popup dialogue. Actual Results: Look at the right hand side panel and notice that the headings have shrunk back so that events under each heading are not displayed. The small +/- button next to each heading changes back to "+" Expected Results: The state of the expanded items in the right hand side panel should be unaffected by dismissing an alarm. Thunderbird Version: version 2.0.0.12 (20080213)
This also happens when I delete (in Calendar Mode) the last event from one of the sections (today/tomorrow/soon).
Confirmed. Every change to an event (e.g. changing title or dismissing alarm) collapses the Agenda Today/Tomorrow/Soon section the event is shown in.
Component: Alarms → Lightning Only
OS: Windows XP → All
QA Contact: alarms → lightning
Hardware: PC → All
Summary: Dismiss Alarms Shrinks Today/Tomorrow/Soon → Editing event or dismissing alarm collapses Today/Tomorrow/Soon section in Agenda
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted-calendar0.9?
Flags: wanted-calendar0.9? → wanted-calendar0.9-
Assignee: nobody → Berend.Cornelius
Attached patch patch v. #1 (obsolete) — — Splinter Review
Each item-modification is always a removal and a adding of an item to the listbox. This means that if an item is the only item within the period the period is closed after the deletion and won't reopen again. That's the root cause for this issue. So the first solution I had in mind was just to switch the order and add the new item first and remove the old one afterwards. But this turned out to be not so easy because it would mean to have temporarily two items with the same hashid and so far the agenda-listbox only indentifies the items by this.
Attachment #322959 - Flags: review?(philipp)
Comment on attachment 322959 [details] [diff] [review] patch v. #1 Looks good, r=philipp
Attachment #322959 - Flags: review?(philipp) → review+
patch checked in on trunk and MOZILLA_1_8_BRANCH ->FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.9
The patch doesn't work if you edit an event and modify only the calendar (Lg 09pre 2008053019 and Lg 09pre 2008060118). Another failure is reported by Pete Riley in Bug 436781 comment 4: the T/T/S sections collapse if you delete all of the events from a section. If someone could confirm and reopen the bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch patch v. #2 — — Splinter Review
Stupid me! In my first patch I removed a line of source code that did not make sense to me: In this fragment the checked attribute of the agenda-checkboxes was set at their hidden origins too. Now I know this was to ensure persistency. I resolved this. But this patch also considers one issue that went out of my mind: In bug 436781 comment #4 Pete made the following complaint: ... "The today/tomorrow/soon sections also still have the problem of closing even without restarting Thunderbird. This happens when I delete all of the events from a section." What has been done so far is that after each event deletion it is checked if this was the last event in a period ("today", "tomorrow" and "soon") and if yes the according checkbox was closed automatically which lead also the error that this issue was originally about. My first patch v. #1 to resolve this was consequently relatively complicated because it kept this behaviour. But Pete is actually right: There is no need to close the period when there are no events left - unless the user decides to do so by himself. The patch attached changes this behaviour. If someone thinks a ui review is necessary I can also add a ui-request.
Attachment #322959 - Attachment is obsolete: true
Attachment #323689 - Flags: review?(philipp)
Comment on attachment 323689 [details] [diff] [review] patch v. #2 > function onCheckboxChange(event) { > var periodCheckbox = event.target; > var lopen = (periodCheckbox.getAttribute("checked") == "true"); > var listItem = getParentNodeOrThis(periodCheckbox, "agenda-checkbox-richlist-item"); > var period = listItem.getItem(); > period.open= lopen; >+ // as the agenda-checkboxes are only transient we have to set the "checked" >+ // attribute at their hidden origins to make that attribute persistent. >+ lopen); lopen is boolean, but setAttribute should set a string. You probably want document.getElementById(listItem.id + "-hidden") .setAttribute("checked", periodCheckbox.getAttribute("checked")); r=philipp. I don't think a further ui-r is necessary.
Attachment #323689 - Flags: review?(philipp) → review+
modified patch checked in on trunk and MOZILLA_1_8_BRANCH ->FIXED
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Many thanks, Berend. Now when I delete all events from the today/tomorrow/soon sections, the sections don't collapse. This is nice. (WinXP, TB 2.0.0.14, latest Lightning nightly)
Verified per comment #12
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: