sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

Make a reply button for each message that auto quotes a given message #579

Closed timothyclemansinsea closed 2 months ago

timothyclemansinsea commented 8 years ago

Each chat message would have a reply button. Clicking on it auto quotes that message.

williamstein commented 8 years ago

The design is unclear.

Alternatively we could have a threading system like zulip, where basically the chatroom has a namespace (like in python) as does each message.

We could also have hashtags in messages, with autocomplete to make them very easy to add. Have a tag bar at the top to restrict to thread by tag. Just some ideas here....

williamstein commented 8 years ago

Note that we will have %sage, etc., cells at some point... always keep that in mind.

mforbes commented 4 years ago

Threaded chats could be very useful for real-time Q&A sessions. Each question could be a separate thread to which people can respond.

williamstein commented 4 years ago

Each question could be a separate thread to which people can respond.

Can you suggest what the user interface might look like? In particular, could you point to a chat client that has threads that you actually like? Thanks!

Implementing threads in terms of the UI to create them and the underlying data model to store them isn't very difficult, but actually representing them in a useful way to users is more challenging (to me at least). I happened to have completely rewritten our chat a few weeks ago, so it's much easier to improve now, by the way.

mforbes commented 4 years ago

I am referring to individual messages as "posts".

Discourse does a reasonable job of this. Each post sprouts links on the top right to their parent (with the parent posters username) and on the bottom left if there are multiple replies (left figure below). Clicking on these opens the immediate posts - either all replies, or the parent post.

Screen Shot 2020-07-28 at 10 47 19 AM Screen Shot 2020-07-28 at 10 52 13 AM

The one thing missing for me is the ability to see an entire vertical thread, but this could get quite hairy if there are multiple threads.

For the Q&A idea this could be limited to each post being allowed to have only a single branch: Only root nodes could have a thread and these root nodes would have at most one reply each: users would be forced to reply at the end of each such thread. This is quite restrictive, but I think reasonable for the Q&A use-case, and would remove confusion on the part of the user: Replying would take you to the bottom of that current thread.

Perhaps one could set the maximum thread depth in each chat - the Q&A format I described above would have a maximum depth of 1. Current chat behaviour has a maximum depth of 0.

  1. I am assuming that the display of posts is restricted to being linear on the screen (for mobile devices for example). In principle, a tree could grow in width, but this would probably be a poor design. Thread depth could be indicated with slight indentation or vertical lines. Perhaps replies could be visually indicated by being "contained" in the parent chat bubble.
  2. By default, posts would appear as they already do - in chronological order - so if you do not do anything special, everything looks like it currently does, even if there are threads.
  3. Posts would have a reply button that allows you to reply to that particular post.
  4. While replying to a post, I think visually, the reply should appear below the post - this means that if you reply to a post somewhere in the middle of the chat, your reply would appear in the middle.

The zeroth order UI would be simply to have the links act as navigation tool, allowing one to move up and down threads. (Maybe left and right "arrows" could be used to jump laterally, but it is not clear to what level they should jump.)

The next order UI would be something like what Discourse does.

Finally, the one feature I find lacking with Discourse is a way to see the entire contiguous thread. In the Q&A case of max thread depth 1, it should be relatively easy to insert this below the root post. Maybe one more "show thread" button could be included (or activated by holding down the "replies" button) that pulls in the entire thread. This would probably not work for full trees - maybe it would pull everything until then next node that has replies, then would need to be repeated there.

slel commented 4 years ago

I like the way Zulip does it. See for instance zulip.sagemath.org or leanprover.zulipchat.com

williamstein commented 4 years ago

Anyways thanks for all the ideas!

mforbes commented 4 years ago

I think I don't like chatrooms... and I don't use them unless forced to do so - so discord and slack are my only references, and I like neither. I think I could like CoCalc chat if it worked this way:-) Of course, that means I have no experience using something like this, so maybe it would be a pain. User testing is needed.

Slack seems to take my first-order approach of a max-depth of 1. Posts in a thread cannot have subthreads. The threads appear to the right of the discussion if the screen is wide enough, or require swiping left or right. This is also pretty reasonable, but when you swipe out of a thread, it can be disorienting as to where you were. I think I might prefer that the thread expand in place keeping the single column, but I don't do these things on a mobile device, so someone else who uses Slack should chime in about the user experience there.

Slack's suggestions for notification seem reasonable. Thread posts should only notify those subscribed to the thread, while top-level posts (with quoting enabled perhaps) would notify those participating in the full discussion. Not clear what happens when someone subscribes/responds only to a thread - do they automatically get subscribed to the whole conversation (probably should be).

williamstein commented 3 years ago

Slack seems to take my first-order approach of a max-depth of 1.

I happen to have been using slack a lot during the last week in a group that uses threaded messaging a lot... and I like their approach. Basically, they completely hide all responses until you explicitly click a button to reveal the response thread. Basically, when you click where it says "1 reply" on the left here:

image

it then reveals the column on the right with basically an entire new chat conversation. It's much better than what facebook or github (say) does, since you don't see any of the replies on a first glance. It's also nice because when you do want to see the replies, showing them has little impact on the main conversation, so you don't loose context, which is actually VERY nice. Implementation wise it is also likely pretty easy, since the reply thread is really just another chatroom. Probably for side chat in cocalc we would have to expand the the thread in place (rather than off to the side).

Anyways, I could see implementing this soon...

williamstein commented 2 months ago

We have threads now so all this auto quoting is relevant or needed.