Page MenuHomePhabricator

Allow story readers to change text size
Closed, ResolvedPublic

Assigned To
Authored By
EUdoh-WMF
Jul 21 2022, 5:54 PM
Referenced Files
Restricted File
Nov 17 2022, 10:55 PM
Restricted File
Nov 17 2022, 10:54 PM
F35643540: 🔣 LHS Icon.svg
Oct 27 2022, 5:39 PM
F35643535: 04. Small selected.png
Oct 27 2022, 5:39 PM
F35643531: 03. Large selected.png
Oct 27 2022, 5:39 PM
F35643517: 02. Regular selected.png
Oct 27 2022, 5:39 PM
F35535337: Small 90%.png
Sep 26 2022, 6:48 PM
F35535336: 04. Small selected.png
Sep 26 2022, 6:48 PM

Description

Description/User Story

As a user reading a Wikistory, I want to change the story text size so that I can read the story in my preferred text size.

Design

CSS related change
Change .ext-wikistories-viewer-container-content-story-text

From
Text-size: 18px
To
Text-size: 100%

Design change starts from here

Overflow menu.png (780×360 px, 203 KB)
  • On a story viewer, Add a text change option in the over flow menu(3 dots).
  • Change the order of menu items as following
    • Change text size
    • Edit this story
    • Share your feedback
02. Regular selected.png (780×360 px, 106 KB)
  • A tap on the menu item opens a dialog with different options. By default, “Regular” option is selected.
  • Users can only select one option from three options.
  • Users can close the dialog box by tapping on the close icon or outside of it.
Regular selectedText box
02. Regular selected.png (780×360 px, 106 KB)
Regular 100%.png (780×360 px, 384 KB)
  • Selection of Regular will keep the text size to 100%
Large selectedText box
03. Large selected.png (780×360 px, 106 KB)
Large 120%.png (780×360 px, 380 KB)
  • Selection of Large will increase the text size to 120%.
Small selectedText box
04. Small selected.png (780×360 px, 106 KB)
Small 90%.png (780×360 px, 380 KB)
  • Selection of Small will reduce the text size to 90%.
  • Don’t change the story text size in real-time while users switch between text size options.
  • Change it when users confirm their selection after tapping on the "Ok" button.
  • The cancel button will discard any new selection and keep the previously selected value for text size.
  • Preserve the text size option when users read follow-up stories. If possible, keep text size preference when they read any stories in future too.
  • Don’t change the maximum height of the text box when users select Large text size; however, reduce it when a user selects small text size to avoid showing empty white space.
  • Maintain text box's current padding value from the license.

Design file

Acceptance Criteria
  1. There should be an editing functionality, similar to what shows when editing a wiki page.
Test Scenarios
  1. Each editing functionality per component should be tested.
  2. The maximum height of the text box remains unchanged.
  3. All original text should show in the text box no matter the size (no truncations).
  4. The fading feature should be preserved (when the text content is scrolled all the way up or all the way down.
  5. Browser compatibility testing.
  6. Check Console in the browser developer tools for any errors during text size rendering.
Open questions
  1. Would we have an exact replication of the editing toolbar or a minimized version?

Story viewer: Story text sizing (S,M,L)

Event Timeline

SGautam_WMF renamed this task from Formatting text in StoryBuilder to Allow story readers to change text size.Sep 26 2022, 6:35 PM
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.

@SGautam_WMF could you share the icon for the menu item please

@SBisson updated the task with icon file also updated mockups to reflect the right icon inside the menu item.

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

[mediawiki/extensions/Wikistories@master] Viewer: change text size

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

Change 852263 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Viewer: change text size

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

Tests passed:

Chrome v106, Safari v16, Firefox v106

  1. The text zoom ratios are 90:100:120 for Small:Regular:Large
  2. The maximum size of the text area is preserved.
  3. The text fading feature is preserved when scrolling to the start or end of the text area.

@SBisson
**Inconsistencies:

Users can close the dialog box by tapping on the close icon or outside of it.

  1. Users cannot dismiss the modal by tapping outside of it.
  2. On an android device Redmi Note 10 Pro (Android 12), I noticed the text fade is not present when the user scrolls down to the end of the text section. It is however present when the user scrolls to the top of the text area. On an iPhone, the fade works perfectly.

Video

[...]

Users can close the dialog box by tapping on the close icon or outside of it.

  1. Users cannot dismiss the modal by tapping outside of it.

Our standard dialog box doesn't do that so I decided to skip it.

  1. On an android device Redmi Note 10 Pro (Android 12), I noticed the text fade is not present when the user scrolls down to the end of the text section. It is however present when the user scrolls to the top of the text area. On an iPhone, the fade works perfectly.

I don't think this is related to the text size feature. Could you file it as a separate bug?

Great. Moving this for sign-off.

I forgot to mention that the Cancel button feature also works as expected!

We will take care of minor css related improvements in other task (T325820) and moving this task to design signoff column.