Closed Bug 293192 Opened 19 years ago Closed 18 years ago

need better mechanism for switching view-mode in tbird

Categories

(Calendar :: Lightning Only, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Lightning 0.1

People

(Reporter: shaver, Assigned: jminta)

References

Details

Attachments

(1 file)

We need to do things like:

- disable a handful of mail-related menu items (view->{headers,sort by,etc.})

- figure out the toolbar (do we need a second one to swap in?)

- make going back to "mail mode" restore the proper folder/server view

Maybe we want to make clicking on the minimonth do that switch to calendar, and
make sure that the folder pane always moves us back to mail.
I've noticed that after switching from Classical View to another view, switching
back does not enabled Classical View. I'm using
http://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/contrib/lightning-win32-20050601.xpi
with Thunderbird version 1.0+ (20050601)
Do you see anything in the JS console?  Does it behave differently if you don't
have Lightning installed?
Without Lightning Thunderbird does not behave this way.
After doing some more research, it seems this bug does not occur only with
Classic View but also with other views, but not always...
The JS console gives 2 error messages when switching once between Classical and
Wide:

Error: gDBView has no properties
Source File: chrome://messenger/content/msgMail3PaneWindow.js
Line: 1574

and
Error: gDBView has no properties
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 192

When switching several times between all views, I get additional errors:

Error: [Exception... "Component returned failure code: 0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame ::
file:///C:/Documents%20and%20Settings/Dexter/Application%20Data/Thunderbird/Profiles/t6xq2qbv.Default%20User/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js
:: anonymous :: line 142"  data: no]
Source File:
file:///C:/Documents%20and%20Settings/Dexter/Application%20Data/Thunderbird/Profiles/t6xq2qbv.Default%20User/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js
Line: 142

Error: [Exception... "Invalid ClassID or ContractID"  nsresult: "0x80570017
(NS_ERROR_XPC_BAD_CID)"  location: "JS frame ::
file:///C:/Documents%20and%20Settings/Dexter/Application%20Data/Thunderbird/Profiles/t6xq2qbv.Default%20User/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calItemModule.js
:: initBaseComponent :: line 63"  data: no]
Source File:
file:///C:/Documents%20and%20Settings/Dexter/Application%20Data/Thunderbird/Profiles/t6xq2qbv.Default%20User/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calItemModule.js
Line: 63

Error: [Exception... "Component returned failure code: 0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame ::
chrome://lightning/content/lightning-utils.js :: ltnGetService :: line 11" 
data: no]
Source File: chrome://lightning/content/lightning-utils.js
Line: 11

Error: redeclaration of const imgICache
Source File: chrome://communicator/content/contentAreaUtils.js
Line: 230

Error: redeclaration of const kMailToLength
Source File: chrome://communicator/content/nsContextMenu.js
Line: 13

Error: uncaught exception: [Exception... "Invalid ClassID or ContractID" 
nsresult: "0x80570017 (NS_ERROR_XPC_BAD_CID)"  location: "JS frame ::
chrome://lightning/content/lightning-utils.js :: <TOP_LEVEL> :: line 24"  data: no]

Error: uncaught exception: [Exception... "Invalid ClassID or ContractID" 
nsresult: "0x80570017 (NS_ERROR_XPC_BAD_CID)"  location: "JS frame ::
chrome://calendar/content/calendarUtils.js :: <TOP_LEVEL> :: line 92"  data: no]

Maybe I should file a new bug for this?
This occurs with a fresh Thunderbird profile and installation
Ugh, yes, you absolutely should; this has nothing to do with the stuff
summarized in the Description.  (I wish I'd noticed what bug I was in before I
prolonged the conversation. =/)
Priority: -- → P3
Target Milestone: --- → Lightning 0.8
*** Bug 316792 has been marked as a duplicate of this bug. ***
Here's a possible solution (a toggle):

+-----------------+---------------------------------------------------
| Mail Folders  \/|    <--- Click (anywhere) here, to get...
| +-----------------+
| | Mail Folders    |  <--- dropdown to select/toggle mail & calendar
| | Calendar        |
| +-----------------+
|  [] Templates   |
|  [] Sent        |
|  ...            |
+-----------------+---------------------------------------------------

Although that might be too "hidden" for normal users. Better might be a "vertically sliding pane":

+-----------------+---------------------------------------------------
| Mail            |  <--- Click to open Mail (and collapse Calendar)
|-----------------|
| Account 1       |
|  [] Inbox       |
|  [] Templates   |
|  [] Sent        |
| Local Folders   |
|  ...            |
|-----------------|
| Calendar        |  <--- Click to open Calendar (and collapse mail)
+-----------------+---------------------------------------------------
Opening Calendar would result in this:

+-----------------+---------------------------------------------------
| Mail            |  <--- Click to open Mail (and collapse Calendar)
|-----------------|
| Calendar        |
|-----------------|
|  M T W T F S S  |
|  1 2 3 4 5 6 7  |
|  8 9 1011121314 |
|  ...            |
|-----------------|
| ToDo            |
| [x] Get more sle|
+-----------------+---------------------------------------------------
Attached patch remove folderTree selection — — Splinter Review
This ended up being a lot harder than I thought.  Thunderbird's FolderPaneSelectionChange function includes a ton of checks with internal global variables to determine whether or not to actually redraw the message-list.  Removing the selection, and the associated variables, seemed to me to be the best way to force this redraw to happen.

The main problem with the seemingly simpler 'onclick' handler approach it figuring out whether or not TB is going to handle the click on its own or not.  Rather than trying to keep pace with changes in thunderbird code, the above approach simply ensures that TB will always respond to the click.
Assignee: shaver → jminta
Status: NEW → ASSIGNED
Attachment #205450 - Flags: first-review?(dmose)
OK, I think is bug is really a mish-mash of a whole bunch of issues:

a) what sort of toolbar UI do we want?

b) need to disable/enabled mail-related items when switching modes

c) in calendar mode, if you click on the already-selected mail folder, nothing happens (we should switch back to mail mode)

d) in calendar mode, if you click on an empty area of the folder pane, nothing happens (we should switch back to the selected folder in mail mode)

e) do we need additional UI to switch between calendar and mail modes?

I think we need 5 separate bugs.  I propose this bug be used to track c), since we've already got a patch here that addresses it. Also, I think c) is probably the only Lightning 0.1 blocker out of those five.
OK, I talked this over with Joey, and we're going to go with separate bugs.  If anyone is interested in doing the work to spin out those separate bugs, that'd rock.
Comment on attachment 205450 [details] [diff] [review]
remove folderTree selection

r=dmose.  I think this is good enough for 0.1.  For the longer term, I'd like to either keep this bug open or open a new one so that this eventually gets fixed in a way that doesn't involved unnecessarily reloading the folder.
Attachment #205450 - Flags: first-review?(dmose) → first-review+
Patch checked in.  Removing the 0.1 block, but I'll leave this bug open until someone has the time to get the separate bugs filed.
No longer blocks: lightning-0.1
QA Contact: shaver → lightning
(In reply to comment #10)
> a) what sort of toolbar UI do we want?
Bug 327780
> 
> b) need to disable/enabled mail-related items when switching modes
Bug 327737
> 
> c) in calendar mode, if you click on the already-selected mail folder, nothing
> happens (we should switch back to mail mode)
Fixed by the patch here already.
> 
> d) in calendar mode, if you click on an empty area of the folder pane, nothing
> happens (we should switch back to the selected folder in mail mode)
Bug 327781
> 
> e) do we need additional UI to switch between calendar and mail modes?
Bug 327783

Closing bug as a result of finally completing these additional filings.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: