Page MenuHomePhabricator

Display all preferences sections and content in mobile preferences when the user has javascript disabled
Open, Needs TriagePublicBUG REPORT

Description

At the moment, navigating to Special:Preferences with javascript disabled displays a non-interactive main menu; no sections will open and no preferences can be changed.

We should support a no-js solution for users with javascript turned off which enables all settings to be changed.

User story
As a Wikipedia user with javascript disabled, I want to change my preferences, so that I can customise my editing experience.

Specs

TBD

Technical information

TBD

Testing and QA steps

  • Disable Javascript in your browser
  • Open MediaWiki from a mobile device / in a mobile-emulated window
  • Navigate to Special:Preferences
  • Test that all settings sections display and preferences can be modified

Acceptance criteria

  • In the MinervaNeue skin on desktop and mobile, preferences can be changed with Javascript disabled.

Event Timeline

We discussed today that we should definitely support no-js, and display all the sections/content in the case that the user isn't using Javascript.

One possible approach: Create the sections as visible, then hide them with js. Instead of the other way around.

@jsn.sherman is going to spend a little time investigating further to figure out the best approach.

Samwalton9 renamed this task from Mobile Preferences silently breaks without JavaScript to Display all preferences sections and content in mobile preferences when the user has javascript disabled.Thu, Jan 19, 3:54 PM
Samwalton9 updated the task description. (Show Details)

Change 881668 had a related patch set uploaded (by Jsn.sherman; author: Jsn.sherman):

[mediawiki/core@master] WIP make mobile preferences work with noscript

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

Test wiki created on Patch demo by JSherman (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/fe288d63db/w

Making the stacked layout work without javascript is a pretty light lift; I already have a patch with a demo up and running. I believe this would be good to go after some more styling and regression checks.

For some reason the two user mute boxes right at the end have a loading bar that never finishes:

Screenshot 2023-01-19 at 17.20.59.png (778×684 px, 40 KB)

In desktop no-js they show as boxes with no additional loading bar

Screenshot 2023-01-19 at 17.21.11.png (1×1 px, 459 KB)

Yes, that's part of the styling I was referring to. I stopped coding at the point where the form was working and navigable.

Gotcha! Great work getting something so functional so quickly!

Test wiki created on Patch demo by JSherman (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/3aeeb1ed77/w

It looks like the nojs style for that widget was not available on mobile, which looks like an oversight to me. Fixed now:
https://patchdemo.wmflabs.org/wikis/3aeeb1ed77/w/index.php?title=Special:Preferences&mobileaction=toggle_view_mobile

Tested browsing the interface and changing/saving some settings:

  • Desktop, javascript
  • Desktop, no javascript
  • Mobile, javascript
  • Mobile, no javascript

All interfaces functioned as intended.

Is it intentional that we lost the horizontal line separators between preferences in the no-js version? I see they're still there between sections, which makes sense, but aren't present between individual settings.

Change 881668 merged by jenkins-bot:

[mediawiki/core@master] Make mobile preferences work with noscript

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