Page MenuHomePhabricator

Make function view page implementation and test tables mobile friendly
Closed, ResolvedPublic

Authored By
JKieserman
Jun 8 2022, 2:04 PM
Referenced Files
F35550344: Screenshot from 2022-10-06 14-07-50.png
Oct 6 2022, 12:54 PM
F35550342: Screenshot from 2022-10-06 14-22-26.png
Oct 6 2022, 12:54 PM
F35550339: Screenshot from 2022-10-06 14-43-59.png
Oct 6 2022, 12:54 PM
F35520430: Screenshot from 2022-09-14 15-19-53.png
Sep 14 2022, 3:15 PM
F35520428: Screenshot from 2022-09-14 15-20-04.png
Sep 14 2022, 3:15 PM
F35520426: Screenshot from 2022-09-14 16-16-46.png
Sep 14 2022, 3:15 PM
F35514461: image.png
Sep 9 2022, 8:33 AM
F35514457: image.png
Sep 9 2022, 8:33 AM
Tokens
"Love" token, awarded by AAlhazwani-WMF.

Description

Test Cases

Test scenarios (under the "Details" tab):

The tests have been conducted on an iPhone SE (2nd gen). The screen size is 375x667px.

Design review

We identified a couple of areas where we might want to improve the table experience on mobile web.

A1 Table Header

The buttons are overflowing outside the table header. They are also visible by default but they should be visible only when one or more table rows are selected.

image.png (668×376 px, 67 KB)

A2 Spacing

We can optimize the spacing to make the most out of the little real estate available on small screens.

image.png (1×910 px, 151 KB)

A3 Dimensions

We can set a default max-width for table columns, and truncate text when content is longer than the available space. We're aware that this solution is not ideal but it's a compromise for the time being.

image.png (1×752 px, 151 KB)

A4 Scroll

When the table is scrollable it shall not increase the bottom padding or margins.

image.png (1×794 px, 143 KB)

A5 Select

When a table row is selected, the row background color should be highlighted. This is particularly useful when you scroll the table to approve and/or deactivate implementations and/or tests.

image.png (1×832 px, 163 KB)

B1 Empty tables

When there is no content available the placeholder text should wrap inside the table and not scroll off-the-screen.

image.png (1×928 px, 159 KB)

C1 Pagination

It seems that the pagination layout is broken. And the input field board is missing around "1".

image.png (1×794 px, 176 KB)

Design proposals

A design proposal for all the above described issues has been drafted in Figma https://www.figma.com/file/pY72Gsdj7dZ2c6nD4G3W8G/Function-viewer%3A-Mobile-tables?node-id=0%3A1. For any question, suggestion, or doubt feel free to leave a comment here or on Figma.

Event Timeline

AAlhazwani-WMF renamed this task from make function view page implementation and test tables mobile friendly to Make function view page implementation and test tables mobile friendly.Sep 9 2022, 8:33 AM
AAlhazwani-WMF changed the task status from Open to In Progress.
AAlhazwani-WMF updated the task description. (Show Details)

Change 831931 had a related patch set uploaded (by AdesojiThisDot; author: AdesojiThisDot):

[mediawiki/extensions/WikiLambda@master] Make function view page implementation and test tables mobile friendly

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

Just one more question, there seems to be a restriction with the test name text that forces that to be 244px. This means that when all the names are smaller, there's a gap that maybe is not the best use of space.

Some supporting images:

Screenshot from 2022-09-14 16-16-46.png (940×1 px, 353 KB)

Seen in a small screen (appears that's the only content in the table, unless you intentionally scroll right, you won't see there's more content):

Screenshot from 2022-09-14 15-20-04.png (831×391 px, 33 KB)

Same as above but without the restriction (the rest of the horizontal table peeks in, so the user might have the intuition to scroll)

Screenshot from 2022-09-14 15-19-53.png (827×387 px, 42 KB)

Just one more question, there seems to be a restriction with the test name text that forces that to be 244px. This means that when all the names are smaller, there's a gap that maybe is not the best use of space.

+1, I would make the column width set to a max-width of 240px, not a fixed width of 240px. I tried to specify it here on Figma. @AdesojiThisDot feel free to let me know how I can make this clearer for the future!

Change 831931 merged by Genoveva Galarza:

[mediawiki/extensions/WikiLambda@master] Make function view page implementation and test tables mobile friendly

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

I'm reopening this issue as there are some missed things that we may want to address to improve the experience of tables on mobile web. I've recorded a couple of videos to highlight where we have an opportunity to get closer to the desired result. We don't have to use the exact CSS rules or properties as the one I'm using in the videos, I'm just tweaking things to display the desired solution.

Default view https://m.wikifunctions.beta.wmflabs.org/wiki/Z10109?view=function-viewer
Video: https://www.loom.com/share/fca9a079534b499ead1d01b08cbf3db7

Empty tables https://m.wikifunctions.beta.wmflabs.org/wiki/Z10031?view=function-viewer
Video: https://www.loom.com/share/7fc6462edbb5418ca25412d22e8e1571

Pagination https://m.wikifunctions.beta.wmflabs.org/wiki/Z10014?view=function-viewer
Video: https://www.loom.com/share/6e40e38323f1451fb42f655b1a002675

Here's also the Figma file with all the detailed changes https://www.figma.com/file/pY72Gsdj7dZ2c6nD4G3W8G/Function-viewer%3A-Mobile-tables?node-id=0%3A1. If you have any feedback on how I can improve the design specs, and make them more clear and actionable, please send any suggestion my way! Many many thanks!

Change 838110 had a related patch set uploaded (by AdesojiThisDot; author: AdesojiThisDot):

[mediawiki/extensions/WikiLambda@master] Table UI Cleanup mobile

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

Looking at Amin's videos and figma files, I think there's still some issues to fix. Here's the list of all the mentioned issues and their state

Video 1: default behavior

  • margins paddings and heights not consistent between header and rows
    • header is still height 50px and total row height 53px
  • on select checkbox, header increases in height
  • text baseline between cell texts
    • baseline is not the same (see screencap below)
  • all table cell separation (right) to 24
  • inside chip, make side paddings the same (8px)
  • in titles, truncate not between words but also inside words

Video 2: empty tables:

  • placeholder text not sharing the same padding as table header (set placeholder to 16)

Video 3: pagination:

  • on select, display buttons and hide title: as discussed with the team, title is being hidden when any (one or more) buttons are displayed
  • same row height
    • as shared above, header 50 and row 53
  • (i) RUNNING (x) on same line
  • (i) RUNNING (x) with same padding right
  • pagination input field, missing border
  • pagination input field, fix buttons width and separation

Added to this, looking at the figma files, I can see the following discrepancies:

  • Text "Running", "Failed" (and "Success" as well I imagine) instead of fully uppercase "RUNNING", etc.
  • Baseline alignment between cells seems off here as well. Looking at the designs, the text "Running" should be aligned with the texts of other cells, and when the icons are larger they should go beyond that baseline

Figma design:

Screenshot from 2022-10-06 14-43-59.png (477×403 px, 28 KB)

Currently:

Screenshot from 2022-10-06 14-22-26.png (512×447 px, 50 KB)

Screenshot from 2022-10-06 14-07-50.png (817×452 px, 73 KB)

Change 838110 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Table UI Cleanup mobile

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