Page MenuHomePhabricator

Add a link: skipped all suggestions dialog
Closed, ResolvedPublic

Description

If the user skips all the offered link suggestions, their "Publish/Submit" button is never activated (per T269638). But they may still skip all the way to the end of the list of suggested links. If they select "Skip" on the final suggestion, without having selected "Yes" or "No" on any of the previous ones, then this dialog appears.

  • Header: "You've skipped all suggestions for this article."
  • Body: "Are you sure you don't want to accept or reject any suggestions?"
  • First button: "Skip all"
  • Second button: "Review again".
    • This button closes the dialog and the user is back on the final suggestion, which is where they tapped/clicked that last skip button that opened the dialog.
Mobile mockups as of 2021-01-12:
image.png (497×281 px, 13 KB)
Desktop mockups as of 2021-01-12:
image.png (597×789 px, 206 KB)

NOTE: Refer to Figma for up-to-date detailed redline mocks and specs:
Mobile: https://www.figma.com/file/2SONd8P1tsexIB5coMOp8h/Growth-Structured-tasks?node-id=181%3A65
Desktop: https://www.figma.com/file/2SONd8P1tsexIB5coMOp8h/Growth-Structured-tasks?node-id=112%3A0

Instrumentation

See T273827: Add a link: instrumentation for details.

If the user has skipped all suggestions, they’ll get the “skipped all suggestion dialog”. We should record:

  • Impression for the dialog.
  • An event for which button the user selects.

Event Timeline

@MMiller_WMF sometime this week or next could you add specifications here please?

My changes for link inspector (T269644) may impact the work here. I updated next button action on the link inspector of the last recommendation to save the article if user has decided on any of the recommendations and to currently no-op if the user skipped all the recommendations (with the idea that the dialog from this task would be shown). This might not be needed depending on how this dialog is implemented (if it's shown as part of the ArticleTarget's save command, the logic in the next button action is probably not needed).

/**
 * Move the selection to the next suggestion if it exists, if the user is on the last recommendation:
 * fire an event to save the article if user decided on any of the recommendations
 * show skipped all suggestions dialog if user didn't decide on any of the recommendations
 *
 * @param {number} nextIndex Zero-based index of the next suggestion in the linkRecommendationFragments array
 */
RecommendedLinkContextItem.prototype.onNextActionClicked = function ( nextIndex ) {
	if ( nextIndex === this.getRecommendationInfo().total ) {
		if ( this.allRecommendationsSkipped() ) {
			// TODO: Show skip all suggestions dialog (T269658)
		} else {
			mw.hook( 'growthExperiments.contextItem.saveArticle' ).fire();
		}
	} else {
		this.moveToSuggestion( nextIndex );
	}
};
kostajh triaged this task as Medium priority.Apr 13 2021, 2:10 PM
kostajh moved this task from April 5 - April 9 to April 12 - April 16 on the Add-Link board.

Change 683296 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Add Link: "skipped all suggestions" dialog

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

I used the standard OOUI confirmation dialog, which looks slighly different from the design (the dialog title is styled a bit differently; also since the task description had shorter button texts, the buttons end up next to each other). Let me know if that's an issue.

Change 683296 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add Link: "skipped all suggestions" dialog

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

Note: the instrumentation is not done yet.

for @RHo review - there is @Tgr comment above explains that the standard OOUI confirmation dialog was implemented. The screenshots below show how the dialog looks now:

Desktop (betalabs)Mobile (betalabs)
Screen Shot 2021-04-28 at 11.54.47 AM.png (938×1 px, 184 KB)
Screen Shot 2021-04-29 at 12.55.40 PM.png (1×768 px, 399 KB)

Change 683828 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Add GENDER to skip dialog messages

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

Change 683828 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add GENDER to skip dialog messages

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

Note: the instrumentation is not done yet.

for @RHo review - there is @Tgr comment above explains that the standard OOUI confirmation dialog was implemented. The screenshots below show how the dialog looks now:

Desktop (betalabs)Mobile (betalabs)
Screen Shot 2021-04-28 at 11.54.47 AM.png (938×1 px, 184 KB)
Screen Shot 2021-04-29 at 12.55.40 PM.png (1×768 px, 399 KB)

Thanks @Etonkovidova, and @Tgr, that's fine. I have checked on cswiki what happens if the button text is long and it overflows correctly to two full-width buttons so fine to resolve

image.png (536×774 px, 82 KB)