Open Bug 1600753 Opened 5 years ago Updated 1 year ago

The new comment notice on the bug pages disappears after a short delay if viewport is smaller than 800px

Categories

(bugzilla.mozilla.org :: User Interface, defect)

defect
Not set
critical

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: regression, testcase-wanted)

Attachments

(1 obsolete file)

This is a very recent regression, from some time late last week.

STR:

  1. Open a bug which has been changed since the last time you've visited it.
  2. Watch the blue bar at the top notifying the number of changes.

Actual results:
The blue bar disappears automatically after a few seconds.

Expected results:
It should stay on screen until the user clicks it.

This regression makes Bugzilla much harder to use...

Looking through recent commits, it looks like this patch might be the cause?

That patch should be unrelated; just changed the cursor type.

The blue bar disappears once the red NEW comment line is displayed in the viewport, and it makes use of the Intersection Observer API. Perhaps the API has regressed at Firefox side?

Tested with Firefox 70 and latest Nightly on macOS, and the blue bar remains as expected.

Indeed, this seems like a bad regression in intersection observer. Thanks, Kohei.

Component: User Interface → Layout
Product: bugzilla.mozilla.org → Core
Summary: The new comment notice on the bug pages disappears after a short delay → Possible regression in the intersection observer API: The new comment notice on the bug pages disappears after a short delay

Sean, any chance you could find someone to have a look at this please? Thanks!

Flags: needinfo?(svoisen)

Emilio: Any chance this is related to your recent changes?

Flags: needinfo?(svoisen) → needinfo?(emilio)

So per comment 5 it seems to work on Nightly, and I can see it working fine as well...

I'm not aware of any intersection observer changes that have landed between 70 and the latest patch in bug 1551716.

Kohei is there a good way to show the bar consistently so that we can run mozregression on it?

Ehsan does Nightly work for you?

Flags: needinfo?(kohei.yoshino)
Flags: needinfo?(emilio)
Flags: needinfo?(ehsan)

I assume per comment 0 Ehsan is using Nightly, so I'm not sure what to make out of that... I haven't been able to repro it :/

Also Kohei, any chance you can point me to the code using the API?

Another question for Ehsan: is there any chance you're running an extension or something that causes a FOUC, or similar, that makes the bar appear on the viewport and be notified too soon? it sounds like something like that is going on

Well, the blue bar appears only on bugs with updates since you visit. It’s a personalized feature so a bit hard to test it reliably. You can go to My Dashboard, select Updated Since Last Visit from the query list, and click any bug on the bug list to see it in action. The code is around here.

Flags: needinfo?(kohei.yoshino)

It seems that updating my Nightly from 20191202220401 to 20191203094830 has fixed this.

I cannot repro in 20191202220401 either... Should we close as WFM? If Ehsan could try to verify it's not reproducible in Beta with his profile, it'd be nice.

Now I can reproduce again in the same 20191203094830 session that I could not reproduce in before. It seems like it's one of those bugs which has something to do with the length of the session somehow. :-(

Flags: needinfo?(ehsan)

Oh, I think I can repro if the viewport is small. Ehsan, may it be the difference for you as well?

I can repro this 100% of the time with a viewport of 708x639.

Flags: needinfo?(ehsan)

Hmm, I still can’t repro the issue on my latest Nightly for macOS even when the window/viewport gets smaller. Perhaps regressed from Bug 1514429? It’s just fixed so the timing may not match though.

I can repro with a small viewport on a clean profile on Firefox 68. So probably not a recent regression.

FWIW, I think the bmo code is slightly racy:

I think this line makes the current thing a bit racy with respect to loaded stylesheets. This line flushes layout, and since it runs off DOMContentLoaded, it doesn't have any guarantee of pending stylesheets having loaded.

That being said, I don't think that is the root cause of the issue. I just tested chrome and I can also repro 100% with a small viewport... So this doesn't seem like a Layout issue to me.

Hmm, good point. That line should/can be document.addEventListener('load', ...)

QA Whiteboard: [qa-regression-triage]

I can reproduce this issue using a small viewport and by accessing bugs from "My Dashboard" section ( with "Update since last visit" option selected from the query list).

It seems that this behavior is reproducible on older builds as well (bad builds can be traced back to 2017).

Last known good build: 2017-04-27
First known bad build: 2017-04-28

Unfortunately I can't point out the exact patch that caused this regression (at some point, mozregression is throwing an error that no more builds can be found) but I hope that this pushlog helps in pointing out the culprit.

Pushlog generated by mozregression: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=0b77ed3f26c5335503bc16e85b8c067382e7bb1e&tochange=84762dbeb5380461fe27f0afa0e27e8ba9dd3b01

Ah very interesting. I can reproduce this in one window (793px wide) but not in another (1153px wide)!

Flags: needinfo?(ehsan)

Looks like the threshold for reproducing this bug is for window.innerWidth to be less than than 800px. 799px and below will reproduce the bug.

The pushlog in comment 20 contains https://hg.mozilla.org/mozilla-central/rev/32dbe6ca353fc665e10994093a17a5a70da37de8. So yeah, it happens if the IntersectionObserver is enabled.

This is a BMO bug. Thanks Emil for the bisect!

Component: Layout → User Interface
Product: Core → bugzilla.mozilla.org
Summary: Possible regression in the intersection observer API: The new comment notice on the bug pages disappears after a short delay → The new comment notice on the bug pages disappears after a short delay if viewport is smaller than 800px

So thanks for all your investigation! Will try to reproduce and fix the issue next week.

Assignee: nobody → kohei.yoshino

Sorry for my absence. I just checked this out, replaced document.addEventListener('DOMContentLoaded', ...) with window.addEventListener('load', ...) and tested, but the issue can still be reproduced. Changed IntersectionObserver.root from #bugzilla-body to document.body for window < 800px, then the IntersectionObserver’s callback will never be called. So... something in our CSS that enables the fixed global header is not compatible with IntersectionObserver.

In Bug 1330451, we’ll fix the bug page’s header as well, so I’ll revisit this later along with Bug 1534087.

Depends on: 1330451
See Also: → 1534087
Assignee: kohei.yoshino → nobody
Attachment #9386547 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: