Page MenuHomePhabricator

Suggestion mode pagination on mobile breaks when suggestion opens context item
Open, MediumPublic

Description

Steps to replicate the issue (include links if applicable):

What happens?:
When you get to one of the 'Template has missing parameters' suggestions, the template context item opens immediately, getting in the way of the suggestion action card.

What should have happened instead?:
The context item should not have opened.

Example: https://youtube.com/shorts/mBWLdMcCHQ8


Derived Requirements

Ensure mobile Suggestion Mode pagination does not automatically open a context item when navigating between suggestions with the up/down arrows. When a suggestion that normally opens a context item, such as Template has missing parameters, is reached through suggestion pagination, the suggestion action card must remain unobstructed and usable.

Test Steps

Test Case 1: Verify suggestion pagination does not open a context item

  1. Open an article containing multiple suggestions, including a suggestion that opens a context item such as Template has missing parameters.
  2. Open the article in mobile VisualEditor with Suggestion Mode and Experimental Checks enabled.
  3. Select one of the available suggestions.
  4. Use the up or down navigation arrow to move through the suggestions.
  5. Continue navigating until the Template has missing parameters suggestion is reached.
  6. Verify the template context item does not open automatically.
  7. Verify the suggestion action card remains visible and unobstructed.
  8. ✅❓❌⬜ AC1: Navigating to a suggestion that normally opens a context item does not automatically open that context item, and the suggestion action card remains unobstructed.

Test Case 2: Verify suggestion pagination continues to work after reaching a context-item suggestion

  1. Open an article containing multiple suggestions, including a Template has missing parameters suggestion.
  2. Open the article in mobile VisualEditor with Suggestion Mode and Experimental Checks enabled.
  3. Select a suggestion and use the up or down navigation arrows.
  4. Navigate to the Template has missing parameters suggestion.
  5. Verify the context item does not open.
  6. Use the up or down navigation arrows again to move to another suggestion.
  7. Verify the next suggestion opens normally.
  8. ✅❓❌⬜ AC2: Suggestion pagination continues to navigate between suggestions normally after reaching a suggestion that can open a context item.

Test Case 3: Verify context items can still open when explicitly accessed

  1. Open an article containing a Template has missing parameters suggestion.
  2. Open the article in mobile VisualEditor with Suggestion Mode and Experimental Checks enabled.
  3. Navigate to the Template has missing parameters suggestion using the suggestion navigation arrows.
  4. Verify the context item does not open automatically.
  5. Explicitly select or interact with the relevant template content to open its context item.
  6. Verify the context item opens normally.
  7. ✅❓❌⬜ AC3: A context item remains available when explicitly accessed but does not open automatically during suggestion pagination.

QA Results - PROD

ACStatusDetails
1❓TT436140#12416660
2✅TT436140#12416660
3✅TT436140#12416660

Event Timeline

We used to have a "don't actually do the surface selection on mobile, because it'll trigger context items / the keyboard" case, which has presumably regressed in recent refactoring.

Change #1333209 had a related patch set uploaded (by Medelius; author: Medelius):

[mediawiki/extensions/VisualEditor@master] Suggestion mode: suppress context item in mobile pagination

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

We used to have a "don't actually do the surface selection on mobile, because it'll trigger context items / the keyboard" case, which has presumably regressed in recent refactoring.

I'll try to find what's changed, because not doing surface selection at all seems like a safer approach. The patch I have up now is just handling the pagination case the same way as the new dialog case (hiding any context if visible).

We also have a task T431753 for suppressing the context item entirely, on both mobile and desktop. If we want to go that route then it kinda renders this ticket moot. I'll bring it up in standup today.

ppelberg triaged this task as Medium priority.

Change #1343646 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] EditCheckAction#select: don't show contexts on mobile unless requested

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

Change #1343646 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] EditCheckAction#select: don't show contexts on mobile unless requested

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

Change #1333209 abandoned by Medelius:

[mediawiki/extensions/VisualEditor@master] Suggestion mode: suppress context item in mobile pagination

Reason:

resolved by 1343646

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

@medelius Can you please review AC1 and the Possible issue section below?

Test Result - PROD

Status: ✅ PASS / ❓ Need More Info / ❌ FAIL
Environment: PROD
OS: macOS Tahoe 26.6.2
Browser: Chrome 153
Device: MBA
Emulated Device: Developer Tools- Pixel 10, iPad 13 Pro, Galaxy Z Fold 6
Test Artifact(s):

Test Steps

Test Case 1: Verify suggestion pagination does not open a context item

  1. Open an article containing multiple suggestions, including a suggestion that opens a context item such as Template has missing parameters.
  2. Open the article in mobile VisualEditor with Suggestion Mode and Experimental Checks enabled.
  3. Select one of the available suggestions.
  4. Use the up or down navigation arrow to move through the suggestions.
  5. Continue navigating until the Template has missing parameters suggestion is reached.
  6. Verify the template context item does not open automatically.
  7. Verify the suggestion action card remains visible and unobstructed.
  8. ❓ AC1: Navigating to a suggestion that normally opens a context item does not automatically open that context item, and the suggestion action card remains unobstructed.
  • Just to clarify the behavior: The Template has missing parameters suggestion displays correctly. When I click Edit, the Template content panel opens. Then, without any further interaction, the content form automatically appears about 8 seconds later.
Pixel 10

Test Case 2: Verify suggestion pagination continues to work after reaching a context-item suggestion

  1. Open an article containing multiple suggestions, including a Template has missing parameters suggestion.
  2. Open the article in mobile VisualEditor with Suggestion Mode and Experimental Checks enabled.
  3. Select a suggestion and use the up or down navigation arrows.
  4. Navigate to the Template has missing parameters suggestion.
  5. Verify the context item does not open.
  6. Use the up or down navigation arrows again to move to another suggestion.
  7. Verify the next suggestion opens normally.
  8. ✅ AC2: Suggestion pagination continues to navigate between suggestions normally after reaching a suggestion that can open a context item.
iPad 13 Pro

Test Case 3: Verify context items can still open when explicitly accessed

  1. Open an article containing a Template has missing parameters suggestion.
  2. Open the article in mobile VisualEditor with Suggestion Mode and Experimental Checks enabled.
  3. Navigate to the Template has missing parameters suggestion using the suggestion navigation arrows.
  4. Verify the context item does not open automatically.
  5. Explicitly select or interact with the relevant template content to open its context item.
  6. Verify the context item opens normally.
  7. ✅ AC3: A context item remains available when explicitly accessed but does not open automatically during suggestion pagination.

See AC1

❓ Possible Issue

Galaxy Z Fold 6