https://bugzilla.wikimedia.org/show_bug.cgi?id=52542
--- Comment #3 from Helder <[email protected]> --- (In reply to Bartosz DziewoĆski from comment #1) > ... > normalizing values of boolean prefs to true/false just before building this > list (in ResourceLoaderUserOptionsModule#getScript) seems like the best way. +1 for normalizing boolean preferences so that either > mw.user.options.get( 'anyBooleanPreference' ) === true > mw.user.options.get( 'anyBooleanPreference' ) === false and nothing else. The current behavior is ***very*** inconvenient: * If I do not set $wgDefaultUserOptions['usebetatoolbar'] (i.e., if I use WikiEditor's default): - If I don't change the preference mw.user.options.get( 'usebetatoolbar' ) === null - If I enable the preference mw.user.options.get( 'usebetatoolbar' ) === "1" * If I set $wgDefaultUserOptions['usebetatoolbar'] = 1 (as in WMF cluster[1]): - If I don't change the preference mw.user.options.get( 'usebetatoolbar' ) === 1 - If I disable the preference mw.user.options.get( 'usebetatoolbar' ) === "0" (non-empty string == true!) * On English Wikipedia - If I don't change the preference mw.user.options.get( 'usebetatoolbar' ) === 1 - If I disable the preference mw.user.options.get( 'usebetatoolbar' ) === "" (empty string!) [1] https://github.com/wikimedia/operations-mediawiki-config/blob/8178a4994c0137f5171798f3e831c0492c8cbc06/wmf-config/CommonSettings.php#L1641 -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
