Page MenuHomePhabricator

Improve story text selection
Closed, ResolvedPublic

Assigned To
Authored By
SGautam_WMF
Feb 6 2023, 10:45 AM
Referenced Files
F37131126: image.png
Jul 7 2023, 12:43 AM
F37034193: 16.png
May 25 2023, 10:08 AM
F37034195: 15.png
May 25 2023, 10:08 AM
F37034190: 14.png
May 25 2023, 10:08 AM
F37033826: 03.png
May 25 2023, 9:33 AM
F37033828: 02.png
May 25 2023, 9:33 AM
F37033827: 01.png
May 25 2023, 9:33 AM
F36754208: image 1.png
Feb 6 2023, 10:45 AM

Description

Background

The objective of this task is to enhance the text selection experience in Wikistories to provide users with more intuitive and precise ways of selecting and interacting with the story text. Currently, editors can select story text by long pressing and dragging the handle to highlight the text they want to include in their story.
However, this interaction is not always intuitive or clear, as various browser pop-ups (e.g. tap to search, Google Translate, etc.) can interfere with the process.

image 2.png (2×1 px, 277 KB)
image 1.png (2×1 px, 304 KB)
Description/User story

As a wikistory editor,
I would like to have a better text selection experience,
so that I can easily add text from the article to my stories.

Design details

1. User Interaction

01.png (780×360 px, 55 KB)
02.png (780×360 px, 58 KB)
03.png (780×360 px, 56 KB)
  • When the user lands on article text selection screen they see a message banner with the text "Tap to select/deselect a sentence" indicating that the user can tap on a statement to highlight or de-highlight it.
  • When the user taps on a word or phrase, the entire statement containing the tapped word/phrase is highlighted with a background color indicating it is selected. 'Add to story' button appears and if the user taps on it then selected text gets added to the story.
  • If a user wants to de-highlight a previously highlighted sentence, they can simply tap on it again. The sentence loses its highlight and the action bar at the bottom disappears, indicating that the sentence is no longer selected.

2. Message banner behavior

  • The message banner appears when the user lands on the text selection screen.
  • If the user closes the message banner by tapping the close icon, it will not reappear during the current session.
  • When the user selects a sentence by tapping on it, the message banner is replaced by the "Add to story" button.
  • If the user deselects the sentence by tapping on the highlighted text again, the message banner reappears with the original message and the close icon.

3. Highlight counter

14.png (780×360 px, 63 KB)
15.png (780×360 px, 61 KB)
16.png (780×360 px, 63 KB)
  • After the user confirms the selection by tapping a second time, a counter appears next to the highlighted statement, indicating the number of highlighted statements.
  • The counter updates in real-time as the user confirms selections or de-selects statements.
  • If the user changes the order of selections, the counters update to reflect the new sequence. For example, if the user selects sentences in the order of 1-2-3, and then deselects 2 and selects it again, the counters would update to 1-3-2.

Note: During the testing phase, we will explore

different variations of the counter design to find the most suitable visual treatment that integrates well with the article text. This may involve adjusting the size, position of the counter or line-height of article text.

4. Changes to existing design

  • Remove "Clear" button which appears along with "Add to story" button instead expand the "Add to story" button from edge to edge as it's the only button we have now.
  • Replace current banner message with the one mentioned in the task here.

Design file

Acceptance Criteria
  1. Tapping on a text:
    • highlights the entire statement.
    • a counter shows at the beginning of the statement.
  2. Tapping on a highlighted text:
    • deselects the entire statement.
    • the highlight counter reduces.
    • the message banner disappears when no text is selected.
  3. Add to story button:
    • becomes activated once a statement is highlighted.
    • becomes deactivated once the last statement is deselected.
Test Scenarios
Open questions

Event Timeline

SGautam_WMF renamed this task from Improve Text Selection for Story Creation to Improve story text selection.Feb 6 2023, 10:46 AM
SGautam_WMF updated the task description. (Show Details)
SBisson triaged this task as Medium priority.
SBisson moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.

Change 928643 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/Wikistories@master] Tap to select/deselect sentence

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

Change 928643 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Tap to select/deselect sentence

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

@SBisson Testing results:

PASSED

  1. Tapping on sentences selects whole sentences.
  2. Tapping on sentences from the top down selects them in order, with a numerical indicator starting at the top.
  3. Tapping on sentences from the bottom up selects them in order, with a numerical indicator starting below.
  4. For a single selection, tapping on it deselects it.
  5. For multiple selections, tapping on any selection deselects it and re-orders the selection number indicators below it.

NEEDS REWORK

image.png (1×686 px, 689 KB)

The sentence selection is based on locating a full stop sign, so it incorrectly identifies sentences that have abbreviations such as i.e., Mr. and others.

vaughnwalters subscribed.

@SBisson Testing results:

PASSED

  1. Tapping on sentences selects whole sentences.
  2. Tapping on sentences from the top down selects them in order, with a numerical indicator starting at the top.
  3. Tapping on sentences from the bottom up selects them in order, with a numerical indicator starting below.
  4. For a single selection, tapping on it deselects it.
  5. For multiple selections, tapping on any selection deselects it and re-orders the selection number indicators below it.

NEEDS REWORK

image.png (1×686 px, 689 KB)

The sentence selection is based on locating a full stop sign, so it incorrectly identifies sentences that have abbreviations such as i.e., Mr. and others.

since since T341989 and T344364 have been filed as follow ups to the NEEDS REWORK portion of this ticket, I am moving this to design sign off.