Page MenuHomePhabricator

Opt-in for Flow on your own user talk page
Closed, ResolvedPublic

Assigned To
Authored By
DannyH
May 6 2015, 12:27 AM
Referenced Files
F629360: flow-ltr.svg
Aug 6 2015, 3:46 PM
F629784: flow-icon.svg
Aug 6 2015, 3:46 PM
F629361: flow-rtl.svg
Aug 6 2015, 3:46 PM
F540213: opt-in 2 notification.jpg
Aug 5 2015, 11:03 PM
F536340: opt-in 1 beta.jpg
Aug 5 2015, 11:03 PM
F278302: beta-graph.png
Jul 28 2015, 11:12 AM
F163500: enable-flow-settings.png
May 11 2015, 11:53 AM
F163502: enable-flow-invite.png
May 11 2015, 11:53 AM
Tokens
"Love" token, awarded by Trizek-WMF."Love" token, awarded by Shizhao.

Description

There are several projects that are willing to offer Flow as opt-in on user talk pages -- Catalan, French, Hebrew, possibly Wikidata.

Switching Flow ON for your user talk page would be the same as using Special:EnableFlow. The wikitext page is moved to /Archive 1+, and the Flow board is created in its place.

Switching Flow OFF would move the Flow board to /Archive Flow 1, and the most recent wikitext page would move back.

Going back and forth, the wikitext archive and Flow archive are swapped -- we're not creating new Flow boards every time.

See Pau's prototype for the model.

Beta features page

Heading: Flow on user talk
Text: Enables a new structured discussion system on your user talk page. Flow simplifies talk page discussions with clear places to write and reply, and allows conversation-level notifications. Existing wikitext discussions are moved to an archive. Disabling this feature will move the Flow page to a subpage, and un-archive the previous talkpage. This feature is not auto-enabled; users will have to enable it separately.

On each wiki, the "information" link should point to that wiki's version of Project:Flow, and "discussion" to Project_talk:Flow.

Clicking the Save button on the Beta features page triggers the Flow board creation and wikitext archive.

This feature will NOT be automatically enabled, even if the user has "Automatically enable all new beta features" checked.

opt-in 1 beta.jpg (610×677 px, 199 KB)

Notification

When the user presses save, they get a notification, as seen in the mockup:

New discussion system enabled
on your user talk page
Available at User talk:Username

The notification links to the user talk page.

opt-in 2 notification.jpg (314×921 px, 140 KB)

On the user talk page, the user will see a three-step modal "guided tour"; that spec is in T108266: Opt-in: Guided tour on user talk for first visit to new Flow board

Templates with archive links

When a wikitext page converts to Flow, we add a template on two pages:
On the archived wikitext page, we add {{Archive for converted wikitext talk page}} at the top
On the new Flow page, we add {{Wikitext talk page converted to Flow}} in the side rail

When a user disables Flow and moves back to wikitext, we should remove those templates automatically.
If somebody has edited either page in a way that makes the template unrecognizable, then it won't be removed. The person who edited the page can edit it again, if they want to.

Text for email notification

Title: New discussion system on User talk:Name

Text:

Flow, the new wiki discussion system, has been enabled on your user talk page on {{SITENAME}}.

You can get more information, provide feedback or disable the new system any time from the Beta features section in your preferences.

Button text: View user talk page

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 233066 merged by jenkins-bot:
Use placeholder HTML rather than rendering the board in getParserOutput

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

Change 233881 merged by jenkins-bot:
Have Flow depend on BetaFeatures

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

Just curious, does this affect non-Wikimedia wikis using Flow (without having BetaFeatures, which are specific to Wikimedia)?

On each wiki, the "information" link should point to that wiki's version of Project:Flow, and "discussion" to Project_talk:Flow.

We probably want something similar like the auto-installing templates? Otherwise I'm willing to bet we'll forget to create these at some point :)

It would be great to have some screenshots here of the current status (or some instructions on how to trigger the guided tour) in this ticket.

Just curious, does this affect non-Wikimedia wikis using Flow (without having BetaFeatures, which are specific to Wikimedia)?

BetaFeatures is not specific to Wikimedia. It is FOSS (GPLv2+), supported in MediaWiki-Vagrant, and anyone can install it.

Also, this should work fine without BetaFeatures (it's an optional flag, and the hooks will either behave fine or not be called if BetaFeatures is not installed).

On each wiki, the "information" link should point to that wiki's version of Project:Flow, and "discussion" to Project_talk:Flow.

We probably want something similar like the auto-installing templates? Otherwise I'm willing to bet we'll forget to create these at some point :)

Can we instead change the requirement, and link to MediaWiki.org for the information/discussion links? That's what all the ones on English Wikipedia do.

Oh, I see your question is specifically in regards to the "Have Flow depend on BetaFeatures" MediaWiki-Vagrant commit.

MWV is primarily a development environment, and the Flow Beta Feature is now automatically installed and enabled there. However, someone could still override this to turn it off on their MWV wiki.

Change 235003 had a related patch set uploaded (by Matthias Mullie):
Whitelist Flow opt-in on user talkpage as BetaFeature

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

Change 230648 merged by jenkins-bot:
Beta feature Flow on user talk page

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

Change 233868 merged by jenkins-bot:
Activate guided tour from opt in process

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

There are some problems with opting-out.

Straighforward scenario

  1. Create a User talk page and enter some text
  2. Then enable "Flow on user talk" in Preferences - Beta
  3. User talk page is converted to Flow without any problem. The previous page content is archived at User_talk:username/Archive_1
  4. Go back to Preferences - Beta and disable "Flow on user talk" . The User_talk page keeps displaying Flow board and all Flow board's functionality is there.

    deployment-fluorine /a/mw-log/exception.log consistently displays the following error :

2015-09-07 17:45:44 deployment-mediawiki02 enwiki exception ERROR: [da2719b3] /wiki/Special:Preferences Flow\Exception\FlowException from line 88 of /srv/mediawiki/php-master/extensions/Flow/includes/BoardMover.php: Main discussion workflow for 127519 not found {"exception":"[Exception Flow\\Exception\\FlowException] (/srv/mediawiki/php-master/extensions/Flow/includes/BoardMover.php:88) Main discussion workflow for 127519 not found\n[stacktrace]\n#0 /srv/mediawiki/php-master/extensions/Flow/Hooks.php(1587): Flow\\BoardMover->prepareMove(integer, Title)\n#1 /srv/mediawiki/php-master/includes/Hooks.php(204): FlowHooks::onTitleMove(Title, Title, User)\n#2 /srv/mediawiki/php-master/includes/MovePage.php(231): Hooks::run(string, array)\n#3 /srv/mediawiki/php-master/extensions/Flow/includes/Import/OptInController.php(137): MovePage->move(User, NULL, boolean)\n#4 /srv/mediawiki/php-master/extensions/Flow/includes/Import/OptInController.php(112): Flow\\Import\\OptInController->movePage(Title, Title)\n#5 /srv/mediawiki/php-master/extensions/Flow/includes/Import/OptInUpdate.php(50): Flow\\Import\\OptInController->disable(Title)\n#6 /srv/mediawiki/php-master/includes/deferred/DeferredUpdates.php(119): Flow\\Import\\OptInUpdate->doUpdate()\n#7 /srv/mediawiki/php-master/includes/MediaWiki.php(706): DeferredUpdates::doUpdates(string)\n#8 /srv/mediawiki/php-master/includes/MediaWiki.php(526): MediaWiki->restInPeace(string)\n#9 [internal function]: Closure$MediaWiki::doPostOutputShutdown()\n#10 {main}\n"}

cucumber features/opt_in.feature:30 works locally but exposes the issue mentioned above on beta.

Text for email notification

Title: New discussion system on User talk:Name

Whether a "User talk" in Title, Button text can be with GENDER ?

Change 237614 had a related patch set uploaded (by Matthias Mullie):
Add GENDER support for opt-in Echo messages

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

Just pushed a new commit to add more GENDER support for Echo notifications.

Opt-out issues can be ignored here - we already have a separate ticket for that: T111830: Fix toggling Flow to false in BetaFeatures (opt-out)

Change 237614 merged by jenkins-bot:
Add GENDER support for opt-in Echo messages

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

Checked in betalabs for enabling 'Flow on user talk' option by

  • a new user with previously non-existing User talk page
  • a user that has some content on User talk page - the page is properly archived and the link is placed in the page's Board description

Moving to Product Review since opt-out feature is split from this ticket as T111830: Fix toggling Flow to false in BetaFeatures (opt-out).

MediaWiki:Flow-notification-link-text-enabled-on-talkpage Here need $1 too for gender to user

MediaWiki:Flow-notification-link-text-enabled-on-talkpage Here need $1 too for gender to user

Filed as T113784: GENDER support for Flow-notification-link-text-enabled-on-talkpage.

Change 235003 abandoned by Matthias Mullie:
Whitelist Flow opt-in on user talkpage as BetaFeature

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

I wonder how many bots and user scripts that attempt to leave messages on users' talk pages will be broken by this?

A typical workflow for such a bot/script might be:

  1. Test if the page contains the message already (or contains some other message, such as enwiki's progressive warning templates), to avoid flooding.
    1. This might be done by looking at section headers, comments included in the warning, [[https://en.wikipedia.org/w/api.php?modules=query+links|prop=links]], etc.
    2. Some may specifically state how to remove whatever it is the bot looks for (e.g. "remove the comment" or "remove or retitle this section") to enable further bot-messages on the topic.
  2. Check if the page's wikitext contains something like "{{bots|optout=NotificationType}}" to allow individual users to opt out of bot notifications of a particular type.
  3. Add a new section to the talk page with the content of the message.

How can the above be correctly accomplished on a Flowified talk page? I could probably figure out #3 on my own, but the other steps seem difficult. An announcement should be sent to the mediawiki-api mailing list with such instructions.

I wonder how many bots and user scripts that attempt to leave messages on users' talk pages will be broken by this?

We've been working and communicating about it for a while. Pywikibot and MessagePoster (in core) provide the main support needed.

A typical workflow for such a bot/script might be:

  1. Test if the page contains the message already (or contains some other message, such as enwiki's progressive warning templates), to avoid flooding.
    1. This might be done by looking at section headers, comments included in the warning, [[https://en.wikipedia.org/w/api.php?modules=query+links|prop=links]], etc.

prop=links will work. However, Flow is based on an endless list of topics, each of which is there own page. So to use that method it would need to loop through a set of recent enough topics (e.g. 25) then combine them into a prop=links request, e.g. https://www.mediawiki.org/w/api.php?action=query&titles=Topic:Sojpiv245cuiw67c|Topic:Sojs3simnwvh96fk&prop=links . pywikibot has support for looping through topics.

  1. Check if the page's wikitext contains something like "{{bots|optout=NotificationType}}" to allow individual users to opt out of bot notifications of a particular type.

This can be done with view-header, but I don't think pywikibot has support for that yet (but it can be done directly).

Is there a version of prop=links that includes templatelinks (or better yet, a way to *just* check what templates PageX transcludes)

  1. Add a new section to the talk page with the content of the message.

Pywikibot supports this now. See https://www.mediawiki.org/wiki/Manual:Pywikibot/Flow . On-wiki scripts can use MessagePoster to create topics without needing to know whether it's wikitext or Flow.

How can the above be correctly accomplished on a Flowified talk page? I could probably figure out #3 on my own, but the other steps seem difficult. An announcement should be sent to the mediawiki-api mailing list with such instructions.

Done.

In T98270#1686822, @Mattflaschen wrote:
  1. Check if the page's wikitext contains something like "{{bots|optout=NotificationType}}" to allow individual users to opt out of bot notifications of a particular type.

This can be done with view-header, but I don't think pywikibot has support for that yet (but it can be done directly).

Is there a version of prop=links that includes templatelinks (or better yet, a way to *just* check what templates PageX transcludes)

prop=remplates, but that won't actually work for enwiki's "{{bots|optout=NotificationType}}" since the bot needs to check the content of the "optout" parameter. And the usual semantics are that it has to be directly on the page, transclusion doesn't count.

An announcement should be sent to the mediawiki-api mailing list with such instructions.

Done.

I should have said mediawiki-api-announce. I'll forward it.

Thanks!

Please don't mark tasks fixed when they have open blockers. Either the blockers are invalid and should be removed (not the case here), or they should be done.

T111098: Run FlowCreateTemplates.php on all Flow-enabled wikis in production should have been done in this case (which is also coincidentally needed for T106302: Convert LQT->Flow on se.wikimedia.org).

All Blocked- by issues and other outstanding issues are fixed.