Page MenuHomePhabricator

Ensure first suggestion discoverability when it's outside the current section being edited on mobile
Closed, ResolvedPublic3 Estimated Story Points

Description

Background goal

T414518 introduced a new View Suggestions button to indicate when the 1st suggestion available is outside the initial viewport when opening the editor.

This task involves the work of extending the implementation of the View Suggestions button so that it appears as well when the 1st suggestion available is outside the current section being edited.

Story

As someone who is editing a section of an article in using the mobile VisualEditor, I want to be made aware when a suggestion is visible outside the current section being edited and be able to navigate to that suggestion quickly, so that I can discover and act on Suggestions that are outside the section I initially chose to edit.

Proposed solution

the "View suggestion" button will be used for either:

  1. Navigate to the 1st suggestion when it's outside the initial viewport (when there are suggestions available in that section)
  2. Navigate to the 1st suggestion when it's outside the current section being edited (in cases where that current section doesn't contain any suggestion)

To avoid that the "View suggestions" button overlaps with the "Edit full page" one, the “View suggestions” button will disappear when the user reaches the “Edit full page” button at the bottom, preventing both buttons from appearing at the same time

image.png (2,352×1,680 px, 467 KB)


Derived Requirement

Ensure that users editing a section in the mobile VisualEditor are notified when the first available suggestion exists outside the section they are currently editing and can quickly navigate to that suggestion using the View suggestions button. Ensure that the View suggestions button navigates users to the first available suggestion when it is outside the initial viewport but within the section being edited. Ensure that the View suggestions button navigates users to the first available suggestion when the current section being edited contains no suggestions but a suggestion exists elsewhere on the page. Ensure that the View suggestions button is hidden when the Edit full page button becomes visible so that both buttons are never displayed simultaneously.

Test Steps

Test Case 1: Ensure the View suggestions button appears when the first suggestion is outside the initial viewport within the current section

  1. Open a mobile page containing Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Verify that the current section contains at least one suggestion located below the initial visible area.
  4. Observe the editor immediately after it loads.
  5. Select View suggestions.
  6. ✅❓❌⬜ AC1: The View suggestions button is displayed and navigates directly to the first available suggestion outside the initial viewport within the current section.

Test Case 2: Ensure the View suggestions button appears when the current section contains no suggestions but another section does

  1. Open a mobile page containing Suggestions in a section other than the one being edited.
  2. Begin editing a section that contains no suggestions using the mobile VisualEditor.
  3. Observe the editor after it loads.
  4. Select View suggestions.
  5. ✅❓❌⬜ AC2: The View suggestions button is displayed and navigates directly to the first available suggestion outside the current section being edited.

Test Case 3: Ensure the View suggestions button is not shown when no suggestions exist on the page

  1. Open a mobile page that contains no Suggestions.
  2. Begin editing any section using the mobile VisualEditor.
  3. Observe the editor after it loads.
  4. ✅❓❌⬜ AC3: The View suggestions button is not displayed when no suggestions are available anywhere on the page.

Test Case 4: Ensure the View suggestions button hides when the Edit full page button becomes visible

  1. Open a mobile page containing Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Scroll toward the bottom of the editor until the Edit full page button becomes visible.
  4. Observe the floating action buttons.
  5. ✅❓❌⬜ AC4: The View suggestions button is hidden while the Edit full page button is visible so both buttons are never displayed at the same time.

Test Case 5: Ensure the View suggestions button reappears after leaving the Edit full page area

  1. Open a mobile page containing Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Scroll to the bottom until the Edit full page button is visible.
  4. Scroll back upward so the Edit full page button is no longer visible.
  5. Observe the editor.
  6. ✅❓❌⬜ AC5: The View suggestions button reappears when its display conditions are met after the Edit full page button is no longer visible.

Test Case 6: Ensure navigation always targets the first available suggestion

  1. Open a mobile page containing multiple Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Select View suggestions.
  4. Observe the destination after navigation.
  5. ✅❓❌⬜ AC6: Selecting View suggestions always navigates to the first available suggestion rather than a later suggestion.

Acceptance criteria (or Done)

  • Explore possible solutions
  • Implement decided solution

QA Results - TestWiki

Related Objects

Event Timeline

bmartinezcalvo renamed this task from Expose "View suggestions" button within mobile section editing to Indicate additional suggestions outside the current section being edited on mobile.Apr 14 2026, 2:11 PM
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo renamed this task from Indicate additional suggestions outside the current section being edited on mobile to Ensure first suggestion discoverability when it's outside the current section being edited on mobile.Apr 20 2026, 5:27 PM
bmartinezcalvo updated the task description. (Show Details)

As decided with the team, the "View suggestion" button will be used for either:

  1. Navigate to the 1st suggestion when it's outside the initial viewport (when there are suggestions available in that section)
  2. Navigate to the 1st suggestion when it's outside the current section being edited (in cases where that current section doesn't contain any suggestion)

To avoid that the "View suggestions" button overlaps with the "Edit full page" one, the “View suggestions” button will disappear when the user reaches the “Edit full page” button at the bottom, preventing both buttons from appearing at the same time

image.png (2,352×1,680 px, 467 KB)

ppelberg set the point value for this task to 3.Apr 21 2026, 5:17 PM

Per offline discussion, this ticket need not block start of experiment.

Tho, ideally, we'd like the fix to be live within ~1 week of it beginning.

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

[mediawiki/extensions/VisualEditor@master] Display 'view suggestions' button on mobile when suggestion exists outside current section

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

If there is at least one suggestion in the current section, and the user acts on all of them, should the 'View suggestions' button appear (assuming there are suggestions outside the section)?

I'm assuming no, given my understanding that we're focused on 'discoverability' of the Suggestion Mode feature. And this would be consistent with T414518, where the 'View suggestions' button disappears once the user has first interacted with either the button or a suggestion.

Test wiki created on Patch demo by CMedelius-WMF using patch(es) linked to this task:
https://cc157ef861.catalyst.wmcloud.org/w/

If there is at least one suggestion in the current section, and the user acts on all of them, should the 'View suggestions' button appear (assuming there are suggestions outside the section)?

I'm assuming no, given my understanding that we're focused on 'discoverability' of the Suggestion Mode feature. And this would be consistent with T414518, where the 'View suggestions' button disappears once the user has first interacted with either the button or a suggestion.

@medelius: I'm glad you pulled out this question. The response you offered – "No, don't show the View suggestions button when someone acts on all of the suggestions within a section." – aligns with what I think we ought to do.

With the above said, @bmartinezcalvo and I are thinking that, in the near-term future, we will offer people an opportunity to discover more suggestions in this case. Tho, let's handle that in T426062: Suggestions: Create an Empty State to show when completing/declining all suggestions.

Change #1287448 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Mobile: display 'view suggestions' button for other sections

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

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

[mediawiki/extensions/VisualEditor@master] Suggestion mode: fix timing issue with outside-section discoverability

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

Change #1290102 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Suggestion mode: fix timing issue with outside-section discoverability

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

@medelius Please review AC2, AC3 and AC6. If you have any questions, please let me know. Thanks!

Test Result - TestWiki

Status: ✅ PASS / ❓ Need More Info
Environment: TestWiki
OS: macOS Tahoe 26.5.1
Browser: Chrome 149
Device: iPhone 14 Pro Max, Galaxy S20, Google Pixel 7
Emulated Device: NA

Test Artifact(s):

https://test.wikipedia.org/wiki/Beyonc%C3%A9
https://test.wikipedia.org/wiki/Duran_Duran#/editor/0
https://test.wikipedia.org/wiki/Graph_Testing#/editor/0
*S20 and Pixel 7 has same video as iPhone 14 Pro Max, unless said otherwise

Test Steps

Test Case 1: Ensure the View suggestions button appears when the first suggestion is outside the initial viewport within the current section

  1. Open a mobile page containing Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Verify that the current section contains at least one suggestion located below the initial visible area.
  4. Observe the editor immediately after it loads.
  5. Select View suggestions.
  6. ✅ AC1: The View suggestions button is displayed and navigates directly to the first available suggestion outside the initial viewport within the current section.
iphone 14 Pro MaxSamsung S20 UltraPixel 7
He-RTLDe

Test Case 2: Ensure the View suggestions button appears when the current section contains no suggestions but another section does

  1. Open a mobile page containing Suggestions in a section other than the one being edited.
  2. Begin editing a section that contains no suggestions using the mobile VisualEditor.
  3. Observe the editor after it loads.
  4. Select View suggestions.
  5. ❓AC2: The View suggestions button is displayed and navigates directly to the first available suggestion outside the current section being edited.
  • Also if you click "View Suggestions", than X our an Add citation, it will never reappear again?
iPhone 14 Pro Max

Test Case 3: Ensure the View suggestions button is not shown when no suggestions exist on the page

  1. Open a mobile page that contains no Suggestions.
  2. Begin editing any section using the mobile VisualEditor.
  3. Observe the editor after it loads.
  4. ❓AC3: The View suggestions button is not displayed when no suggestions are available anywhere on the page.
  • Is there a page that has no suggestions or will it always have an "Add Citation" to any article that has words? Just curious since HelloWorld only had a few words on the page
iPhone 14 Pro Max

Test Case 4: Ensure the View suggestions button hides when the Edit full page button becomes visible

  1. Open a mobile page containing Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Scroll toward the bottom of the editor until the Edit full page button becomes visible.
  4. Observe the floating action buttons.
  5. ✅ AC4: The View suggestions button is hidden while the Edit full page button is visible so both buttons are never displayed at the same time.
iPhone 14 Pro Max

Test Case 5: Ensure the View suggestions button reappears after leaving the Edit full page area

  1. Open a mobile page containing Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Scroll to the bottom until the Edit full page button is visible.
  4. Scroll back upward so the Edit full page button is no longer visible.
  5. Observe the editor.
  6. ✅ AC5: The View suggestions button reappears when its display conditions are met after the Edit full page button is no longer visible.

See AC4

Test Case 6: Ensure navigation always targets the first available suggestion

  1. Open a mobile page containing multiple Suggestions.
  2. Begin editing a section using the mobile VisualEditor.
  3. Select View suggestions.
  4. Observe the destination after navigation.
  5. ❓AC6: Selecting View suggestions always navigates to the first available suggestion rather than a later suggestion.
  • Just confirming, when you mean first available suggestion, you mean when you go to other sections that have suggestions, clicking on it will always bring you back to the first suggestion of the article, as seen in the video?
iPhone 14 Pro Max
EAkinloose edited projects, added: Editing QA; removed: Verified.
EAkinloose moved this task from QA to Blocked on the Editing-team (FY2026-27 Q1 sprint 1) board.

George, thank you for the thorough testing!

AC2:

Yes, if you interact with the 'View suggestions' button, it will never appear again, even if you didn't actually act on the suggestion it led you to.

Also, I'm a bit confused by the video below AC2 (which I assume is the one for AC2). The section you first click to edit does contain a suggestion, but this test case calls for starting in a section that doesn't contain a suggestion. Either way I've verified it works when starting on a section that doesn't contain a suggestion (such as Legacy, in the Duran Duran example), so it's okay, but just wanted to note that.

AC3:

I added a citation to the HelloWorld page, so that shouldn't have a suggestion anymore. But to more broadly answer your question: yes, it's possible for a page to have no suggestions. Add Citation (ReferenceCheck) only shows on lines with at least 50 characters.

AC6:

I'm realizing now that there may have been a mismatch in requirements between this task (navigation to suggestions outside current section) and the one it builds upon, T414518 (navigation to suggestions outside the viewport). This task calls for scrolling the user to the nearest suggestion, while the initial task called for scrolling to the first suggestion in the article. They both meet their requirements, which is why you now see different behavior depending on if there are suggestions in the section you're currently editing.

All that to say: this implementation is working correctly. However, it's likely that the 'outside viewport' behavior needs to be updated to navigate to the nearest suggestion, not the first one. Let me keep this in dev doing until I ask @bmartinezcalvo to confirm, at which point I'll create a new ticket to update that behavior.

Thank you!

George, thank you for the thorough testing!

AC2:

Yes, if you interact with the 'View suggestions' button, it will never appear again, even if you didn't actually act on the suggestion it led you to.

Also, I'm a bit confused by the video below AC2 (which I assume is the one for AC2). The section you first click to edit does contain a suggestion, but this test case calls for starting in a section that doesn't contain a suggestion. Either way I've verified it works when starting on a section that doesn't contain a suggestion (such as Legacy, in the Duran Duran example), so it's okay, but just wanted to note that.

Sorry I'm not sure what happened. Here's the video of Legacy which verified it works.

✅ Iphone 14 Pro Max

AC3:

I added a citation to the HelloWorld page, so that shouldn't have a suggestion anymore. But to more broadly answer your question: yes, it's possible for a page to have no suggestions. Add Citation (ReferenceCheck) only shows on lines with at least 50 characters.

✅ Iphone 14 Pro Max

AC6:

I'm realizing now that there may have been a mismatch in requirements between this task (navigation to suggestions outside current section) and the one it builds upon, T414518 (navigation to suggestions outside the viewport). This task calls for scrolling the user to the nearest suggestion, while the initial task called for scrolling to the first suggestion in the article. They both meet their requirements, which is why you now see different behavior depending on if there are suggestions in the section you're currently editing.

All that to say: this implementation is working correctly. However, it's likely that the 'outside viewport' behavior needs to be updated to navigate to the nearest suggestion, not the first one. Let me keep this in dev doing until I ask @bmartinezcalvo to confirm, at which point I'll create a new ticket to update that behavior.

Ok sounds good, if you deicide to create a new ticket or if it is the behavior, you can mark this as verified and Ready to Sign-off.

Thanks! We decided to make the other case have the same behavior as what this ticket requires, and I created T432662 to capture that. I'll mark this as verified.

Test wiki on Patch demo by CMedelius-WMF using patch(es) linked to this task was deleted:

https://cc157ef861.catalyst.wmcloud.org/w/