Page MenuHomePhabricator

88: Convert settings toggles to checkboxes
Closed, ResolvedPublic

Description

Cleaner and simpler

Event Timeline

DannyS712 created this task.Dec 3 2019, 6:46 PM
Restricted Application assigned this task to DannyS712. · View Herald TranscriptDec 3 2019, 6:46 PM
Restricted Application added a project: User-DannyS712. · View Herald Transcript

You read my mind or what? I was going to propose the same!

DannyS712 added a comment.EditedDec 8 2019, 7:02 AM

You read my mind or what? I was going to propose the same!

Do you want to try to do this?

  • Expand the inputs for GlobalWatchlist.OOUI.checkBox to not rely on the checkbox representing a filter (i.e. actually pass id, label, and selected as params) and likewise update the callers
  • Update GlobalWatchlist.OOUI.resetCheckBox to not rely on the checkbox representing a filter (i.e. actually pass id and selected as params) and likewise update the callers
  • Convert current callers of GlobalWatchlist.OOUI.toggleSwitchE to use the new checkBox:
    • Currently, the toggle and the label are separate, this will combine them into the same call to create the checkBox
    • Replace calls to GlobalWatchlist.OOUI.resetToggleSwitch with the updated resetCheckBox
  • Remove resetToggleSwitch and toggleSwitchE methods
Masumrezarock100 added a comment.EditedDec 8 2019, 12:53 PM

As Volker_E said in T236176#5627403,

ToggleSwitches should only be used in settings where instant effect is possible.

So checkbox seems to be a plausible alternative.

Masumrezarock100 added a comment.EditedDec 8 2019, 12:57 PM

Do you want to try to do this?

Nah, I am not really familiar with OOUI input widget and this is too complicated for me. (:

DannyS712 triaged this task as High priority.Dec 8 2019, 10:39 PM
DannyS712 closed this task as Resolved.Dec 8 2019, 10:56 PM

Done in 6.9.0