Closed Bug 1815686 Opened 1 year ago Closed 1 year ago

The High and Low temperature values from the Weather result are shifted to the right side after bringing Firefox back to its maximized size

Categories

(Firefox :: Address Bar, defect, P3)

Firefox 111
Desktop
All
defect

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox109 --- unaffected
firefox110 --- unaffected
firefox111 --- disabled
firefox112 --- wontfix
firefox113 --- verified

People

(Reporter: cfat, Assigned: adw)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

[Affected versions]:

  • Firefox Nightly 111.0a1 - Build ID: 20230207214329

[Affected Platforms]:

  • Windows 10 x64
  • macOS 12.4
  • Linux Ubuntu 20.04 x64

[Prerequisites]:

  • Have Firefox en-US build installed and open.
  • Have a VPN client connected to a US server (for people located outside the US).
  • Have the following preferences set:
    browser.urlbar.quicksuggest.enabled = true
    browser.urlbar.weather.featureGate = true
    browser.urlbar.weather.zeroPrefix = false
    devtools.chrome.enabled = true

[Steps to reproduce]:

  1. Open the browser from the prerequisites.
  2. Open the Browser Console and paste the following snippet:
    ChromeUtils.importESModule("resource:///modules/QuickSuggest.sys.mjs") .QuickSuggest.remoteSettings._test_setConfig({ weather_keywords: ["weather"], });
  3. Type the “weather” string inside the Address Bar.
  4. Minimize Firefox until the High and Low temperature values from the Weather result are moved to a lower row.
  5. Maximize Firefox and click inside the Address Bar.
  6. Observe the Weather result.

[Expected result]:

  • All the elements from the Weather result are placed correctly.

[Actual result]:

  • The High and Low temperature values are shifted to the right side of the result.
  • The bullet that separates the High and Low temperatures from the forecast description is no longer displayed.

[Notes]:

  • I have trouble with mozregression, thus I’m not able to provide a pushlog at this moment. However, this issue was only visible after implementing Bug 1814795. On a Nightly build that still displays the Weather result via Zero-prefix panel, I am not able to reproduce the issue - tried on Nightly 111.0a1 (2023-02-06).
  • Here is a screen recording of the issue: link.

I suspect there's a relation with bug 1759857, maybe a stale "overflow" attribute?

See Also: → 1759857
Blocks: 1815018
Priority: -- → P3
Attached image Screenshot from video

(In reply to Marco Bonardo [:mak] from comment #1)

I suspect there's a relation with bug 1759857, maybe a stale "overflow" attribute?

That's exactly what's happening: .urlbarView-dynamic-weather-middleNoWrap still has the overflow attribute set. The high/low that are visible are .urlbarView-dynamic-weather-highLowWrap, and the blank space between the forecast summary and high/low is .urlbarView-dynamic-weather-highLow, which has visibility: hidden set on it since its parent middleNoWrap is overflowed.

So this does have the same root cause as bug 1759857.

This bug hits this path in #autoOpen, where it re-uses the current rows as
they exist. Overflow and underflow events aren't fired in that case, so the
overflow attribute isn't updated. The bug does not happen when the else
branch is hit because onQueryResults() clears the rows when the view isn't
open, and after that the rows are rebuilt.

This patch makes us hit the else path in this case by storing the width of the
input when the view is closed. If the stored width is different from the current
width, then the overflow state may be incorrect. Taking the else branch makes
us go through onQueryResults() and clear the rows before opening the view.

This fixes this bug and bug 1759857.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ba025a39a297
Clear the urlbar view before opening it after the window width changes. r=mak
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit auto_nag documentation.

The patch landed in nightly and beta is affected.
:adw, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox112 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(adw)

I have verified this issue on the latest Firefox Nightly 113.0a1 (Build ID: 20230330094555), on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • The High and Low temperature values from the Weather result are no longer shifted when maximizing Firefox.
Status: RESOLVED → VERIFIED
Blocks: 1759857
See Also: 1759857

This isn't an urgent bug, so no need to uplift. Weather suggestions aren't enabled by default on 112. It also fixes the fade effect problem (bug 1759857), but that bug has been around for a long time.

Flags: needinfo?(adw)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: