Refactor code that reverts the Urlbar from PopupNotifications
Categories
(Toolkit Graveyard :: Notifications and Alerts, task)
Tracking
(firefox113 fixed)
| Tracking | Status | |
|---|---|---|
| firefox113 | --- | fixed |
People
(Reporter: jteow, Assigned: jteow)
References
Details
Attachments
(1 file)
As an interim fix and with :gijs' approval, we're going to revert the Urlbar from the context of PopupNotifications so that when a popup is about to show, it can ensure that the icons it needs show up even if search terms persist on a SERP.
However, as a long term solution, we should remove the hard coded reference to the Urlbar and Browser and instead additional dependency injection, specifically to allow consumers the ability to detect when a show event is happen before the popup appears. The issue is that the Urlbar only knows about the event after _showPanel tries to find is the anchor element is null or hidden, which will cause jank since the popup can initially show up in the wrong location.
From a chat with :Gijs
creating some kind of dependency injection with an observer notification or adding an option where the consumer provides a callback (which means you get to update all the consumers so that's not a lot of fun)
(maybe for doing the dep injection, having the consumer provide a function that returns a DOM element to use as anchor would help remove some of the strong coupling and not be too ugly)
(also, we could make the anchor visibility checks use non-flushing APIs to check if the anchor is visible, that'd be nice...)
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Description
•