Closed Bug 1650041 Opened 4 years ago Closed 4 years ago

Multiple address book papercuts

Categories

(MailNews Core :: Address Book, defect)

defect

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
Thunderbird 80.0
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

(Whiteboard: [TM:78.2.0])

Attachments

(7 files)

I have a number of minor address book problems that need fixing, so I'm going to fix them all in one bug.

The second argument is not optional, but we've been getting away with it in most cases because they
don't pass through XPCOM. It is however a bug that would cause problems in some edge cases.

Objects that we get from the observer service are nsISupports. We can't guarantee the properties
we want to use on them are there without QueryInterface. In most cases they are because we're just
passing JS objects around, but that isn't always the case.

Plus I found a bug where the code expects an nsIAbCard but actually gets an nsIAbDirectory.

Depends on D81982

If the list has zero members, the dialog's <richlistbox> has no item to duplicate when making a
new row. In this case do the same thing as if a new mailing list is being created.

If the list is not the current directory when editing is complete, don't refresh the view.

Depends on D81983

This didn't get done when the view was rewritten because the UI always switches to a new list, but
that's about to change. Also, the contacts sidebar doesn't switch to a new list on creation, so
that showed bad information.

This patch comments outs a few lines that are about to change anyway, so that the changed test
works.

Previously, the UI would detect something was new and change to it immediately. With this patch,
that will not happen. Instead, the dialogs for creating new books and lists return the URI of the
new object, and the change happens when the dialog closes.

This patch finally removes the comments "we can optimize this later" added 9 years ago. I guess
now is later.

Depends on D82313

Keywords: leave-open
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3e06df46ec03
Always use second argument when calling nsIAbCard.getProperty. r=pmorris
https://hg.mozilla.org/comm-central/rev/6aa2a15cefb7
In ABView, call QueryInterface on objects passed through the observer service. r=pmorris
https://hg.mozilla.org/comm-central/rev/6ddc057f6870
Fix two nits that occur when editing mailing lists. r=pmorris
https://hg.mozilla.org/comm-central/rev/e4f6df2deede
Retain selection when sorting the address book contacts list. r=pmorris
Target Milestone: --- → Thunderbird 80.0
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/77ae3e1ace65
Add newly created mailing lists to the view r=pmorris
https://hg.mozilla.org/comm-central/rev/6d2f5bb09a29
When adding a new address book or list, only change the UI if the change was made with the UI r=pmorris
https://hg.mozilla.org/comm-central/rev/1dc8a1aba93b
Refactor tests in mail/components/addrbook r=pmorris

I think I'll call this one fixed. There's bound to be more but all the changes I've been working on here have now landed.

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

Removing the "leave-open" keyword before the last push will make this bug automatically closed.

Keywords: leave-open

Comment on attachment 9160876 [details]
Bug 1650041 - Always use second argument when calling nsIAbCard.getProperty. r?pmorris

Approval request for all the patches on this bug. Most of it is covered by new tests, but it should spend a good while on beta to see if anything comes out of the woodwork.

Attachment #9160876 - Flags: approval-comm-esr78?

(In reply to Geoff Lankow (:darktrojan) from comment #12)

Approval request for all the patches on this bug. Most of it is covered by new tests, but it should spend a good while on beta to see if anything comes out of the woodwork.

per above, 80 beta just shipped, so not taking on 78.1.1.
Are you thinking these should be on beta for 3 weeks - thus we'd uplift to 78.2.0?

Flags: needinfo?(geoff)

That's what I had in mind, yes.

Flags: needinfo?(geoff)
Whiteboard: [TM:78.2.0]

Comment on attachment 9161517 [details]
Bug 1650041 - Refactor tests in mail/components/addrbook

[Triage Comment]
Approved for esr78

Attachment #9161517 - Flags: approval-comm-esr78+

Comment on attachment 9161516 [details]
Bug 1650041 - When adding a new address book or list, only change the UI if the change was made with the UI

[Triage Comment]
Approved for esr78

Attachment #9161516 - Flags: approval-comm-esr78+

Comment on attachment 9161515 [details]
Bug 1650041 - Add newly created mailing lists to the view

[Triage Comment]
Approved for esr78

Attachment #9161515 - Flags: approval-comm-esr78+

Comment on attachment 9160878 [details]
Bug 1650041 - Fix two nits that occur when editing mailing lists. r?pmorris

[Triage Comment]
Approved for esr78

Attachment #9160878 - Flags: approval-comm-esr78+

Comment on attachment 9160877 [details]
Bug 1650041 - In ABView, call QueryInterface on objects passed through the observer service. r?pmorris

[Triage Comment]
Approved for esr78

Attachment #9160877 - Flags: approval-comm-esr78+

Comment on attachment 9160876 [details]
Bug 1650041 - Always use second argument when calling nsIAbCard.getProperty. r?pmorris

[Triage Comment]
Approved for esr78

Attachment #9160876 - Flags: approval-comm-esr78? → approval-comm-esr78+

Comment on attachment 9160879 [details]
Bug 1650041 - Retain selection when sorting the address book contacts list. r?pmorris

[Triage Comment]
Approved for esr78

Attachment #9160879 - Flags: approval-comm-esr78+
Regressions: 1660923
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: