Page MenuHomePhabricator

"Navigation" in sidebar is visible for a moment before disappearing (FOUC)
Closed, DeclinedPublic

Description

The first h5 tag in the sidebar of the Vector skin (containing the word "Navigation" on most English wikis), immediately under the logo, is visible for a moment before disappearing once the page is fully loaded (except on certain wikis such as Bugzilla where it does not disappear at all).


Version: unspecified
Severity: normal

Details

Reference
bz25510

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:18 PM
bzimport set Reference to bz25510.
bzimport added a subscriber: Unknown Object (MLST).

This is caused by ResourceLoader loading the vector extension later in the page loading process than it used it (scripts are now at the bottom). There are some possible tricks to getting around this - of which I am going to be working on soon. Any ideas are welcome. My goal is to fix this cleverly, not just abandon putting scripts at the bottom.

still there today. Any action on this, Trevor?

It's been proposed in bug #27488 that we move the scripts to the head, and that would fix this. Until then, I have not yet come up with a solution in the limited time I've spent working on this problem.

Moving to the Vector-extension.

The core skin has no hiding functionality, this is part of the javascript enhancement enabled in the extension.

(In reply to comment #3)

It's been proposed in bug #27488 that we move the scripts to the head, and that
would fix this. Until then, I have not yet come up with a solution in the
limited time I've spent working on this problem.

This is now possible by chopping that part into a seperate module that has position=>top (and a wrap in $(document).ready if needed).
Any gotcha that you know of that keeps us from doing that ?

(In reply to comment #5)

This is now possible by chopping that part into a seperate module that has
position=>top (and a wrap in $(document).ready if needed).
Any gotcha that you know of that keeps us from doing that ?

It seems to me that all of CollapsibleNav can probably be moved to the top, since its purpose (collapsing nav stuff) is something that shouldn't be delayed for too long.

(In reply to comment #5)

(In reply to comment #3)

It's been proposed in bug #27488 that we move the scripts to the head, and that
would fix this. Until then, I have not yet come up with a solution in the
limited time I've spent working on this problem.

This is now possible by chopping that part into a seperate module that has
position=>top (and a wrap in $(document).ready if needed).
Any gotcha that you know of that keeps us from doing that ?

Wouldn't wrapping it in $(document).ready ruin the point? If it doesn't run until the DOM is entirely ready, there's going to be some time where things aren't displayed correctly.

  • Bug 53940 has been marked as a duplicate of this bug. ***

maddiemadan wrote:

There is a h2 heading "Navigation" if looked in the elements of web page but currently the word is not flashing. (Not appearing at all)

(In reply to comment #10)

There is a h2 heading "Navigation" if looked in the elements of web page but
currently the word is not flashing. (Not appearing at all)

I think your browser/Internet connection might be too fast; I (with all my gadgets and scripts causing a fairly bloated page load) still see this bug. "Navigation" appears when the page is first loaded, but only disappears once scripts are run.

There are at least a few possible paths forward here:

  • stop hiding "navigation" in the sidebar
  • remove sidebar section collapsing
  • use "top" (bug 27488)
  • Bug 60153 has been marked as a duplicate of this bug. ***

Can't reproduce, but I've not tried slowing down loading.

(In reply to MZMcBride from comment #12)

There are at least a few possible paths forward here: [...]

  • remove sidebar section collapsing

That was done (bug 39035), does that supersede this bug?