Page MenuHomePhabricator

Investigate technical steps required to display embedded preferences as full-screen modals in mobile web [8hr]
Closed, ResolvedPublicSpike

Assigned To
Authored By
Samwalton9-WMF
May 26 2022, 10:21 AM
Referenced Files
F35338688: languages-overlay.gif
Jul 26 2022, 12:29 AM
F35179244: Mobile-01-Tasks Onboarding.jpg
May 26 2022, 1:24 PM
F35179240: Template edit.jpg
May 26 2022, 1:24 PM
F35179242: Screen Shot 2022-05-24 at 15.37 1.jpg
May 26 2022, 1:24 PM
F35178702: iPhone 8 - 101.png
May 26 2022, 10:21 AM
F35178705: iPhone 8 - 97.png
May 26 2022, 10:21 AM
F35178707: iPhone 8 - 99.png
May 26 2022, 10:21 AM
F35178698: image.png
May 26 2022, 10:21 AM

Description

In Special:Preferences, most settings are altered within the primary page, and all preference changes are saved with the Save button:

image.png (255×529 px, 13 KB)

When Preferences is viewed on mobile web, some settings take up a lot of screen space with multiple verbose options to select from. We want to understand the feasibility of including a link in Preferences which would open a full-screen modal to alter a given preference, which has its own Save button.

Example design

  1. Preferences displayed as a list, user clicks "Unspecified"

iPhone 8 - 101.png (667×375 px, 36 KB)

  1. Modal pops up over the top

iPhone 8 - 97.png (667×375 px, 36 KB)

  1. User can change a setting and click Save

iPhone 8 - 99.png (667×375 px, 39 KB)

Clicking the back/cancel button would take the user back to the settings menu without a page reload.

Questions
Since we haven't made a clear decision about whether this is the direction we would like to go, answers to these questions can be high level - we don't need to know the precise technical steps required to implement, just a high level understanding of the feasibility and complexity involved. If this modal system seems too technically complex or infeasible, we can explore other options.

  • How feasible would it be to split some preferences into modals on mobile web?
    • In the MobileFrontend extension, a couple of JS functions (Overlay and OverlayManager) can create an overlay. We can leverage those functions for every preference item we want to show an overlay. If we want to use OOUI, we can use a dialog that acts as a modal.
  • Could we do the same for settings like changing the password or email address, where the settings are currently found on a different Special page?
    • MobileFrontEnd does this with Special:MobileLanguages. When you are using the Minerva skin on desktop or you are in mobile view, you can navigate to an article that is translated in different languages and click on the Languages button in the action bar. Instead of taking you to a separate page, it displays an overlay, added in the mw-overlays-container div.

languages-overlay.gif (510×442 px, 515 KB)

  • Would using this modal system increase the data footprint of Preferences substantially?
    • As discussed in our team check-in today, an OOUI dialog won't increase the data footprint and shouldn't hinder the page's performance.
  • These modals are based on those used elsewhere in mobile web (e.g. in the editor). How easy would it be to re-use these design elements?

Event Timeline

Restricted Application changed the subtype of this task from "Task" to "Spike". · View Herald TranscriptMay 26 2022, 10:25 AM

Different examples of full-screen modals being used elsewhere on mobile web are:

I think I have T311239: Investigate options for changing the mobile web experience far enough along, that this investigation could be started. The "PHP changes in core" section at least gets as far as changing the server side form layout, even if the implementation is not great. The "JS/CSS only" section then implements page-specific client side changes. I think between those two, a developer could get an idea of where to put some PoC code for this task.

Can we embed any special page, like MobileOptions and MobileLanguages do, or is functionality somehow specific to these custom mobile Special pages?

Can we embed any special page, like MobileOptions and MobileLanguages do, or is functionality somehow specific to these custom mobile Special pages?

For Special:MobileLanguages, the Minerva skin has a JS function that hijacks the link and replaces it with an overlay. The name of the function is initButton (very vague name) and it is found here. We could do something similar for other special pages.