Flow/Architecture/URLs


 * See Flow/Nomenclature for an explanation and diagram of boards and topics and posts.

tl;dr
A Flow board is a wiki page, but it is not a static piece of wikitext. It is a window onto the topics discussed 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.2wmf14, 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. In a wiki link, use

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 API to ask for a FLow board's content, it will only contains a UUID 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:Rxp4iwrpby2ohtjb

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 )

Special:Flow

 * Earlier Flow implemented redirects at  and   as an alternative Permalink URL.

Sample Flow URLs

 * board: a standard page, Talk:Sandbox
 * topic: Topic:, Topic:Ry6o4jowf78f34gp note WMF wikis capitalize the first letter of page names but the actual uuid is lowercase alphadecimal
 * a post within a topic: Topic:#flow-post- Topic:Ry6o4jowf78f34gp
 * ... pagination URLs, action URLS, etc.

Earlier

 * topic:  parameter to board, e.g. https://www.mediawiki.org/wiki/Talk:Sandbox?workflow=Ry6o4jowf78f34gp#flow-post-ry6ojm7fcoywi0ct


 * post within a topic: #flow-post- fragment workflow parameter to board, e.g. https://www.mediawiki.org/wiki/Talk:Sandbox?workflow=Ry6o4jowf78f34gp#flow-post-ry6ojm7fcoywi0ct
 * ?? 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)

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?"
 * "The link should include the board" / "I don't care about the board"

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.

Pagination URLs
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.

Fortunately we already have the machinery to support this, the pagination URL parameters in the _More topics_ link that you normally only follow if you disable JavaScript and infinite scroll. http://ee-flow.wmflabs.org/w/index.php ?title=Talk:Flow_bugs &topic_list[offset-id]=050adf7af4bff00fc8b1fa163e68c4ac &topic_list[offset-dir]=fwd &topic_list[limit]=10 &workflow=050a09d20c6b34dffb6efa163e68c4ac

Some users will want this URL to be "friendlier", in all the senses above.

It would be nice to be able to reduce this. You can omit some parameters, I think you have to specify offset-dir=fwd, but there are so many parameters it's hard to fit it into a wiki link.
 * 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 to the 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?