Closed Bug 1403550 Opened 8 years ago Closed 8 years ago

Library button is out of position when maximizing window during animation

Categories

(Firefox :: Theme, defect, P1)

57 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 58
Tracking Status
firefox56 --- unaffected
firefox57 + verified
firefox58 --- verified

People

(Reporter: Eddwardiq, Assigned: jaws)

References

Details

(Whiteboard: [reserve-photon-animation])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20170926220106 Steps to reproduce: 1. Open Firefox in the windowed mode 2. Make sure you have a Library button on the toolbar 3. Open some webpage and hit "Star" button 4. Click Done and right after that maximize window 5. See that Library button will stay in its position (in this case in URL bar) until animation is finished. Severity of this bug depends on the point of view. In reality it is probably edge case, but if it is fixable then should be targetting Firefox 57. I'm attaching also a screenshot when Library button is showed during animation right after I maximized window. If users will hit this bug, it will definitely not look very nice.
Blocks: 1352063
Has STR: --- → yes
Component: Untriaged → Theme
Whiteboard: [photon-animation][triage]
[Tracking Requested - why for this release]: noticeable visual glitch while resizing the window after a bookmark or pocket of a page. To fix this we could probably do something onresize of the window.
Assignee: nobody → jaws
Blocks: 1384953
No longer blocks: 1352063
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [photon-animation][triage] → [reserve-photon-animation]
Flags: qe-verify?
Priority: P2 → P1
Comment on attachment 8912784 [details] Bug 1403550 - Update the X offset of the library button when the window is resized. https://reviewboard.mozilla.org/r/184100/#review189410 ::: browser/base/content/browser-places.js:1337 (Diff revision 1) > } > }, > + > + _windowResizeRunning: false, > + _onWindowResize(aEvent) { > + if (LibraryUI._windowResizeRunning) { Don't we expect multiple resize events? If we ignore all but the first, is there a risk we'll still end up with the animation playing at the wrong position? I've not seen this in practice, so perhaps its no a concern. ::: browser/base/content/browser-places.js:1344 (Diff revision 1) > + } > + LibraryUI._windowResizeRunning = true; > + > + requestAnimationFrame(() => { > + let libraryButton = document.getElementById("library-button"); > + if (!libraryButton || Nit: a comment here explaining what these conditions mean would be good - why can we early return here?
Attachment #8912784 - Flags: review?(sfoster) → review+
Comment on attachment 8912784 [details] Bug 1403550 - Update the X offset of the library button when the window is resized. https://reviewboard.mozilla.org/r/184100/#review189410 Looks good in general, r+ with nits.
Comment on attachment 8912784 [details] Bug 1403550 - Update the X offset of the library button when the window is resized. https://reviewboard.mozilla.org/r/184100/#review189410 > Don't we expect multiple resize events? If we ignore all but the first, is there a risk we'll still end up with the animation playing at the wrong position? > > I've not seen this in practice, so perhaps its no a concern. Yes, in fact we receive *many* resize events. So this code uses requestAnimationFrame to coalesce the resize events. If multiple resize events come in before a rAF call, we will only act on it once. After rAF has finished, then we will reopen the ability to update the position for future resize events.
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d6a7f900b908 Update the X offset of the library button when the window is resized. r=sfoster
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Thanks for a quick fix Jared. Looks good. I can no longer reproduce the issue using latest m-c build.
Hi Jared, could you please nominate a patch for uplift to Beta57? Thanks
Flags: needinfo?(jaws)
Comment on attachment 8912784 [details] Bug 1403550 - Update the X offset of the library button when the window is resized. Approval Request Comment [Feature/Bug causing the regression]: bug 1384953 [User impact if declined]: resizing the window after making a bookmark or pocketing can cause the animation to get out of place [Is this code covered by automated tests?]: no [Has the fix been verified in Nightly?]: yes [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: no [Why is the change risky/not risky?]: updates our manual positioning code during resize, easy to disable if needed and only affects this one button. [String changes made/needed]: none
Flags: needinfo?(jaws)
Attachment #8912784 - Flags: approval-mozilla-beta?
Comment on attachment 8912784 [details] Bug 1403550 - Update the X offset of the library button when the window is resized. Polish photon, taking it. Should be in 57b5
Attachment #8912784 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify? → qe-verify+
I was able to reproduce issue in Firefox 57.0b4 and Nightly build (20170926100259). Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 (20171002181526) The issue is not reproducible with Firefox 57.0b5 on Windows 10 x64, Ubuntu 17.04 x64 and Mac OS X 10.12. The issue is not reproducible with Latest Nightly build (20171003100226) on Windows 10 x64, Ubuntu 17.04 x64 and Mac OS X 10.12.
Status: RESOLVED → VERIFIED
See Also: → 1480072
See Also: → 1609398
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: