Page MenuHomePhabricator

[Regression] Changing preferences while JS is loading will disable the save button after loading is finished
Closed, ResolvedPublic

Description

I went to a foreign wiki I have never visited before and as the first step after my account was autocreated there, I went to [[Special:Preferences]] to change the UI language to something I can cope with. With the JS still loading and the page displayed as one big list instead of the tabbed interface, I changed the language; then the JS finished loading and the display switched to a nice tabbed interface… with the Save button disabled, since I modified the setting prior to the script run. So I needed to change something there and back again in order to be able to save the language setting.

Just saying.

In other words: When the javascript is not fully loaded, but you will change some preferences, the check for the button will not see this changes.

Event Timeline

Umherirrender updated the task description. (Show Details)
Umherirrender raised the priority of this task from to Needs Triage.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 12 2015, 2:48 PM
saper added a subscriber: saper.Oct 28 2015, 6:55 PM

To fix this, I would just propose to remove the JavaScript that disables the "Save" button.

I think removing the functionality is not necessary. Couldn't we simply serialize the saved form data in the PHP stage, rather than in the JavaScript stage, and then check if the current form data is the same as the original data once JS is done loading?

Sn1per claimed this task.Oct 28 2015, 10:13 PM

I implemented the original functionality so I should fix this as well...

Did you say "simply" ? :)

I am a bit annoyed by the disabled save button, but now there is actual reason to remove it. I think the use case "my js is loading slow" is more important then the use case "I left my computer on for 5 hours and I am not sure if I saved my preferences".

I will probably start removing some JS code from the preferences, see comments in https://gerrit.wikimedia.org/r/#/c/247728/

Sn1per removed Sn1per as the assignee of this task.Oct 28 2015, 10:47 PM

Did you say "simply" ? :)

meh. "Can't be that hard, right?" *five weeks later* "argh"

I am a bit annoyed by the disabled save button, but now there is actual reason to remove it. I think the use case "my js is loading slow" is more important then the use case "I left my computer on for 5 hours and I am not sure if I saved my preferences".

I will probably start removing some JS code from the preferences, see comments in https://gerrit.wikimedia.org/r/#/c/247728/

Well, I suppose that the disappearing notification should handle most cases of forgetting whether or not the preferences are saved.

demon triaged this task as Normal priority.Nov 2 2015, 7:19 PM
demon moved this task from Backlog to To be fixed on the MW-1.26-release board.

Change 252021 had a related patch set uploaded (by TheDJ):
Revert "Disable Preferences save button before setting change"

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

Change 252021 merged by jenkins-bot:
Revert "Disable Preferences save button before setting change"

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

Change 252029 had a related patch set uploaded (by TheDJ):
Revert "Disable Preferences save button before setting change"

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

TheDJ closed this task as Resolved.Nov 9 2015, 8:34 PM
TheDJ removed a project: Patch-For-Review.
TheDJ moved this task from To be fixed to Done on the MW-1.26-release board.

Change 252029 merged by jenkins-bot:
Revert "Disable Preferences save button before setting change"

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