Getting rid of stream duplication when expanding reply to

(Sam Saffron) #1

When you expand a reply-to we use a special view to append the replies above the post to the stream:

This often causes confusion as:

  1. Posts appear twice in the stream
  2. The “expanded” view offers no interaction (you can not like them / bookmark them and so on)
  3. It often inserts a large amount of elements causing a confusing stream.

To overcome this I am proposing a much simpler design that simply collapses all the intermediate posts:

I deployed it here and enabled it using the experimental_reply_expansion site setting so you can play with it.

It is almost good, except that we need some logic to handle very large gaps which I need to discuss with @eviltrout. (note: this is already an open issue with summarize)

Personally I much prefer this new system and it will allow us to delete a big amount of code which also makes me happy.


(Gerhard Schlager) #2

I like it and already have a few suggestions to make this even better:

  • Make sure, that the relevant post is completely visible (scroll to the top of the post).
  • When the hidden posts get expanded again, jump to the post below those hidden posts. I don’t want to scroll down and go looking for the post where I clicked on the reply expansion link. Maybe even highlight that post afterwards like you do with the post after collapsing the intermediate posts.

(Jeff Atwood) #3

Hmm. I think this makes much more sense for downstream (replies) than upstream (in reply to). As you have by definition already read the upstream posts by the time you scroll to a given post.

I don’t recall anyone complaining about this for in reply to, they complained about re-reading downstream replies they had already read by expanding replies.

(Also note that in reply to expansion follows chained replies, whereas reply to does not.)

(Sam Saffron) #4

Landing in the middle of the stream happens to me quite a bit when I am mentioned in a reply. The collapsing technique works way better there.

Personally I never touch the expand below I am willing to bet it is used globally across our sites less than 50 times a day. I can check in haproxy

I am much preferring the unpoluted stream it works way better for me

I have heard multiple complaints about inability to interact with the expansion and seen a video of a confused user

(cpradio) #5

So first off: “Shut up and take my money!” I really like this (I’d really like to see it happen for the “X Replies” button too).

There does seem to be a “slight” bug.

Repro steps (I know you love these):

  1. Go to Please make category url shorter
  2. Click on the
  3. Now without unhiding the hidden posts, click on

Clicking on another “in reply to” should unhide previously hidden posts, as the post being referenced for riking, is currently hidden (by step 2), so it doesn’t read properly.

(Sam Saffron) #6

This really depends on context, if I was dumped into the middle of a stream, when I expand I want to be at the top, if I am recapping I want to be at the bottom. Short of a magic 8 ball there is no way to guess what the right thing is to do here.

(Gerhard Schlager) #7

I’m not sure what you mean by that.

I had the following use case in mind:

  • Let’s say I’m reading a post in a long topic: What is the most awesome plugin for Discourse, that does not yet exist?
  • Now I see that it’s a reply, so I click on
    (Bug: This doesn’t work unless I start reading at the beginning of the topic. Jumping using the link from above collapses only a few posts.)
  • After clicking I see this (Bug: I had to scroll up a bit, since the whole post was not visible)
  • When I click on I’d expect so see the post I was reading before clicking on

I guess this differs from the summarize function where I actually want to read the hidden posts.

I didn’t create bug reports, since this is considered experimental.

(jaming) #8

I know I don’t use it because of the way it functions. IMHO, it would be much more useful if it filtered the stream as well. Great job btw; I really like this!

(Dave McClure) #9

I’ve only played around with it a bit, but I’m not convinced this is better yet.

Two things I find annoying with the current experimental version:

  1. Expand/collapse is no longer a toggle.
    I someimes just need a quick ‘reminder’ of the context, but the current implementation begs me to move the pointer to unhide the posts afterwards. When you do unhide, you lose your place.

  2. The page shifts slightly after I click the in-reply-to button, and it causes me to have to scan the page again with my eyes to find my place.

The topics I scanned often only skip 1 post, so perhaps there are better examples I should look at.

(Sam Saffron) #10

I was thinking and another huge help on our side is cutting out these duplicate post templates, so many times we made a change to the main template and then have a regression in the “expanded post” template.

that alone will be a significant help dev wise. we has one of these regressions just yesterday. additionally it would help out with plugins as well as there will only be one template for posts to worry about.

(Jeff Atwood) #11

I understand that, and I agree … for downstream.

I think it’s a very poor fit for upstream. When I expand “in reply to” I just want to see a quick pop-up of what the immediate post was in reply to… I don’t want the entire stream to reconfigure itself.

It’s the difference between clicking on a user avatar and getting a whole user page, versus a user card popup.

(Sam Saffron) #12

Our discussion was to cap the expansion at 1 out-of-the-box so this particular implementation is pretty much equivalent.

(Jeff Atwood) #13

Pop-up is very, very, VERY different than reconfiguring the stream. Do not want.

Gravity flows down, not up.

(Sam Saffron) #14

The argument you made is that it does not matter if you have duplication in the stream cause you already read the posts, same argument can be made for collapsing. It does not matter that you collapse a few posts cause you already read them.

(Jeff Atwood) #15

The collapsing is super invasive – I lose my read position, the screen shifts, content magically disappears… and clicking it again does not put me back where I was. Generally it is a terrible experience.

Compare with a simple pop-up, which

  • does not interfere with any read position
  • does not change layout
  • is visibly an insertion of “other” content
  • easily dismissed to get back

There is a big conceptual difference between upstream (stuff you have read) and downstream (stuff you have not read).

Downstream isn’t fully “rezzed-in” yet and has the freedom to shift around more. Changing upstream, particularly when all I want to see is the single immediate post this was in reply to is just not a good choice.

(Sam Saffron) #16

The screen shift is an open bug we have with the standard expansion which we should fix anyway.

I am fine to give this try up, however limiting up expansion to 1 out of the box means we need to add yet more code to this expansion stuff. It also leaves the “I can no interact with these mini expansion” things open and keeps us holding on to this duplicate code which I can guarantee will regress many times in the future.

At the top it needs a “show more” in the conversation and new code needs to be written to rez that in.

At the top it needs a “collapse” button so its clear to new users that then can get rid of it AND open the ability to get rid of the expansion without scrolling all the way down.

I see zero value in investing time in the down expansion unless we find out this feature is even used, I will look through logs on monday.

(Dave McClure) #17

Part of me wonders whether improvements to the progress bar could eventually help here. Imagine that you just get moved to a new location in the post stream, but its clear where you came from and easy to get back there.

Also, I don’t think this experiment was a complete failure. I really don’t like it as-is, but it’s possible the issues @codinghorror and I raised could be addressed somehow:

Could you make the in-reply-to button a toggle?

Is there a way to prevent the screen from shifting?

I think if those two things were handled, it’d be a very different experience for me.

(Jeff Atwood) #18

Ok @sam and I conferred in chat and arrived at this:

  • in reply to – capped at 1, inline duplicate/expand the immediate post this is in reply to.

  • (n) replies – no change, inline duplicate/expand all immediate replies.

What you don’t see is child replies (replies to replies to replies…) but if you click or tap filter conversation the topic is then filtered to show all posts related to this conversation. It’s the equivalent of threaded view, basically, though there needs to be a clear way to exit and get back to where you were without expanding all the “n posts hidden” dividers.

That way we can excercise the much more complex “click all the things” thready filtering-to-conversation behavior while keeping the simpler “show me the immediate replies above and below” functionality intact and not overwhelming people.

Linked replies showing up again so you have to read them twice - can this be addressed?
Linked replies showing up again so you have to read them twice - can this be addressed?
(Stephanie) #19

@sam @codinghorror I’m interesting in implementing the “experimental reply expansion” to hide replies, but am curious as to whether or not you’d made any updates since Oct '14. Have there been any changes to this setting?

Would greatly appreciate your help!

(Rafael dos Santos Silva) #20

Hey guys, I’m interested in better reply expansion, as show above.

One thing that our users are getting mad is that when you expand the replies, only 1 level replies are show.

Coming from the Facebook world, they expect that you would see the entire tree branch.

(I know facebook cheats here using max one level deep, and then proceed with pre-filled citations)