Question/suggestion about arrow/icon referencing replied to post

Sorry about the topic name. I wasn’t sure how to describe what I wanted to ask about. I’m referring to this:


In a previous topic some months ago (I can’t find it) I had expressed a desire to have an indicator to differentiate between when a reply is to the previous post versus the first post in the topic. With the default Discourse settings, the reply icon shown above does not appear in either of those cases, making it impossible to know whether the reply was to the post immediately above or to the topic itself.

In that original topic, I was told about a site-wide setting where those reply icons are displayed even when the reply is to the post immediately above. We enabled that on our install and personally I’ve had a mixed experience with it. While it did “fix” my original problem, I now find myself clicking the reply icon to see the previous post, just to see that it was actually the post right above. In short, I understand why the Discourse defaults are the defaults, as they do seem better than the current alternative.

Now that I’ve used both versions for several months each, I wanted to bring up the discussion again.

Is there still no interest in finding some visual way to differentiate between replies to the post right above and replies to the topic itself? UX isn’t my strong suit, so I don’t have any great suggestions for how to visualize it. Here is the best idea I have:

  1. Pick either the the replies to topic or the replies to the previous post to not display the arrow and user icon.
  2. Display the arrow and user icon in the other case, but change the visuals slightly so it’s clear that it’s special. Perhaps it would be enough to put the glowing ring around the user icon similar to the topic list when a user is both the topic creator and last reply.

So basically something like this:

I’d really be happy with any visual indication of the different types of replies, but I didn’t want to create this topic (again) without some concrete suggestion.

Finally, if there is still no desire to change the visuals around this in default Discourse, is there any way a theme or other site configuration could allow this? I have no idea what is and isn’t possible with Discourse themes, so I wanted to find out the feasibility of that approach.

Thanks, and I look forward to seeing everyone’s thoughts on this.

Not… really?

I’m kind of unclear what it is you are proposing?

It is obvious that replies are to the overall topic by default because the replies exist in the topic. So the only callout needed is in the case where a reply is specific to a particular post:

  • the in-reply-to indicator (with the caveats around “one reply directly under” which is what the site setting is for, if you want that) which indicates the target post

  • quotes of the target post

  • @username mentions which can imply a reply is to a person in general across the topic, e.g. “I want to address the points raised in the 5 posts @username made in this topic…”

Here’s an example scenario:

  • Person A creates a topic.
  • Person B responds to the first post in the topic.
  • Person C then responds to person B with a counterpoint, and Persons B and C go back and forth for a few posts.
  • Finally, person D comes in and posts a response.

From my experience, it is often unclear if person D is responding to the original post from person A, or the last response from person B/C. Unfortunately not all users nicely tag or quote the post that they are responding to (or in some cases the system will remove the quote if they quoted the whole post). Especially, when that last poster posts something generic/ambiguous, it’s generally unclear whether they responded to the first post or the most recent post.

I actually just realized something. There’s not really any need to change how this works with the default setting, where the in-reply-to indicator doesn’t show up one reply directly under. When using that setting, people are obviously (generally) okay with there being no indicator in that case.

However, since this setting already exists, maybe it can be enhanced slightly to add this differentiation that I’m proposing. Would you consider a visual differentiator in the way I described specifically for when that setting is enabled?

Not really – and I think this potential lack of clarity is something people should learn to address by writing clearly and quoting / name mentioning as necessary. So I am not inclined to encourage phoning it in on this stuff by enabling lazy writing.

In general you should always assume people are replying to the topic as a whole, unless they give you specific reasons to believe otherwise.

1 Like

I can’t exactly control how other people write their posts. I’m trying to improve the experience as a reader when other people don’t post as precisely as they ideally should.

I don’t find precision is all that necessary (or even desirable) when it comes to human communication.

When people do demand that excessive precision is necessary in conversations, it tends to make things both noisy – too much metadata – and robotic. I am not a fan of either of these things.

Besides, people who want precision already have all the quoting / name mention / reply indicator tools they need in their toolbox to deliver exactly that.

(Was I replying to you here? Who can possibly know! Maybe I was replying to some other topic and some other person? :wink: )

1 Like

Quoting and name mentioning don’t help if people don’t use them, and people don’t always use them. Again, I’m speaking from the perspective of the reader, not the writer. And we don’t have the reply indicator tool that you’re describing in all cases. My suggestion would make the reply indicator universally useful instead of sometimes useful.

Since I’m now suggesting this only in the context where that setting is on (meaning this extra noise is already there), I don’t see why my suggestion is a bad thing. In my opinion, it would make the extra reply indicator added by that setting more useful, but without adding additional noise.

@codinghorror I apologize for replying again, but I did some digging through the Discourse code on GitHub and some debugging, which led me to a simpler suggestion that I hope will be less contentious.

My investigation on GitHub and debugging in the Chrome console was around trying to figure out if there was anything I could build myself to achieve the functionality I wanted. The short answer seemed to be no, but this investigation did lead me to an attribute used for the reply-to-tab widget called replyDirectlyAbove. The attribute seems to be exactly what I care about, but right now this isn’t exposed anywhere that can be interacted with publicly.

Basically, my new proposal is to add a class on that widget when attrs.replyDirectlyAbove is true. For example:

<a class="reply-to-tab reply-to-post-directly-above">

With that addition, individual Discourse installs could choose to introduce custom CSS to display that differently from the regular reply-to-tab, but there would be no need to change anything by default across all installs.

That’s the wonder of Open Source. It’s all there to look at, and if you lack the requisite knowledge and experience to build it yourself you can post to #marketplace and commission someone else to do it for you.

That’s fair, and I don’t mind contributing (once I get a new laptop…), but what is the process? I assume that codinghorror or someone else still decides if a PR gets approved. I’d rather not do a bunch of work just to have it declined over philosophical differences. So is it still appropriate to post something as a “request” to make sure the general idea is acceptable before building it?

If Jeff believed this was useful to core discourse and a priority then the team would pick up the work internally. For now I would work on the assumption that you aren’t going to get a PR into Discourse, and would instead be talking about having a developer author a plugin for your particular instance.

Well at this point I just want to add a CSS class under a specific condition, so that site CSS can be used to customize this the way I want. Would a plugin even be able to do that? I really don’t know what is and isn’t possible with plugins (and with Discourse customization in general) which is why I’m asking.

Plugins contain code, which allows you to add features, or change behaviors.

CSS can change location, position, size and styling.

So if you want to change an existing element in the interface, you can do it with CSS. If you want to add something beyond the cosmetic it’s going to be done via a plugin.

As far as I can tell, there is currently no CSS class specific enough to allow me to customize the existing element with CSS. This is why I wanted to add the CSS class to the widget (in vanilla Discourse), so that I could customize the element with just CSS.

Is it possible to add an additional CSS class to an existing widget (as described in my post above) with a plugin? Can you do so without risking getting out of sync with the default version of the widget and missing future changes/enhancements to the widget?

Unfortunately, I’m not the admin of the site I’m trying to customize. While I think I could convince the site admin to add CSS pretty easily (assuming the class is added to the widget obviously), I’m not sure I could get him to use a plugin (especially depending on the risks).

(Thanks for bearing with me. :sweat_smile:)

Best approach here it to give this a shot and send through a PR once you get the new laptop. Be sure to have a look at:

As long as this is simply adding 1 class to an element and not introducing any internal weirdness we will be happy to merge it in.