Closed Bug 1831280 Opened 2 years ago Closed 1 year ago

Toggling mail.showCondensedAddresses only updates the mail header but not the thread pane

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 114
defect

Tracking

(thunderbird_esr102 unaffected, thunderbird_esr115? fixed, thunderbird118? fixed)

RESOLVED FIXED
119 Branch
Tracking Status
thunderbird_esr102 --- unaffected
thunderbird_esr115 ? fixed
thunderbird118 ? fixed

People

(Reporter: max.m, Assigned: vineet)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [TM 115.3.0][Supernova3p])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Steps to reproduce:

Toggling mail.showCondensedAddresses only updates the mail header but not the thread pane.

Looks like the code that did that was removed:
https://searchfox.org/comm-esr102/rev/87b2dbcf3e8dea1bc709d322a521db7163709457/mail/base/content/msgMail3PaneWindow.js#414-416

New code here:
https://searchfox.org/comm-central/rev/4c9f90ce0b6b80bd633abb666e8f6d069d888e71/mail/base/content/msgHdrView.js#488-492

Note: The pref is exposed in the UI: Show only display name for people in my address book.

Blocks: sn-msglist
Keywords: regression
Whiteboard: [Supernova3p]
Assignee: nobody → vineet
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #9341203 - Attachment description: WIP: Bug 1831280 - Show Condensed Address Pref Needs to Update Thread Pane. → Bug 1831280 - Show Condensed Address Pref Needs to Update Thread Pane. r=#thunderbird-reviewers

After bug 1827743, the AB listens to "mail.displayname.version" and then creates another event "addrbook-displayname-changed" that leads to a repaint in about3Pane.js. Suggested is that for a change in "mail.showCondensedAddresses" you increase the "mail.displayname.version" and rely on a repaint via "addrbook-displayname-changed".

Why don't you create one listener in about3Pane.js for "mail.displayname.version" which will repaint the tree. When "mail.showCondensedAddresses" changes, you increase "mail.displayname.version" and the observer will take are of the repainting. The "addrbook-displayname-changed" event can then be removed altogether.

These changes to "mail.displayname.version" also take the deviation via "addrbook-displayname-changed".
https://searchfox.org/comm-central/search?q=%22mail.displayname.version%22&path=AddrBookDirectory.jsm&case=false&regexp=false

Maybe you need to make sure that the cache is cleared before the repaint happens. In that case the suggestion from comment #2 doesn't work.

In D182156 the comment in MsgHdrViewObserver.observe() isn't clear. The removal of ReloadMessage(); isn't evident since that repaints the message header pane, not the tree. And that still might need repainting.

Also, please change "it's" to "its" in the last hunk.

Target Milestone: --- → 119 Branch

Typo still present:
// When this prefence has been updated, we need to update the
// mail.displayname.version, which notifies it's preference observer (above).

Pushed by martin@humanoids.be:
https://hg.mozilla.org/comm-central/rev/981b9a04b03d
Show Condensed Address Pref Needs to Update Thread Pane. r=darktrojan

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

Comment on attachment 9341203 [details]
Bug 1831280 - Show Condensed Address Pref Needs to Update Thread Pane. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: Thread pane will have issues updating to preferred display names when global prefer display name preference is updated to true.
Testing completed (on c-c, etc.): Tested locally and on beta
Risk to taking this patch (and alternatives if risky): No risk.

Attachment #9341203 - Flags: approval-comm-esr115?

Comment on attachment 9341203 [details]
Bug 1831280 - Show Condensed Address Pref Needs to Update Thread Pane. r=#thunderbird-reviewers

vineet, this first needs to go on beta. :)

[Triage Comment]
Approved for beta

Attachment #9341203 - Flags: approval-comm-beta+
Whiteboard: [Supernova3p] → [TM 115.3.0][Supernova3p]

Comment on attachment 9341203 [details]
Bug 1831280 - Show Condensed Address Pref Needs to Update Thread Pane. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr115

Attachment #9341203 - Flags: approval-comm-esr115? → approval-comm-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: