Defective implementation of the MozElements.NotificationBox
Categories
(Thunderbird :: Mail Window Front End, defect, P2)
Tracking
(thunderbird_esr68 wontfix, thunderbird_esr78+ wontfix, thunderbird83- wontfix)
People
(Reporter: aleca, Assigned: aleca)
References
Details
(Keywords: regression)
Attachments
(1 file, 4 obsolete files)
49.01 KB,
patch
|
aleca
:
review+
|
Details | Diff | Splinter Review |
While working on another bug, i noticed a defective behaviour when triggering multiple notifications in the mail front-end.
The notifications don't stack on top of each other and are not ordered by priority, instead they are added one after another as the markup generates a new legacy-stack
for every notification.
This is due to a mistake during the first de-xbl conversion, and that's totally my fault as I did that.
https://searchfox.org/comm-central/rev/aa6ec7ca8813e82b76168e76f6cd706ed226bdcd/mail/base/content/mail3PaneWindowCommands.js#32
Example:
get notificationbox() {
delete this.notificationbox;
let newNotificationBox = new MozElements.NotificationBox(element => {
element.setAttribute("flex", "1");
element.setAttribute("notificationside", "bottom");
document.getElementById("messenger-notification-footer").append(element);
});
return (this.notificationbox = newNotificationBox);
}
First there's a risk of too much recursion since we're using the notificationbox
getter and then deleting inside itself before generating a new NotificationBox element.
Also, since we're generating a new element at every call, we will never be able to properly stack notifications as we create a new container every time.
I think this was never reported, or even noticed, since I suspect we never show more than 1 notification at a time, therefore extremely rare to reproduce.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Some much needed clean up and fixes.
Here's a try run to see how many things I broke: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=cda74cf2abe060d18dcf0bc68878d0264936b42d
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Unfortunate things are not more centralized, but it is what it is.
Indeed.
Do you think would be worth exploring the possibility of centralizing these notifications in a follow up bug?
Maybe a CE?
Comment 4•5 years ago
|
||
Not sure it's very doable.
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Any update from Philipp?
If he's super busy, is there someone else that can review Calendar code?
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Comment 8•5 years ago
|
||
We could do this for trunk only also. It's a problem, but not a huge one (unnoticed for over a year on release).
Assignee | ||
Comment 9•5 years ago
•
|
||
Thanks for the detailed review.
I updated all the notification variable to match what they actually area and what type of notification container they interact with. In this way, we won't have a bunch of random gNotification
all around TB that we can't distinguish.
I also found other small CSS problems, and some wrong parameters we were passing when appending the notification (eg. "null" as a string instead of null).
If we decide to uplift this for 78, I prefer to create a patch variation with the shim variables, and keep trunk clean.
Try run to see how many things I broke: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=e8e45dd12e999ba636459c8caa540a796dab0147
Assignee | ||
Comment 10•5 years ago
|
||
Another try-run after the backout fixing all those broken mochitests: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=7115b04fa52709cc37ed7aef0b1ffe6310650238
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
Patch updated and new try-run launched since the previous one picked the outdated build: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=b922a139914614fe455f44ed2d117455445c3659
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
•
|
||
Patch updated to fix those bct3
failures.
Another try-run launched, which seems to be stuck: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=dc4284e1209cc1cd1b2a7967d9917cb65b4cfff1
I'll launch another one if this fails for whatever reason.
Ah, it's running, let's see if I broke something else.
Comment 14•5 years ago
|
||
Assignee | ||
Comment 15•5 years ago
|
||
Good catch, I missed those.
Also that Enigmail notifyUser() was using the wrong selector to attach a notification, so I fixed it.
Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7b9df4584eda
Fix defective implementation of the MozElements.NotificationBox. r=mkmelin, r=darktrojan
Comment 17•5 years ago
|
||
Does TB78 need this? If yes, please request 84 beta approval.
Updated•5 years ago
|
Assignee | ||
Comment 18•5 years ago
|
||
What do you think we should do Magnus? Beta ad 78 uplift?
We do risk to break add-ons using notifications in those areas.
Comment 19•5 years ago
|
||
It wasn't ever reported by user AFAIK, so maybe let it just ride the trains and skip uplifts.
Updated•5 years ago
|
Description
•