Page MenuHomePhabricator

Investigate how to retain Discussion tools beta feature when some sub-features are fully deployed
Closed, ResolvedPublic

Description

This task is about investigating if and how we can make it so the Discussion tools beta feature can remain available/visible in Beta Features [i] on a given wiki where some of the Discussion tools' sub-features are available by default.

Background

As we unearthed in T270119#6745654, when any one of the Discussion Tools beta feature's sub-feature [i] is made available as an opt-out setting, the Discussion Tools beta feature is removed from Special:Preferences#mw-prefsection-betafeatures.

This is problematic because it [currently] means it will not be possible for some Talk page project features [ii] to be available as beta features and others as opt-out settings.

Requirements

  • The Discussion tools beta feature is visible in Special:Preferences#mw-prefsection-betafeatures regardless of how its sub-features [ii] are deployed on a given wiki

Behavior

  • Scenario A: for people who 1) enable the Discussion tools beta feature to gain access to Sub-feature A and 2) Sub-feature A is "graduated" to be an opt-out setting:
    • The Discussion tools beta feature will not appear in Special:Preferences#mw-prefsection-betafeatures
    • Sub-feature A will appear in Special:Preferences#mw-prefsection-editing
    • These peoples' choice to enable the Discussion tools beta feature will be remembered indefinitely
  • Scenario B: for people who 1) enabled the Discussion tools beta feature to gain access to Sub-feature A, 2) Sub-feature A is "graduated" to be an opt-out setting AND 3) `Sub-feature B is introduced as a beta feature:
    • The Discussion tools beta feature will re-appear enabled in Special:Preferences#mw-prefsection-betafeatures
    • Sub-feature A will appear in Special:Preferences#mw-prefsection-editing
    • Sub-feature B will appear in Special:Preferences#mw-prefsection-editing

Done

  • The ===Behavior above is implemented OR we have documented the reasons why this ===Behavior cannot be implemented.

i. https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-betafeatures
ii. E.g. Reply Tool, New Discussion Tool, Visual enhancements

Event Timeline

Making the beta feature available/visible is easy, just… don't disable it ($wgDiscussionToolsBeta = true;), and make each sub-feature available regardless of the beta feature ($wgDiscussionTools_replytool = 'available';, etc.). We implemented these separate config options for each sub-feature recently in T270121.

I though we wanted to make it invisible but still existing, to avoid the user's settings being cleared automatically – which would also be easy enough by registering an api (hidden) preference with the same name when the beta feature is disabled.

I agree, I don't think the beta feature needs to be visible if it does nothing, we just don't want it to wipe a user's previous preference.

Change 656277 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Preserve a user's beta preference when not in beta

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

I though we wanted to make it invisible but still existing, to avoid the user's settings being cleared automatically – which would also be easy enough by registering an api (hidden) preference with the same name when the beta feature is disabled.

I agree, I don't think the beta feature needs to be visible if it does nothing, we just don't want it to wipe a user's previous preference.

@matmarex + @Esanders: I think I agree with what y'all are saying above. To be sure, can you please confirm the patch above [i] will work as follows:

  • Scenario A: for people who 1) enable the Discussion tools beta feature to gain access to Sub-feature A and 2) Sub-feature A is "graduated" to be an opt-out setting:
    • The Discussion tools beta feature will not appear in Special:Preferences#mw-prefsection-betafeatures
    • Sub-feature A will appear in Special:Preferences#mw-prefsection-editing
    • These peoples' choice to enable the Discussion tools beta feature will be remembered indefinitely
  • Scenario B: for people who 1) enabled the Discussion tools beta feature to gain access to Sub-feature A, 2) Sub-feature A is "graduated" to be an opt-out setting AND 3) `Sub-feature B is introduced as a beta feature:
    • The Discussion tools beta feature will re-appear enabled in Special:Preferences#mw-prefsection-betafeatures
    • Sub-feature A will appear in Special:Preferences#mw-prefsection-editing
    • Sub-feature B will appear in Special:Preferences#mw-prefsection-editing

i. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/656277/

Change 656277 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Preserve a user's beta preference when not in beta

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

Yes

Okay, great. Thank you for confirming.

ppelberg claimed this task.

I am assuming this patch is working as expected and this ticket can be resolved considering:

  • I've been able to verify Scenario B (described in the task description) is working as expected (see "Testing steps" below).
  • Engineering has verified Scenario A (described in the task description) is working as expected

@matmarex, if either of the above is not true, please re-open this task and comment as much.


Testing steps

  1. Visit a wiki where the Reply Tool is available as an opt-out preference and the New Discussion Tool is available as a beta feature (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page)
  2. Visit Special:Preferences#mw-prefsection-betafeatures (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences#mw-prefsection-betafeatures)
  3. ✅Notice the Discussion tools beta feature is listed