User:Jorm (WMF)/scratch

This document describes the user experience for the User-to-User messaging module for Flow.

Personas
In order to avoid pronoun confusion, this document utilizes the following personas:


 * Alice: an experienced editor
 * Ben: an experienced editor. Ben is subscribed to Alice (like watching her Talk page).
 * Chloe: a new editor
 * David: a new editor

Workflows will be described in "stories" to avoid grammar issues like "the viewing user, upon viewing another user's page..." etc, etc.

Workflow
At the most basic level, the workflow for the user-to-user messaging module follows a story similar to these:

Thread Creation

 * 1) Alice sees an edit made by David that needs work.  She decides to leave a message to him and goes to his Flow board - or Talk page analog.
 * 2) There, she clicks the "new topic" button.  She enters a title for the message and the message body and then clicks the "Submit" button.
 * 3) This creates a new Thread.  The following events happen:
 * 4) Alice is immediately subscribed to the Thread, as its Creator.
 * 5) David is immediately subscribed to the Thread, as its Target.
 * 6) On respective Flow Boards:
 * 7) To both David and Alice, the Thread appears as "active" on their respective Flow boards.
 * 8) To Ben, the Thread appears in his Flow board as a passive thread (he is watching her board).
 * 9) To Chloe, should she visit either Alice or David's Flow boards, she will see the Thread as passive.
 * 10) An email is sent to David, informing him of the new Thread.  This happens via Echo, so he will also get an in-page growler notification as well.  The email contains the full text of the Post.
 * 11) If David is currently viewing his Flow board, a notice will be given at the top indicating that there is a new Thread and inviting him to refresh the page
 * 12) David does one of the following:
 * 13) He clicks the link provided in the email, which will bring him to his Flow board, focused on the new Thread; or
 * 14) He clicks the Echo flyout or growler notification, which will bring him to his Flow board, focused on the new Thread; or
 * 15) He clicks the static navigation link to view his Flow board, which brings him to his Flow board but does not focus on the new Thread; or
 * 16) He is currently on his Flow board, and clicks the notification that he has a new Thread and his Flow board is reloaded. If there are more than one new Threads pending viewership, no Thread is focused. Otherwise, the new Thread is focused.

Replying to Threads

 * 1) David reads Alice's new Thread and decides to reply, asking for more help. The invitation to respond to the Thread is already visible, so David merely needs to enter his response in the text field and hit "Send".
 * 2) This creates a new Comment on the Post.  The following things happen:
 * 3) The Thread is "touched" and will have its last-modified timestamp updated to Now.
 * 4) Alice is notified (via Echo) that David has replied to her Thread because she is subscribed to the Thread.
 * 5) Any other user (such as Ben) who may be actively subscribed to the Thread will be notified of a new response (via Echo).
 * 6) If Alice navigates to the Thread via any targeted means (e.g., clicking an Echo growler), she will be brought to her Flow board with the Thread focused and expanded.  The new reply will be highlighted in some manner.
 * 7) If Alice ignores the notification and later returns to her Flow board, the Thread will be displayed as Closed but will indicate that there are new responses.  The Thread will be placed within her Flow stack according to its natural place with a last-modified sort.

At this point, all replies to the Thread operate in the same manner. Additional users may also interact with the Thread:


 * 1) Ben sees and reads the Thread on Alice's Flow board.  He decides to reply to it and does, in situ. The following things happen:
 * 2) Ben is immediately subscribed to the Thread.
 * 3) The Thread will now appear in Ben's Flow board, where it appears as "active".
 * 4) Alice and David are both informed of the new Comment via Echo.
 * 5) Repeat.

Threads
A Thread is composed of a single Post and zero or more Comments. Threads have three basic display modes:


 * Open: The Thread has been fully expanded and all comments are visible
 * Closed (Active): The Thread has been actively subscribed to, but the display is "closed", hiding the bulk of the Post and all Comments
 * Passive: The Thread has not been subscribed to. All content save for the Post title and some metadata is hidden.

Active vs. Passive Display
Threads can be displayed in "active" or "passive" modes. Active Threads

When viewing another user's Flow board, Threads will be displayed in passive mode unless the viewing user is also actively subscribed to the Thread.