Open Bug 527254 Opened 15 years ago Updated 2 years ago

[meta] Calendar Command Controller

Categories

(Calendar :: General, defect)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: Fallen, Assigned: Fallen)

References

(Depends on 5 open bugs)

Details

(Keywords: meta, Whiteboard: [not needed beta][no l10n impact])

Attachments

(3 files)

We have a number of issues related to the command controller being global and not tab specific. This means like "doing xxx in mail mode causes yyy to happen in calendar mode too" and the same for other combinations of modes. I'd like to track these to make sure I find all issues. If you find a such bug, please add it here.
Depends on: 521003
I will be providing a patch for this bug soon, I believe my patch will fix all dependent issues.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Flags: blocking-calendar1.0+
Whiteboard: [needed beta][no l10n impact]
Depends on: 546003
I have a much better patch around, but its very large and there are still some rough edges. Given we want to release asap, I think we should take this (very hacked) patch, since it just works (tm). After the beta release I can install the real command handler. I'll take anyone's review!
Attachment #446749 - Flags: review?(mschroeder)
Attachment #446749 - Flags: review?(Mozilla)
Attachment #446749 - Flags: review?(ssitter)
Attachment #446749 - Flags: review?(bv1578)
Attachment #446749 - Flags: review?(dbo.moz)
To get the builds running, I'm going to check this in without review. Nevertheless, please do review this before Monday or Tuesday!
Comment on attachment 446749 [details] [diff] [review] [checked in] Hack Fix - v1 comm central rev b4a32e30011e comm 1.9.2 rev 039906549b1a
Attachment #446749 - Attachment description: Hack Fix - v1 → [checked in] Hack Fix - v1
When you customize the toolbar with the button "Delete", then if you select an event on today pane, the button becomes active and allow to delete the event when in calendar mode but it doesn't when in mail mode. The behavior is the same with the patch applied. Is it a problem related to this issue or it's another one (or is it the right behavior)?
I get a pair of errors that actually happen even without the patch (e.g. nightly 21/5/2010) but I'm not sure whether they are related to the issue of this bug, and whether they have already been reported (maybe for others problems). 1. When Thunderbird runs for the first time after Lightning installation, when selecting an event and deleting it, the following error appears in the console: Error: [Exception... "'[JavaScript Error: "this.tree is null" {file: "chrome://calendar/content/calendar-unifinder.js" line: 537}]' when calling method: [calIObserver::onDeleteItem]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calUtils.js :: notifyFunc :: line 1226" data: yes] STACK: 1: [file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calUtils.js:1229] notifyFunc 2: [file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calUtils.js:1232] calListenerBag_notify 3: [file:///C:/.../modules/calProviderUtils.jsm:497] calObserverBag_notify 4: [file:///C:/.../components/calCompositeCalendar.js:86] anonymous 5: [null:0] null 6: [file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calUtils.js:1226] notifyFunc 7: [file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calUtils.js:1232] calListenerBag_notify 8: [file:///C:/.../modules/calProviderUtils.jsm:497] calObserverBag_notify 9: [file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calStorageCalendar.js:553] cSC_deleteItem 10: [null:0] null Source File: file:///C:/.../modules/calUtils.jsm -> file:///C:/.../calendar-js/calUtils.js Line: 1229 The error doesn't appear when Thunderbird runs for the second time. 2. In month view create two events select menu Edit > Select > All -> both events are selected select menu Edit > Delete an error appears in the console: Error: An error occurred executing the cmd_delete command: TypeError: newStart is null Source File: chrome://global/content/globalOverlay.js Line: 100 and the events remain selected but are not deleted. The error without the patch is a bit different: Error: An error occurred executing the cmd_delete command: [Exception... "'[JavaScript Error: "newStart is null" {file: "chrome://calendar/content/calendar-common-sets.js" line: 336}]' when calling method: [nsIController::doCommand]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 96" data: yes] Source File: chrome://global/content/globalOverlay.js Line: 100
Attachment #446749 - Flags: review?(Mozilla) → review-
Comment on attachment 446749 [details] [diff] [review] [checked in] Hack Fix - v1 One Problem I found with this patch is that the commands are not updated, when a tab is opened or restored: >+ // Unused, but needed functions >+ onTabTitleChanged: function() {}, >+ onTabOpened: function() {}, >+ onTabClosing: function() {}, >+ onTabPersist: function() {}, >+ onTabRestored: function() {}, >+ >+ onTabSwitched: function onTabSwitched(aNewTab, aOldTab) { Two problems and steps to reproduce: FIRST: ctrl+A does not work as expected - especially in task mode: 1. Make sure you have the delete Button in the mail-toolbar 2. make sure today pane is open in task tab 2. close calendar & task tabs 3. open task tab 4. press ctrl+A --> nothing happens 5. click on an empty space in the today pane 6. delete button is inactive 6. press ctrl+A again --> nothing gets selected, but the delete button gets enabled 7. press the delete button --> nothing happens. similar behavior on the calendar tab, but there all visible events get selected when you press ctrl+A on the today-pane SECOND: paste (ctrl+V) does not work on freshly opened tab - clipboard contents are lost 1. copy an event to clipboard 2. close the calendar & task tabs 3. open calendar tab again 4. select an event and deselect it again. 5. press ctrl+V --> event from clipboard gets inserted 6. close calendar tab and open it again 7. press ctrl+V --> nothing happens 8. select an item and deselct it again. 9. press ctrl+V again --> nothing happens, event on clipboard is gone. Generally, the hack is ok with me, but the problem with command activation should be solved. r- from me.
Depends on: 568174
Attachment #446749 - Flags: review?(ssitter)
Attachment #446749 - Flags: review?(mschroeder)
Attachment #446749 - Flags: review?(dbo.moz)
Attachment #446749 - Flags: review?(bv1578)
Depends on: 639447
Depends on: 643686
Given the timeframe until release, we need to postpone this bug. Sorry!
Whiteboard: [needed beta][no l10n impact] → [not needed beta][no l10n impact]
Depends on: 674838
I really need to fix this...somehow. Putting it on the needed-beta list again until its too late to take it for the release ;-)
Whiteboard: [not needed beta][no l10n impact] → [needed beta][no l10n impact]
There we go, 10 days left and I'm kind of on vacation. I wish this bug would just go away! Anyone feel like taking it for next time around?
Whiteboard: [needed beta][no l10n impact] → [not needed beta][no l10n impact]
Depends on: 695363
Depends on: 628249
Attached patch Old patch I found - v1 β€” β€” Splinter Review

I guess I was rewriting the command controllers to be more approachable. I don't think it is worth making changes here unless it involves ripping it out and replacing it with something more likely to still exist in a world without xul.

Attaching patches nevertheless. I have two patches, though no idea which one is more recent or why I had two versions.

Flags: needinfo?(philipp)
Component: Lightning Only → General
Severity: normal → S3

Sean, is this meta bug of value to us today?

Flags: needinfo?(leftmostcat)
Summary: Lightning Command Controller tracker → [meta] Calendar Command Controller

Unless we can confirm that the blocking bugs are no longer valid, we should probably keep this open.

Flags: needinfo?(leftmostcat)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: