Page MenuHomePhabricator

Impossible to turn off certain BetaFeatures when "Automatically enable all new beta features" is selected
Open, MediumPublic

Description

If "Automatically enable all new beta features" is checked in [[Special:Preferences#mw-prefsection-betafeatures]] and you de-enable one or more beta features and save, the features stay enabled.
They do de-enable if you uncheck "Automatically enable all new beta features" but then you miss this feature. I am sure it wasn't working like that.
At this moment it is not enabling all new beta features but all of them.

[copied the better description from merged 186439]

Event Timeline

Quiddity created this task.Jul 8 2017, 6:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 8 2017, 6:11 PM
TheDJ awarded a token.Jul 11 2017, 3:36 PM

Could not reproduce this bug. @Quiddity: Can you still reproduce?

Yes, with a clean test account, but I've narrowed it down:
This is only a problem if "Automatically enable all new beta features" is also checked.
Plus it effects most other BetaFeatures, such as "New filters for edit review", but not all BetaFeatures (at testwiki, the exceptions are "Page previews" and "New wikitext mode".) I'll accordingly remove the CodeMirror tag here.

Quiddity renamed this task from Impossible to turn off the BetaFeature for Wikitext syntax highlighting to Impossible to turn off certain BetaFeatures when "Automatically enable all new beta features" is selected.Jul 12 2017, 3:38 AM

I've been able to reproduce as well, on enwiki prod.
Steps to reproduce:

  1. Make sure "Automatically enable all new beta features" is checked.
  2. Uncheck any beta feature.
  3. Hit save.
  4. Refresh page a few times.
  5. Tada! Checkbox is checked again.
Niharika triaged this task as Medium priority.Aug 17 2017, 10:18 PM

This is still happening.

TheDJ added a comment.EditedSep 6 2017, 8:29 AM

I'm experiencing this myself, a user on WP:VP/T reported it too (see the dupe), and now another report on WP:HELPDESK.
https://en.wikipedia.org/wiki/Wikipedia:Help_desk#Help_me_disable_Beta_Feature:_Wikitext_syntax_highlighting

This likely also will affect the amount of beta users we have participating in experiments, since people might not be eager to re-enable "Automatically enable all new beta features" after this.

The logic for autoenrollment is here:
https://github.com/wikimedia/mediawiki-extensions-BetaFeatures/blob/1eb308f3c884ebe0325beff0a212f79ff69f0599/BetaFeaturesHooks.php#L224

Basically, if autoenroll influences this, then it seems to me that the value of the preference is not HTMLFeatureField::OPTION_DISABLED and not HTMLFeatureField::OPTION_ENABLED when being queried (aka not '1' or '0').

Another option could be that master/slave lag influences something here ?

If I understand correctly... I think T62747: BetaFeatures: Clicking "Automatically enable ..." should also activate all existing available BetaFeatures was accidentally (?) implemented at some point? Except that it currently takes a single preferences-save for it to reload the page and thus be visible to the user. I.e. to fix it completely: clicking the checkbox should immediately result in all the other checkboxes being marked.

It was discussed back in the feature's early days at https://www.mediawiki.org/wiki/Talk:Beta_Features/Archive_1#Enable_all_features where we concluded that it should do this, and also that we should change the wording of the checkbox's label from

"Automatically enable all new beta features"

into

"Automatically enable all current and new beta features"

to make it explicit.

This is acting as intended, yes, but the interface does indeed suck.

Having some JS to tick and disable all the relevant checkboxes for you would be good, agreed.

Most complicated is that it doesn't "Automatically enable all current and new beta features" – it won't enable features that are marked as never-auto-enable.

Mannivu added a subscriber: Mannivu.Oct 6 2017, 2:25 PM

Wait, I'm an idiot. These are now ButtonInputWidgets, so for the PHP side of things we can "just" call #setLabel() on them. Doesn't get us to an API, however.

(Copying useful comment from merged task)

Just to clarify, you are saying that:

  1. Automatically enable all new beta features checkbox is enabled
  2. "Wikitext syntax highlighting" checkbox is checked
  3. You want to disable "Wikitext syntax highlighting"
  4. You untick "Wikitext syntax highlighting" and hit save
  5. When the page reloads "Wikitext syntax highlighting" is still checked.

And that you would expect one of the below to actually happen:

  1. When "Automatically enable all new beta features checkbox" is enabled, all checkboxes for individual beta features are disabled
  2. When "Automatically enable all new beta features checkbox" is enabled, unchecking a beta feature and saving actually disabled and unchecks that beta feature (also unchecking the Automatically enable all new beta features checkbox option)

All makes sense from my point of view, although I think the part I have left in brackets is probably optional, as the "Automatically enable all new beta features" only talks about NEW features.

I dont think this is related to T177482, as as far as I can tell the code causing that issue is not yet deployed.

I'm facing this issue for quite some time now. I am getting a little frustrated by the inability to disable a beta-feature without having to turn-off "Automatically enable all new beta features". I find this frustrating as I do not like to turn-off "Automatically enable all new beta features" just to disable an existing beta feature as I might forget to enable "Automatically enable all new beta features" back again and might possibly miss a new beta feature just as @TheDJ mentions in his comment.

Soni added a subscriber: Soni.EditedJun 21 2018, 5:43 AM

This is an irritating bug to encounter. It's counter intuitive to say "Automatically enable all new beta features" but imply "Automatically enable all beta features". Not to mention that the UI makes you think you disabled a beta feature, only to have it auto-re enabled.

Personally, I think this makes little sense. I usually like most beta features and want them auto-enabled. But I absolutely hate "New wikitext mode", so want it disabled. This current way guarantees I will not be enabling most/any beta features in the future.

To me, the ideal functionality should be "Automatically enable all new beta features". Anything currently unchecked will remain unchecked. Any new beta features added will be auto-enabled.

Here's what I think is a sensible thing to do: If a user unchecks a beta feature, then we should automatically uncheck the "Automatically enable all new beta features" checkbox. If they check it, all the checkboxes become checked again.

Here's what I think is a sensible thing to do: If a user unchecks a beta feature, then we should automatically uncheck the "Automatically enable all new beta features" checkbox. If they check it, all the checkboxes become checked again.

That sounds sensible only if the checkbox is labelled as "Automatically enable all beta features" instead of "Automatically enable all new beta features" as @Soni points out.

Soni added a comment.Jun 21 2018, 7:03 PM

That sounds sensible only if the checkbox is labelled as "Automatically enable all beta features" instead of "Automatically enable all new beta features" as @Soni points out.

Plus, I think the checkbox should be "new features" and not "all features". Because there's no reason why someone should be opting out of all future beta features only because they find one of them unworkable. Logically, it makes sense for the checkbox to consider all future beta features, not all beta features ever.

Change 502643 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/BetaFeatures@master] Visually signal that the auto-enrolled featured are set that way

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

Change 502643 merged by jenkins-bot:
[mediawiki/extensions/BetaFeatures@master] Visually signal that the auto-enrolled featured are set that way

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