Fix wrong implementation of the notification element for public bulk mail notification
Categories
(Thunderbird :: Message Compose Window, defect, P3)
Tracking
(thunderbird_esr78 unaffected, thunderbird90 affected)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr78 | --- | unaffected |
| thunderbird90 | --- | affected |
People
(Reporter: aleca, Assigned: aleca)
References
Details
Attachments
(1 file)
The notification for public bulk emails works pretty well, but the implementation has some small mistakes that should be fixed.
- The message text is added by creating a new
divelement and appending it inside the notification: https://searchfox.org/comm-central/rev/014b72575f40cf1d2e0cc1d997d8e4bebbd118f9/mail/components/compose/content/MsgComposeCommands.js#5145-5151
This is not necessary since notifications allow adding and updating text pretty easily without creating any extra markup. Also, using a div inside a label element is semantically wrong.
- We're also adding an ID to the newly created notification: https://searchfox.org/comm-central/rev/014b72575f40cf1d2e0cc1d997d8e4bebbd118f9/mail/components/compose/content/MsgComposeCommands.js#5194
This is incorrect since the notification can be identified by its unique value "warnPublicRecipientsNotification", with the native method getNotificationWithValue().
This is not a severe bug but it's rather a task to clean up the implementation and use a consistent coding style and native selectors of the MozElement.Notification element.
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
Fixed the bulk notification implementation.
I also updated the tests with the following changes:
- Use more
BrowserTestUtils.waitForCondition()when possible. - Simulate clicks to show Cc field rather than calling the
showAddressRow()directly. - Assert the mailing list amount of detected pills by matching the count in the fluent string. (fixes test failure introduced in bug 1717085)
Comment 3•5 years ago
•
|
||
(In reply to Alessandro Castellani [:aleca] from comment #0)
- The message text is added by creating a new
divelement and appending it inside the notification: https://searchfox.org/comm-central/rev/014b72575f40cf1d2e0cc1d997d8e4bebbd118f9/mail/components/compose/content/MsgComposeCommands.js#5145-5151
This is not necessary since notifications allow adding and updating text pretty easily without creating any extra markup. Also, using adivinside alabelelement is semantically wrong.
Yeah, I had seen that too, but decided to ignore ;-) I wasn't entirely sure if perhaps there was some sort of layout reason for the clumsy implementation.
Nice cleanup on top of my bug 1717085, this is in much better shape now.
Thanks for fixing the test failure.
| Assignee | ||
Comment 4•5 years ago
|
||
The tests should be good now: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=15bc25ac2b94a51d2f8a7c22759628040495da02
| Assignee | ||
Updated•5 years ago
|
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/f561cef02397
Fix wrong implementation of the notification element for public bulk mail notification. r=mkmelin
Description
•