Jump to content

Flow/Architecture/URLs

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

Flow URL summary

[edit]

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, [[Talk:Beta_Features/Hovercards]]

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 [[Topic:Rxp4iwrpby2ohtjb|Something friendlier]]

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 [[Topic:Rxp4iwrpby2ohtjb#flow-post-rynqja9dnthggjf5]]

Some actions work with a Flow board or Flow topic:

  • action=view (the default)
  • action=history
  • action=purge
  • ...

But many actions don't work with a Flow board or Flow topic:

You can preload a Flow topic title by adding ?topiclist_preloadtitle=Any+title+text+here to the URL. You can preload the Flow post area with the contents of some page with topiclist_preload=PageTitle, for example this preloads with "Test preloaded title" and post body from User:SPage_(WMF)/Flow_post_stub.

Flow boards are pages

[edit]

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-workflow":"rl7gw1a4ah0curug"}

Flow topics have pages in the Topic namespace

[edit]

Starting with 1.24wmf14, each Flow topic has a page in the Flow Topic: 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 (bug 58251))

Sample Flow URLs

[edit]
This should be a test script that verifies that URLs work, not a static wiki table
Type Format Sample wikilink/URL Notes
board a standard page Talk:Sandbox
topic Topic:<topicUUID> Topic:Ry6o4jowf78f34gp WMF wikis capitalize the first letter of page names but the actual uuid is lowercase alphadecimal
A post to a topic Topic:<topicUUID>#flow-post-<postUUID> Topic:Ry6o4jowf78f34gp#flow-post-ry6ojm7fcoywi0ct JavaScript detects the post in the fragment, highlights it in green, and scrolls to it
show board starting at topic (Not implemented yet.)
pagination Board name? topiclist_offset-id=<topicUUID> (optional &topiclist_offset-dir=fwd &topiclist_limit=10 https://www.mediawiki.org/wiki/Talk:Sandbox?topiclist_offset-id=ry6o4jowf78f34gpd Shows topics *earlier* (or *later*) than the given topic UUID.

Ordinarily only no-JS users or those who click [Load More] before more topics load see this.

Before Topic: namespace

[edit]
topic workflow=<topicUUID> parameter to board Talk:Sandbox?workflow=Ry6o4jowf78f34gp before June 2014. Now redirects
A post to a topic workflow parameter to board + #flow-post-<postUUID> fragment Talk:Sandbox?workflow=Ry6o4jowf78f34gp#flow-post-ry6ojm7fcoywi0ct before June 2014.
An action on a topic workflow=<topicUUID>&action=xxx parameters to board Talk:Sandbox?workflow=Ry6o4jowf78f34gp&action=edit-topic-summary before June 2014. Now redirects (but loses action, bug 68339).
Special:Flow topic link Special:Flow/workflow/<topicUUID> Special:Flow/workflow/ry6o4jowf78f34gp#flow-post-ry6ojm7fcoywi0ct A hack to make a wiki link to a topic before they were in a separate namespace.
Special:Flow post link Special:Flow/post/<postUUID> Special:Flow/post/ry6ojm7fcoywi0ct or
Special:Flow/workflow/ry6o4jowf78f34gp#flow-post-ry6ojm7fcoywi0ct
A hack to make a wiki link to a post.

In 2013

[edit]
  • 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 &topic_list[offset-id]=050adf7af4bff00fc8b1fa163e68c4ac&topic_list[offset-dir]=fwd&topic_list[limit]=10 . We converted these to use an underscore, thus &topic_list_offset-id=050adf7af4bff00fc8b1fa163e68c4ac&topic_list_offset-dir=fwd&topic_list_limit=10
  • Initially (September 2013), all Flow pages were parameters to Special:Flow?

Notes

[edit]
  • Flow boards and topics accept some action parameters.
  • Note that ?action=edit does not make sense for a Flow board or topic – you need to specify a particular item such as a post, topic title, or board header to edit.
  • A topic is not (currently) paginated, so viewing a topic loads all of its posts.

Earlier discussion

[edit]

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

User wants

[edit]
  • 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

[edit]

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!"
  • "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

[edit]
  • 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 {{FULLPAGENAME}} and [[/Subpage_name]]
  • 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

[edit]

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 (bug 58251).

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

Possible additions

[edit]
  • 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/<Any UUID here> 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

[edit]
  • 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/<post UUID>
  • 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
Link URL: https://www.mediawiki.org/wiki/Thread:Extension:LiquidThreads/FAQ/Requirement_of_moderator.
Wikitext link:  [[Thread:Extension:LiquidThreads/FAQ/Requirement of moderator.]]
    • Flow Portal/Functional Specifications/Boards and Topics#Permalink 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.
      1. A full URL to the single Topic (good forever)
      2. A full URL to the single Topic as it exists at that point in time
      3. A local (wikitext) link to the single Topic (good forever)
      4. 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/<any 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?