Page MenuHomePhabricator

Compacting of interlanguage could happen before page is fully loaded
Closed, ResolvedPublic

Description

When opening a long page with long list of language links, the page load may take long, so the language links appear as non compact for few seconds and only when the page load ends, there is blanking and it becomes compact.

This should ideally be fixed by compacting the language links before page load. Alternative solution could be using smooth animation (such as fade out affect) for hiding the long language links

This is not new issue, but I just find it annoying sometimes.

Event Timeline

eranroz created this task.May 28 2016, 5:51 AM
Restricted Application added a project: UniversalLanguageSelector. · View Herald TranscriptMay 28 2016, 5:51 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
Nikerabbit triaged this task as Normal priority.May 30 2016, 12:58 PM

Thanks for filing this bug. It belongs together with other performance related tasks:

There are couple of reasons why I believe the flash, while annoying, does not need immediate action:

  1. We have minimized the delivered code size so that resource delivery speed is not impacted.
  2. We have optimized the script for the speed that once it is run it finishes as fast as possible.
  3. The list is fully or partially below the fold for some users (I don't have reliable data for this) making it less visible.
  4. Even though there have been conscious efforts to avoid any kind of flashing/moving when page is loading, there are still other places too where it happens: banners, ULS personal bar trigger icon, etc.

As far as I can see, the only way this could be completely fixed would be to do things on the PHP side. This brings its own set of issues and would need significant amount of engineering and even operations work to avoid issues with caching. We definitely do not want to delay the time to first paint, so the script gets executed after it on document.ready event and I don't see a way to make it happen earlier on the client side either.

I will leave the suggestion whether a transition animation would help to someone more experienced in design.

Amire80 moved this task from Backlog to Other on the ULS-CompactLinks board.Jun 8 2016, 6:10 PM

Change 299285 had a related patch set uploaded (by Eranroz):
Earlier evaluation of compactlinks

https://gerrit.wikimedia.org/r/299285

eranroz added a comment.EditedAug 13 2016, 7:19 AM

There is a very long delay between the execution of $( document ).ready and document getting to interactive state - which is enough for compacting the language links. This delay is most noticeable if there are images on the page.

I don't know if this delay is so noticeable in more recent versions of jQuery but I don't want dependency to T124742 which unfortunately may take years to be done

Change 304774 had a related patch set uploaded (by Nikerabbit):
Earlier evaluation of suggestions in the sidebar

https://gerrit.wikimedia.org/r/304774

I am adding this to the current sprint since I reviewed and worked on the patch.

Nemo_bis renamed this task from compact interlanguage change after page load to Compact interlanguage links are sometimes applied after page load.Aug 16 2016, 9:03 AM
Nikerabbit renamed this task from Compact interlanguage links are sometimes applied after page load to Compacting of interlanguage could happen before page is fully loaded.Aug 16 2016, 9:46 AM
Arrbee added a subscriber: Arrbee.

Timeboxed for: 22 August 2016

Change 299285 merged by jenkins-bot:
Earlier evaluation of compactlinks

https://gerrit.wikimedia.org/r/299285

https://gerrit.wikimedia.org/r/#/c/304774/ would be good to have in the same train as the already merged patch.

Change 304774 merged by jenkins-bot:
Earlier evaluation of suggestions in the sidebar

https://gerrit.wikimedia.org/r/304774

I am noticing that the language change tooltip is sometimes mispositioned. Is anyone else seeing this? Cause is likely this patch or the conversion to OO.ui.PopupWidget.

Arrbee moved this task from QA to Done on the Language-Q1-2016-17 Sprint 4 board.Aug 30 2016, 7:53 AM
Arrbee closed this task as Resolved.Aug 30 2016, 7:55 AM