[meta] Allow embedding feature callouts in system page content
Categories
(Firefox :: Messaging System, task, P1)
Tracking
()
People
(Reporter: aminomancer, Unassigned)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
(Keywords: meta, Whiteboard: [omc])
Attachments
(1 file, 1 obsolete file)
84 bytes,
text/x-google-doc
|
Details |
We want to be able to embed feature callouts directly in the PDF.js viewer and the new tab/home page. It should be possible to do this by creating a new JSActor pair that imports and constructs a FeatureCallout. The module itself may need to be updated to work correctly in a content process.
The most important detail is making sure the callout is properly anchored to its anchor node. Right now, we do that in the chrome by wrapping the callout in a <panel>
element, which is a XULPopupElement. That automatically gives it a lower level behavior ensuring it follows its anchor around and disappears when its anchor disappears. But the existing in-content FeatureCallout code (inherited from the original use of FeatureCallout in Firefox View) will not be able to follow its anchor around. It has an absolute position relative to the page, and it only updates its position on scroll and resize events. This won't work for upcoming purposes in about:newtab and PDF.js.
I propose that we rethink the in-content approach from the ground up. Webpages with similar anchored popups, dropdowns, etc. often approach this a bit differently: they make the callout a child of the anchor node, and they set CSS rules on both with the callout's position relative to the anchor (parent) rather than relative to the page:
anchor {
overflow: visible;
position: relative;
}
callout {
position: absolute;
bottom: ...
}
That way, if the anchor moves on layout (say its left sibling was hidden so it got moved to the left), the callout will follow along with it automatically.
Reporter | ||
Updated•8 months ago
|
Updated•8 months ago
|
Reporter | ||
Updated•8 months ago
|
Updated•8 months ago
|
Reporter | ||
Comment 1•6 months ago
|
||
Comment 2•6 months ago
|
||
Comment on attachment 9400191 [details]
WIP: Bug 1885593 - Support triggered feature callouts in content. r=jprickett
Revision D209512 was moved to bug 1885595. Setting attachment 9400191 [details] to obsolete.
Comment 3•6 months ago
|
||
Description
•