Page MenuHomePhabricator

Font size and section expansion option order are nondeterministic
Closed, DeclinedPublic

Description

Repro

  1. Visit http://localhost:8080/w/index.php?title=Special:MobileOptions in mobile view.
  2. Hard reload several times or add an artificial delay to mobileoptions#initLocalStorageElements() (e.g., a console.log('foo')).

The issue is present on the specialpages branch. I was unable to repro this issue in production.

Expected

Settings order is deterministic.

Actual

Sometimes expand all is on top of the font size changer and other times on the below it:

localhost_8080_w_index.php_title=Special_MobileOptions(iPhone X) (1).png (2×1 px, 224 KB)
localhost_8080_w_index.php_title=Special_MobileOptions(iPhone X).png (2×1 px, 224 KB)

Event Timeline

My interpretation is that the UI elements are in different modules and blindly insert themselves above the save button. This means that the visual order is dependent on module load order with the last load appearing furthest down.

@Niedzielski is this in the specialpages or master branch
Both addExpandAllSectionsToForm and addFontChangerToForm (which add the UI elements) are synchronous in the master branch.

@Jdlrobson, ah, I believe this was in specialpages as I was working on T183493 when I uncovered it. I'll update the description.

@Niedzielski the screenshots show the old design - are you sure your specialpages branch is up to date and is applied on both MobileFrontend and Minerva?

Not an issue in specialpages HEAD. Thanks @Jdlrobson!