Closed Bug 386497 Opened 13 years ago Closed 13 years ago

Mode Toolbar: Mail Toolbar reappears when switching back and forth when it is supposed to be hidden

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: cedric.corazza, Unassigned)

References

Details

Attachments

(2 files, 2 obsolete files)

To gain more space on my desktop, I moved all the Mail Toolbar icons to the Menu Toolbar and hid the Mail Toolbar.
When switching to the Calendar View then switching back to the mail view using the Mode Toolbar buttons, the Mail Toolbar reappears.
I tested that on a fresh new profile.

Steps to reproduce:
1- Hide the Mail Toolbar
2- Switch to the Agenda View clicking the Agenda Button in the Mode Toolbar
3- Switch back to the Mail View clicking on the Mail Button in the Mode Toolbar

Results:
The Mail Toolbar is displayed (though the checkbox in Display > Toolbars > is not checked)

I don't think it's really important but I'm running Thunderbird 2.0.0.4 fr with the lastest en-US Lightning xpi
Confirmed with lightning 0.7pre 2007063017 and thunderbird 2.0.0.4
OS: Linux → All
Confirmed with lightning 0.7pre 20070710 and thunderbird 2.0.0.4
Flags: wanted-calendar0.8+
Please only set wanted0.8?.
Wanted0.8+ is reserved for release drivers.
Flags: wanted-calendar0.8+ → wanted-calendar0.8?
We want this for 0.8
Flags: wanted-calendar0.8? → wanted-calendar0.8+
one line patch to check if mailbar2 view is checked before removing collapse.
Attachment #289754 - Flags: review?
argh, sorry for the line endings in the attachment - should be evident though.
Comment on attachment 289754 [details] [diff] [review]
check mailtoolbar checked status before removing collapse

(In reply to comment #5)
> Created an attachment (id=289754) [details]
> check mailtoolbar checked status before removing collapse
> 
> one line patch to check if mailbar2 view is checked before removing collapse.
> 

Your patch has some problems, probably an encoding issue. We can't check in such a patch, so please attach a valid one. You should also ask an appropriate reviewer (see http://wiki.mozilla.org/Calendar:Module_Ownership) for review. For your patch this should be Michael Buettner.

One style nit: You should use curly brackets also for one-line if statements.
Attached file updated patch (obsolete) —
correct encoding, style nit addressed.
Attachment #289754 - Attachment is obsolete: true
Attachment #289761 - Flags: review?(michael.buettner)
Attachment #289754 - Flags: review?
Attached patch updated patchSplinter Review
one more time..
Attachment #289761 - Attachment is obsolete: true
Attachment #289763 - Flags: review?(michael.buettner)
Attachment #289761 - Flags: review?(michael.buettner)
To my mind this patch only goes the first step on the way to go...

We should also provide a way to hide the calendar-mode toolbar and/or respect the setting for mail toolbar also in calendar mode.

I collected some experiences some weeks ago, but always found some strange behaviours when switching the toolbars on and off in different modes.

Maybe you have more luck with this, or we should provide an own switch for calendar toolbar in views menu and always disable the switch for the non-visable toolbar.
you are likely right that calendar toolbar could be more flexible.  but that is a new enhancement - and should be a new bug/rfe.

this patch is only meant to fix the obviously broken behavior of not respecting the mail toolbar view preference when switching back.
Comment on attachment 289763 [details] [diff] [review]
updated patch

>+   if(document.getElementById("menu_showMessengerToolbar").getAttribute("checked") == true) {
>+      mailToolbar.removeAttribute("collapsed");
>+   }
Linking UI elements directly is not a robust solution and is likely to break as soon as either part gets changed. That's the reason why it's better to use command elements as an intermediate layer to avoid such tight coupling.

Furthermore, bug 392584 already has patch that already uses the suggested mechanism, passed review and will land shortly. We most probably want to mark this bug as fixed by the check-in from bug 392584.
Attachment #289763 - Flags: review?(michael.buettner) → review-
Attached patch patchSplinter Review
This patch would take care of the problem in the newest version. Please decide if you want to use this one or solve the problem by using an observer.
Hi
Another problem, not sure it comes from Lightning, but similar to this one. Shall I open a new bug ?

So here it goes:
- install another extension like Tag Toolbar, that add a new toolbar to TB
- display the Tag toolbar

- go to the Task View
- go to the Agenda View
- go back to Mail View
- NOK: the Tag toolbar has disappeared

- Display again the Tag toolbar 

- go to the Agenda View
- go back to Mail View
- OK: the Tag toolbar is still there

- go to the Task View
- go back to Mail View
- OK: the Tag toolbar is still there

Olivier
Hardware: PC → All
(In reply to comment #12)
Bug 392584 has been resolved fixed one month ago. Can this bug be resolved too or are there still open issues?
Apart from the fact, that the Task mode does not change anything in UI (no toolbar, no title), the issue works for me with Mail/Calendar mode.
Not going to happen for 0.8.
Flags: wanted-calendar0.8+ → wanted-calendar0.8-
Since every contained patch is already included in the (checked-in) patches for bug #392584 and nobody responded to comment #15, setting this to WFM.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → VERIFIED
Flags: wanted-calendar0.8-
You need to log in before you can comment on or make changes to this bug.