Page MenuHomePhabricator

Move ReadingList/Collections icon up in the loading module sequence
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

Currently the ReadingList/Collections icon is loaded with JavaScript late on page load. Identify ways to have icon loaded in styles module, not in JS module in order to not have a white gap in the user links and negatively impact discoverability.

Goal

Icon should be loaded alongside other user link icons

Acceptance criteria

  • User is able to view and click the ReadingList/Collections icon while page is loading and other icons are already available.

Requirement

Scope: Desktop web (Vector 2022).

  • The ReadingList/Collections icon must be moved from the JavaScript loading module to the styles (CSS) module to improve load timing.
  • The icon must appear alongside other user link icons immediately during initial page render.
  • The icon must be visible and clickable while the page is still loading, without any white gap or late reflow in the user links area.
  • Functionality (click to open ReadingLists/Saved items) must remain unchanged.

BDD

Feature: Load ReadingList/Collections icon with initial styles

  Scenario: Page loading with ReadingList icon visible
    Given I am using Vector 2022 on desktop
    When the page begins loading
    Then the ReadingList/Collections icon appears alongside other user link icons
    And it is clickable even before the JavaScript module finishes loading
    And no white gap or layout shift occurs in the user links section

Test Steps

Test Case 1: Verify early load of ReadingList/Collections icon

  1. Log in and ensure ReadingLists feature is enabled.
  2. Open any article page using Vector 2022.
  3. Observe the user links area during initial page load.
  4. AC1: The ReadingList/Collections icon appears immediately with other icons (before full JS load).
  5. AC2: The icon is clickable and opens the ReadingLists view.
  6. AC3: No white gap or placeholder appears in the user links area.
  7. AC4: No layout shift occurs when the page finishes loading.

QA Results - Beta

Event Timeline

Jdlrobson-WMF subscribed.

ext.readingLists.bookmark.icons is using OutputPage::addModules. Changing that line to OutputPage:addModuleStyles should fix it.

aude renamed this task from Move ReadlingList/Collections icon up in the loading module sequence to Move ReadingList/Collections icon up in the loading module sequence.Nov 4 2025, 3:02 PM

Change #1201711 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Use addModuleStyles for ReadingList icons

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

Change #1201711 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Use addModuleStyles for ReadingList icons

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

aude removed aude as the assignee of this task.Nov 4 2025, 6:22 PM

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Tahoe 26.x
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Case 1: Verify early load of ReadingList/Collections icon

  1. Log in and ensure ReadingLists feature is enabled.
  2. Open any article page using Vector 2022.
  3. Observe the user links area during initial page load.
  4. AC1: The ReadingList/Collections icon appears immediately with other icons (before full JS load).

not sure how to verify it was before full JS load, but it did appear along with the other icons.

  1. AC2: The icon is clickable and opens the ReadingLists view.
  2. AC3: No white gap or placeholder appears in the user links area.
  3. AC4: No layout shift occurs when the page finishes loading.

screenshot 5.mov.gif (1×1 px, 1 MB)

Edtadros updated the task description. (Show Details)
Edtadros subscribed.

Change #1203139 had a related patch set uploaded (by Stoyofuku-wmf; author: Aude):

[mediawiki/extensions/ReadingLists@wmf/1.46.0-wmf.1] Use addModuleStyles for ReadingList icons

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

Change #1203139 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@wmf/1.46.0-wmf.1] Use addModuleStyles for ReadingList icons

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

Mentioned in SAL (#wikimedia-operations) [2025-11-10T21:13:06Z] <aude@deploy2002> Started scap sync-world: Backport for [[gerrit:1203139|Use addModuleStyles for ReadingList icons (T409116)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-10T21:15:16Z] <aude@deploy2002> toyofuku, aude: Backport for [[gerrit:1203139|Use addModuleStyles for ReadingList icons (T409116)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-11-10T21:21:22Z] <aude@deploy2002> Finished scap sync-world: Backport for [[gerrit:1203139|Use addModuleStyles for ReadingList icons (T409116)]] (duration: 08m 16s)

SToyofuku-WMF claimed this task.
SToyofuku-WMF subscribed.

Done and QAed and backported - to be tested in prod whenever T409650 gets picked up, but signing off as we're pretty confident with this one