Closed Bug 1782524 Opened 2 years ago Closed 2 years ago

Reposition Feature Callout if it overlaps parent element by more than 15%

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
106 Branch
Iteration:
106.1 - Aug 22 - Sept 2
Tracking Status
firefox106 --- verified

People

(Reporter: mviar, Assigned: mviar)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In bug 1779423, the Feature Callout screens are configured to point to a parent element from the top, bottom, left, or right. The Feature Callout's basic positioning ensures it doesn't go offscreen. If the configured arrow position puts the callout in a position where it would go offscreen, it moves over to overlap the parent element. If the overlap is more than 15%, then the callout should move to another position. For example, if it was configured to point from the bottom but there's not enough room on top of the parent element for the callout, it should be positioned to point from the bottom. If there's not room there, then it should point from the left or right.

Part of this bug includes reexaming the default "margin" value of 15px used in FeatureCallout.mjs. Per figma the max overlap should be 15% of the parent. After chatting with design, we'll try just using a fixed 15% if that looks reasonable.

Summary: Reposition Feature Callout if overlaps parent element by more than 15% → Reposition Feature Callout if element overlaps parent element by more than 15%
Summary: Reposition Feature Callout if element overlaps parent element by more than 15% → Reposition Feature Callout if it overlaps parent element by more than 15%
Iteration: --- → 105.1 - July 25 - Aug 5
Priority: -- → P1
Iteration: 105.1 - July 25 - Aug 5 → 105.2 - Aug 8 - Aug 19
Assignee: nobody → mviar
Attachment #9289879 - Attachment description: WIP: Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15% → Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15%
Attachment #9289879 - Attachment description: Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15% → WIP: Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15%
Attachment #9289879 - Attachment description: WIP: Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15% → Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15%
Blocks: 1784343
Pushed by mviar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cbf8bf85c77
Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak

@Cosmin, thanks for flagging this and sorry it wasn't caught on try. There was an issue with not resetting the window size after changing it for a test. I've addressed it in the patch and will attempt to reland.

Try push with update: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4cbc04ec707ab3157455af1817f9f77c3633dab2

Flags: needinfo?(mviar)
Pushed by mviar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d022fd2c075
Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak

(In reply to Meg Viar from comment #4)

@Cosmin, thanks for flagging this and sorry it wasn't caught on try. There was an issue with not resetting the window size after changing it for a test. I've addressed it in the patch and will attempt to reland.

Try push with update: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4cbc04ec707ab3157455af1817f9f77c3633dab2

Unfortunately browser_feature_callout and browser_notification_dot did not run on this try push and we have to back it out again. browser_notification_dot is passing after the latest land but browser_feature_callout.js is permafailing with

TEST-UNEXPECTED-FAIL | browser/components/firefoxview/tests/browser/browser_feature_callout.js | On third screen at a narrower window width, the callout is positioned below the parent element

Looks like these tests only run on backstop pushes (where we run all the tests) and they cannot be triggered manually on try or on other pushes on autoland. Failures in TH on autoland, only linux seems to be affected.

Backed out for causing bc failures on browser_feature_callout.js

Backout link

Push with failures

Failure log

Flags: needinfo?(mviar)

Thanks for your patience as I sort this out. Looks like I'd left some other tests commented out, too.

Unfortunately I don't have a linux machine to test on. I've updated the test case based on a hunch - I'll give it one more go with fingers crossed that fixes it on linux.

Flags: needinfo?(mviar)
Pushed by mviar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/50e2770d7b30
Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak
Backout by mlaza@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/b1f99e866232
Backed out changeset 1d022fd2c075 for causing bc failures on browser_feature_callout.js CLOSED TREE
Backout by mlaza@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8a38c7cbf464
Backed out changeset 50e2770d7b30,1d022fd2c075 for causing bc failures on browser_feature_callout.js CLOSED TREE

Backed out changeset 50e2770d7b30,1d022fd2c075 (Bug 1782524) for causing bc failures on browser_feature_callout.js.
Backout link
Push with failures <--> bc1
Failure Log

Flags: needinfo?(mviar)
Backout by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12486eec49e2
Backed out changeset 50e2770d7b30 for causing failures on browser_feature_callout.js.
Iteration: 105.2 - Aug 8 - Aug 19 → 106.1 - Aug 22 - Sept 2

Thanks, I'll work on debugging the linux failures and plan to land this in 106 nightly.

Flags: needinfo?(mviar)
Pushed by mviar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c02fdd36330b
Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak
See Also: → 1786962
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Blocks: 1787196

I‘ve verified this enhancement using the latest Firefox Nightly 106.0a1 (Build ID: 20220824213405) on Windows 10 x64, macOS 12.5.1, and Linux Mint 20.2 x64.

  • After following the steps from here, I can confirm that:
    • the first screen is displayed below the element with the title "Switch seamlessly between devices";
    • the second screen appears above the recently closed tabs element after clicking the “Next” button from the 1st screen, and it remains in its position when resizing the browser until the Colorways section is displayed above the “Recently closed tabs” section;
    • on a narrow screen, the 3rd screen is displayed above/below the horizontal colorways element, and on wider screens, it is displayed to the left part of the horizontal colorways element.
Status: RESOLVED → VERIFIED
No longer blocks: 1784343
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: