Written below are the notes from a meeting with Andrew, Erik, S, Nick and Danny, where we sketched out the basic structure. There are still some questions to resolve.
* * * * *
**Enable**
We will create a special page to enable Flow on a page/set of pages. This will create a revision that changes the contentmodel of the page to "flow-board" . It will replace the $wgFlowOccupyPages whitelist of pages in PHP.
- The user right for this special page determines who can do this
- initially restricted to Flow team, eventually wiki admins get the right.
- If the page already exists, the Special page
- it will move it to a default archive subpage location, https://trello.com/c/5hVDK1XP. (And auto-protect it? What if the namespace doesn't support subpages?)
- it will add a link to the archive to the header, https://trello.com/c/l48SFDNU
- option to put the wikitext of existing page that's above the first heading ("section 0") into the new Flow board header
- It needs to report in detail any problems it has, e.g. "Enabled Flow on Talk: *Some Page* but did not archive existing wikitext content (failure *Xxxx*)"
**Disable**
Similar to enabling, we will create a special page to *disable* Flow on a page/set of pages. This will create a revision that changes the contentmodel of the page back to "wikitext".
- The user right for this special page determines who can do this
- initially restricted to Flow team, eventually wiki admins get the right.
The new wikitext revision of the Flow page would contain the Flow board converted back to text. There are two forms it could take:
- The script Flow/maintenance/convertToText.php that converts Flow board to wiki text. [Sample conversion](http://ee-flow.wmflabs.org/wiki/Talk:Flow/test_conversion)
- A variant of this script that outputs the Flow board header followed by a list of links to the Topic: *UUID* pages, maybe with summary information.
**Issues**
- What are the URLs of these page?
- Our logic for choosing archive pages (for the moved wikitext) is still [un-internationalized and hard-coded](https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FFlow.git/2367e7b011343e08c045300e957c6d44ae45e636/includes%2FImport%2FWikitext%2FConversionStrategy.php#L92) ({T93395}).
- Do they take one page or a list of pages?
- When enabling, what happens if Flow is disabled: we have [a script](https://trello.com/c/VKUbFqBW/37-5-disable-flow-fix-in-wmf11) (which needs to be updated for API changes) to convert a Flow board to wikitext, and/or the Flow version could be moved to a Talk:_SomePage_/FlowArchive
- ~~When enabling a page, what happens if Flow is already enabled $wgFlowOccupyNamespaces ? It's redundant and a rare scenario, but this is the only way to archive existing wiki text.~~ (wgFlowOccupyNamespaces doesn't cover subpages, which is where the LQT archive pages should be).
- How does disable relate to $wgFlowOccupyNamespaces? E.g. if Flow is enable on User_talk: can it still be disabled for a particular page? For a subpage like User_talk:Brandon/My_experiment ?
- Moving a Flow board implicitly enables Flow at the new name, so permissible moves need to match the policy.
- How does disable relate to $wgFlowOccupyNamespaces? E.g. if Flow is enabled on User_talk: can it still be disabled for a particular page?
- Is $wgFlowOccupyPages obsolete after this change?
- How do we deal with Redirects? (Page-Moving an active Flow board will need to leave redirects behind.)
Part of https://trello.com/c/0VP635yr/
This bug tracks dependencies with other bugs.
--------------------------
**Version**: master
**Severity**: normal