Page MenuHomePhabricator

Migrate uses of codex-search in MobileFrontend to use CodexModule
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Followup to T356678.

To unblock the Design systems team for the roll out of Codex with code-splitting support we need to replace the use of codex-search-styles with CodexModule as we did in T356678.

User story

  • As a mobile user, I want the mobile experience as optimized as possilbe.

Requirements

  • Replace the use of codex-search-styles with CodexModule

BDD

Feature: Optimize Mobile Experience with CodexModule

  Scenario: Verify replacement of codex-search-styles with CodexModule on mobile
    Given the user visits the mobile domain of Wikipedia
    When the user runs "mw.loader.getState('codex-search-styles')" in the JavaScript console
    Then the output should return "registered"

Design

No change

Test Steps

Test Case: Verify CodexModule Optimization on Mobile

  1. Navigate to the mobile domain of Wikipedia using a mobile device or a mobile device emulator in a web browser.
  2. Open the JavaScript console (this can usually be done via developer tools in most modern browsers).
  3. Enter the command: mw.loader.getState('codex-search-styles') and press Enter.
  4. AC1: Confirm that the console returns 'registered'.

QA Results - Beta

ACStatusDetails
1T356688#9730894

QA Results - Prod

ACStatusDetails
1T356688#9745180

Event Timeline

Jdlrobson raised the priority of this task from Medium to High.Apr 5 2024, 6:19 AM
Jdlrobson subscribed.

After T356678 we are now loading Codex modules more than we need to on mobile page load so bumping priority.

Change #1019299 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/MobileFrontend@master] Replace codex-search with codex module

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

bwang removed bwang as the assignee of this task.Sat, Apr 13, 10:23 PM
bwang updated the task description. (Show Details)
bwang subscribed.

Change #1019299 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Replace codex-search with codex module, add bundle size tests

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

@Jdlrobson, this needs more detail in the requirement. Some info on CodexModule and what to look for in the page source perhaps.

Jdlrobson lowered the priority of this task from High to Medium.Mon, Apr 15, 11:31 PM
Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

Test Steps

Test Case: Verify CodexModule Optimization on Mobile

  1. Navigate to the mobile domain of Wikipedia using a mobile device or a mobile device emulator in a web browser.
  2. Open the JavaScript console (this can usually be done via developer tools in most modern browsers).
  3. Enter the command: mw.loader.getState('codex-search-styles') and press Enter.
  4. AC1: Confirm that the console returns 'registered'.

screenshot 236.png (555×557 px, 68 KB)

Jdlrobson claimed this task.

This task caused a bug T362986: Notifications do not appear well on the mobile version of RTL.

This task caused a bug T362986: Notifications do not appear well on the mobile version of RTL.

I'm not seeing anything that indicates this change caused T362986. Is there more context you can provide?

Okay I see you filed https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/1023066, but some context as to why reverting this change specifically will address the issue would be helpful.

Hi @CCiufo-WMF, The bug is caused by 1019299, I don't know what the actual reason was, but after reverting 1019299 the bug was resolved.

I can confirm that reverting this patch addresses the problem.

It seems that when defining a module mobile.startup as a MediaWiki\\ResourceLoader\\CodexModule the styles interfere with the notification overlay.

The issue is now described in T363205.

Closing out this ticket again, as addressing the issue will be handled in T362986

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

Test Steps

Test Case: Verify CodexModule Optimization on Mobile

  1. Navigate to the mobile domain of Wikipedia using a mobile device or a mobile device emulator in a web browser.
  2. Open the JavaScript console (this can usually be done via developer tools in most modern browsers).
  3. Enter the command: mw.loader.getState('codex-search-styles') and press Enter.
  4. AC1: Confirm that the console returns 'registered'.

screenshot 266.png (767×1 px, 231 KB)