40

In addition to the highlighting comments made by the question owner (as described in a recent blog post), I think it would be a good idea to highlight comments left by the author of the answer being commented on.

This way, the conversation between asker and answerer is more defined/obvious.

Edit: This is an edit to bring this to the site owners attention again - It would help people like me with bad eyesight to track down their comments. I originally opposed the questioner highlighting, but experience has shown me that I was wrong, and I think that answerer highlighting of comments would be very useful.

9
  • Dupe: meta.stackexchange.com/questions/16648/…
    – random
    Commented Sep 2, 2009 at 5:59
  • @random: that question asks that our own comments be highlighted, whereas mine is asking that there be highlighting for the user who left the answer. I sort of like the idea of highlighting your own comments, but it's a separate question. I think the benefit of answer-owner-highlighting is that you can more clearly understand the answerers intent, and can ignore superfluous comments from others if you wish. Commented Sep 2, 2009 at 6:05
  • I also notice the official answer to that other question is 'no, make a greasemonkey script" and I'd accept that for this question too. In my mind, my suggestion seems a bit more useful since I don't much care about what I said in comments, but I do like to understand the authors frame of reference for a given answer. Commented Sep 2, 2009 at 6:10
  • 1
    So much highlighting makes it way too busy/noisy.
    – random
    Commented Sep 2, 2009 at 6:14
  • 11
    The OP is only requesting that two names be highlighted, max. That doesn't sound too bad.
    – Sampson
    Commented Sep 2, 2009 at 10:54
  • I've made a userscript for this. You can see it at StackApps stackapps.com/questions/5075/answerer-name-comment-highlighter Commented Jan 5, 2015 at 17:18
  • @Tim (might not be worth an answer; but till then, you can use my userscript :) Commented Mar 27, 2015 at 10:47
  • 1
    @ᔕᖺᘎᕊ Post it and I'll give you half the bounty!
    – Tim
    Commented Mar 27, 2015 at 12:51
  • An example of where highlighting the answer author is useful: stackoverflow.com/questions/9283472/… Commented Jun 22, 2016 at 8:26

3 Answers 3

9
+50

This really should be reconsidered, there are (alt least) 2 dupes of this, all with a positive score - it's obvious a lot of people would like this feature!

Till then though, here's a userscript to highlight answerer comments:

// ==UserScript==
// @name         Highlight answerer's comments
// @namespace    http://stackexchange.com/users/4337810/%E1%B9%A7%D0%BD%CA%8A%C3%9F
// @version      0.2
// @description  Highlight's the names of answerer's on SE websites
// @author       ṧнʊß (http://stackexchange.com/users/4337810/%E1%B9%A7%D0%BD%CA%8A%C3%9F)
// @match        *://*.stackexchange.com/*
// @match        *://*.stackoverflow.com/*
// @match        *://*.superuser.com/*
// @match        *://*.serverfault.com/*
// @match        *://*.askubuntu.com/*
// @match        *://*.stackapps.com/*
// @match        *://*.mathoverflow.net/*
// @grant        none
// ==/UserScript==

function colorAnswerer() {
    $('.answercell').each(function(x, obj) {
        var x = $(this).find('.user-details a').text();
        $('.answer .comment-user').each(function(i) {
            if ($(this).text() == x) { 
                $(this).css('background-color', 'orange');
            }
        });        
    });
}

$(document).ready(function() {
    $('.comments').bind('DOMNodeInserted DOMNodeRemoved', function(event) {
        if (event.type == 'DOMNodeInserted' || event.type == 'DOMNodeInserted') {
            colorAnswerer();
        }
    });
});

enter image description here

Note: This may not the most up-to-date version - please install my SE Optional Features userscript for the latest version.

3
  • 1
    There's the whole bounty :)
    – Tim
    Commented Mar 31, 2015 at 10:24
  • 3
    Great functonality, but the color... the color... Commented Aug 7, 2015 at 13:40
  • lol - any suggestions for the colour? I'd be happy to change it! I admit it's not great! :/ @JanDvorak Commented Aug 7, 2015 at 13:41
1

I'll post here an answer to the same question I made on Stack Overflow Meta.
It's the same userscript posted here, but I fixed and changed some things:

  • It also works when the answer is edited by someone else.
  • It highlights the comments from the author of the answer only on that answer, not on other answers.
  • It uses the same color as the questioner highlighting, to match the theme of the site.
  • It uses an outline, instead of coloring the whole background, so you can differentiate this highlight from the one for author of the question.
  • The outline around the user is drawn in the answer too, to visually make it clear that the outline in the comments means that it is the same user who gave the answer.

Here's how it looks on Stack Overflow (you can also try dashed and dotted styles for the outline, if you want).

Comment from authors highlighted in answer

Note how you can easily distinguish between the questioner (filled), the answerer (outline) and other users (no highlight) in the comments.

Userscript code from the linked answer:

// Using jQuery

function colorAnswerer() {
  let co = $('.post-signature.owner').css('background-color');
  let aa = $('.answercell');
  aa.each(function() {
    var as = $(this).find('.user-details a')
    var a = as.last();
    var b = as.filter(i => i < as.length - 1);
    var l = '2px solid'; // can also try dashed and dotted
    a.parents('.post-signature').css('border', l + ' ' + co);
    b.parents('.post-signature').css('border', '2px solid transparent');
    var x = a.text();
    var cm = $('.comment-user', this.parentNode)
    cm.each(function(i) {
      if ($(this).text() == x) {
        $(this).css('border', l + ' ' + co);
      }
    });
  });
}

$(document).ready(function() {
  $('.comments').bind('DOMNodeInserted DOMNodeRemoved', function(event) {
    if (event.type == 'DOMNodeInserted' || event.type == 'DOMNodeInserted') {
      colorAnswerer();
    }
  });
});

colorAnswerer();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

-1

This way, the conversation between asker and answerer is more defined/obvious.

If you used the same colour (currently blue) then both answer author and question author's usernames in comments would be blue, how would this help differentiate between the two?
It would differentiate Q author and A author from all other users, but I don't see any real advantage here.

So this would only work if we used two different colours, one for question author and one for answer author (when commenting on their answer).
And then it would be too colourful imo. Having too much "highlighted" stops the highlighted bits from actually being highlighted, as it all just blends in with all the other highlighted things.


Comments are not really for extended discussions, and while they do happen it's mostly comments under the question, where this proposal wouldn't make a difference.

If you are reading comments it's not hard to follow the conversation between one user and another. Especially as "generally" there are only a few comments to read under answers.

5
  • There really isn't that much highlighting! It really doesn't detract the effect of the highlighting. Use my userscript for a day and you'll see for yourself! ;) You'll find it helpful... :P Commented Aug 7, 2015 at 13:33
  • If there's not that much highlighting then what's the point :p
    – James
    Commented Aug 7, 2015 at 15:31
  • You could argue the same about OP highlighting - what's the point? The fact is it does make it easier, either consciously or subconsciously, it makes a difference. Commented Aug 7, 2015 at 15:51
  • OP highlighting is useful because OP is the main character as they're discussing the various points and requirements of the question, to get it answered. After that, comments and conversations are (should be) minimal, and so highlighting is barely worth the effort to implement it, fix bugs etc. Just my opinion. Perhaps you've found it useful as per your scripty-whatsit.
    – James
    Commented Aug 7, 2015 at 16:02
  • Maybe. However, I don't think it would be that hard to implement, not too much effort, but that's SE's choice - not ours! :) Commented Aug 7, 2015 at 16:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .