Flow/Architecture/URLs


 * See Help:Flow/Glossary for an explanation and diagram of boards and topics and posts.

Flow URL summary
A Flow board is a wiki page, but it is not a static piece of wikitext. It is a window onto the topics that users started on it. Flow boards are usually in one of the "talk" namespaces. For example http://www.mediawiki.org/wiki/Talk:Beta_Features/Hovercards. In a wiki link use the end of this,

Starting with 1.24wmf14, you can link to a particular topic using its URL in the Topic: namespace. From a topic's action menu choose Permalink and copy the Link location, e.g. http://www.mediawiki.org/wiki/Topic:Rxp4iwrpby2ohtjb. In a wiki link, use

You can link to a post within a topic. From a post's action menu choose Permalink to copy the link location, e.g. http://www.mediawiki.org/wiki/Topic:Rxp4iwrpby2ohtjb#flow-post-rynqja9dnthggjf5. (You can see that this loads a topic with a fragment identifier appended to scroll to a particular topic.) In a wiki link, use

Some actions work with a Flow board or Flow topic: But many actions don't work with a Flow board or Flow topic: You can preload a Flow topic title by adding  to the URL. You can preload the Flow post area with the contents of some page with, [ for example] this preloads with "Test preloaded title" and post body from User:SPage_(WMF)/Flow_post_stub.
 * (the default)
 * etc.
 * etc.
 * etc.

Flow boards are pages
A Flow board is a special kind of wiki page (internally it has a special "content model"). It is a window into an unlimited set of topics that were created on that board. Users see the most recent or recently active topics on the board and as they scroll down, more topics load. So linking to a Flow board such as Talk:Flow does not guarantee that a particular topic will be visible

Coming: Some day you will probably be able to supply query string parameters to a URL to tell a Flow board to display topics starting at a particular topic.

A Flow board does not contain the text of all the topics and their posts on it. Instead they are stored in a cross-wiki database, see Flow/Architecture. If you use the MediaWiki API or Special:Export to ask for a Flow board's content, it will only contain the UUID of an item in this database, for example

Flow topics have pages in the Topic namespace
Starting with 1.24wmf14, each Flow topic has a page in the Flow  namespace so that you can follow particular conversations of interest by watching that page. For example, Topic:Ry6o4jowf78f34gp

This page title is the UUID of the topic, it is obviously not the topic's title.

Like Flow boards, this wiki page does not contain the wikitext of the posts on the topic, that is stored in the external cross-wiki Flow database.

When you view a single topic it displays a link back to the Flow board on which it was started. (This link should paginate that topic into view )

Sample Flow URLs

 * This should be a test script that verifies that URLs work, not a static wiki table

In 2013

 * ?? there was a query string parameter identifying a post
 * UUIDs used to be even longer (128-bit then changed to 88-bit, and using hexadecimal)
 * e.g. this old-format UUID works as a topic: Topic:050e2fb772abdae40bd7842b2b77d26b ✅
 * using old-style query string http://www.mediawiki.org/wiki/Talk:Sandbox?workflow=050e2fb772abdae40bd7842b2b77d26b]] ✅
 * but on on ee-flow this old-format UUID doesn't work: http://ee-flow.wmflabs.org/wiki/Topic:050a09d20c6b34dffb6efa163e68c4a ❌
 * or in old-style query string ??: http://ee-flow.wmflabs.org/wiki/User_talk:Klipe?workflow=050a09d20c6b34dffb6efa163e68c4a  ❌


 * Really old long topic UUID and workflow UUID on mw.org: Talk:Flow?topic=050fe9b335d31e9b25a890b11c27a364&workflow=050fe9b335d31e9b25a890b11c27a364


 * Some query string parameters used square brackets around array parameters, such as  . We converted these to use an underscore, thus
 * really really old URL with long UUIDs, old square brackets ❌


 * Initially (September 2013), all Flow pages were parameters to Special:Flow?

Earlier discussion
Users are telling us "I want friendlier URLs". What does this mean, what can we do?

User wants

 * Users want to share URLs to topics and posts
 * Users want to wiki link to topics and posts, but query string parameters force them to insert http:// links.
 * Ideally something in the URL or the text of a permalink page would be copy-pasteable into  the same way the h1 heading of this page works as a wiki link.
 * More sophisticated users want to be able to work with UUIDs but there's no easy syntax to do so.
 * If Flow is disabled for a page, the topics and posts for it remain in the system but there's no way to view them.
 * Users sometimes want to link to a particular version of a topic or post.

User concerns with URLs
Users say they want friendlier URLs to topics and posts.

There are several things people mean by this
 * UUIDs are meaningless - "Other discussion systems have URLs like /topic/x/I-brought-some-kitties, do that!"
 * "Why isn't the topic heading a working wiki link?"
 * For example, StackOverflow has links https://stackoverflow.com/questions/18480923/is-there-a-command-to-undo-git-flow-init/18730641#18730641 where the text ("is-there-a-command-to-undo-git-flow-init") makes the link more readable, but has no actual effect (you are redirected to the current canonical one). Reddit and Trello behave similarly, except Reddit does not redirect. This is discussed at https://trello.com/c/7d2CciSA/446-add-extra-human-readable-text-to-topic-page-urls.
 * "The link should include the board" / "I don't care about the board"
 * Current URLs include: Namespace/Page-name/Section-name. E.g.  Talk:Main_page#Example - this provides deep-context for links in email/IRC/etc.
 * Current URLs can be cut&pasted as wikilinks, just by selecting everything after ".../wiki". (This now works, but didn't with the old "?workflow=..." URLs)

Postulates

 * In the database, a topic is associated with the page on which it was first created.
 * Topics can appear on more than one board (e.g. Feeds), but we haven't exercised this.
 * Topics need to be associated with a board, so that things like  and
 * Topics don't have a natural order within a page; because they can (some day) appear on multiple pages, because of infinite scroll, because of (some day) options to re-sort and filter board appearance.

Show board starting at a topic
When you view a topic, it has a link back to its Flow board, This topic was started on Sandbox . That link should try to load the topic in context.

Maybe showing a Flow board starting at a topic could be another parameter to Special:Flow, e.g. Special:Flow/topic-in-board/ would do the right thing, or redirect a pagination URL above.

Possible additions

 * investigate writing the scroll position/pagination/magic into the URL hash as you interact with a Flow board, the way Gmail and other Web 2.0 apps do.
 * So if you follow a link to a different URL (such as a permalink), then use the back button, you would be returned to more or less the state you were in.
 * - this would only works if JavaScript is enabled.


 * Implement Special:Flow/ that will load any UUID and show it appropriately, even if its page is no longer Flow-enabled.
 * Would this work but redirect you to the longer URL?

Issues
Link URL:  https://www.mediawiki.org/wiki/Thread:Extension:LiquidThreads/FAQ/Requirement_of_moderator.  Wikitext link:  Thread:Extension:LiquidThreads/FAQ/Requirement of moderator. 
 * Currently loading a topic loads all its posts. We may need eventually to incrementally load posts, so we have the same problem of ensuring a particular post is visible.
 * If we only indicate the post in the fragment hash, then it won't work in browsers with JavaScript disabled.
 * This suggests we should implement Special:Flow/post/
 * Once we have more than one form of a link to a post, how should we present them?
 * LiquidThreads has More v > Link to which pops up a dialog with
 * Flow Portal/Functional Specifications/Boards and Topics specifies something more elaborate than the current permalink:
 * a modal dialog that will display several options for the user wherein they may obtain a permanent link to the Topic.
 * A full URL to the single Topic (good forever)
 * A full URL to the single Topic as it exists at that point in time
 * A local (wikitext) link to the single Topic (good forever)
 * A local (wikitext) link to the single Topic as it exists at that point in time


 * Since UUIDs are unique, Flow could support a "smart" Special:Flow/uuid/ that shows any item in the appropriate context.


 * what happens when we have other kinds of workflows? Will we have other aliases for the Topic: namespace?