Create Feature Callout fallback anchor
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox117 | --- | fixed |
People
(Reporter: jprickett, Assigned: aminomancer)
References
(Blocks 1 open bug)
Details
(Whiteboard: [omc])
Attachments
(1 file, 1 obsolete file)
To prevent issues in cases where the feature callout is anchored to an element that may not exist, we should allow for the use of a fallback anchor, and perhaps a fallback absolute position. This should come in the form of a parameter in the message such as fallback_parent_selector, or something similar. The feature callout should first check to see if it's initial parent selector exists, and if it does not, it should revert to using the fallback anchor defined in message. If neither element exists, the feature callout should not be displayed.
| Reporter | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Good idea about fallback position. Maybe we can do something like this
interface fallback_anchor {
parent_selector?: string,
arrow_position: string,
hide_arrow?: boolean,
callout_position_override?: {
top?: string,
right?: string,
bottom?: string,
left?: string
}
}
content: {
position: "callout",
fallback_anchor: {
parent_selector: "PanelUI-menu-button",
arrow_position: "top-end",
}
}
| Assignee | ||
Comment 2•3 years ago
|
||
Given we don't have any off-train feature callout messages yet, since the system doesn't support them, and all experimentation is just changing pref values, I suppose we could actually change the existing positioning schema. And have both use the same structure. Seems less confusing than having regular anchor properties under content, and having fallback anchor properties under content.fallback_anchor.
interface anchor {
parent_selector?: string,
arrow_position?: string,
hide_arrow?: boolean,
callout_position_override?: {
top?: string,
right?: string,
bottom?: string,
left?: string
}
}
content: {
position: "callout",
anchor: {
parent_selector: "some-conditional-urlbar-button",
arrow_position: "top",
},
fallback_anchor: {
hide_arrow: true,
callout_position_override: {
top: "45px",
right: "120px"
}
}
}
| Reporter | ||
Comment 3•3 years ago
|
||
Agreed. That's definitely cleaner and easier to read, makes more sense logically, and will help to prevent writing errors in our messages.
After talking to [:aminomancer], it was suggested that an array of fallback anchors would be an even better improvement instead of simply having only one fallback anchor, ex:
content: {
anchors: [
{
parent_selector?: string,
arrow_position?: string,
hide_arrow?: boolean,
callout_position_override?: object,
},
{ /* fallback 1 */ },
{ /* fallback 2 */ },
{ /* fallback 3 */ },
]
}
| Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 7•3 years ago
|
||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Backed out for causing bc failures in browser_feature_callout_in_chrome.js
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/browser_feature_callout_in_chrome.js | Uncaught exception in test bound triggered_feature_tour_with_custom_pref - undefined - timed out after 50 tries.
Fail 2: TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/browser_feature_callout_in_chrome.js | leaked 1 window(s) until shutdown [url = chrome://browser/content/browser.xhtml]
Log 2: https://treeherder.mozilla.org/logviewer?job_id=423513622&repo=autoland
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•2 years ago
|
Description
•