GNOME Bugzilla – Bug 755133
If "nick" is online, mark "nick-afk", "nick|bbl" etc. as online in the log too
Last modified: 2015-09-21 21:28:01 UTC
Created attachment 311508 [details] demonstration-picture For marking which nick is online or offline, it would be nice if we also marked variations of that nick accordingly. Fx, if "hergertme_" wrote in the log earlier but "hergertme" is online, then "hergertme_" should be marked as online too.
Also by the same reasoning: Highlight any of "nick", "nick_", "nick-afk" or "nick|bbl" when my nick matches any of those variations.
Created attachment 311561 [details] [review] room: Highlight more nick variants We have been stripping trailing 'garbage' like trailing underscores since commit cc7042fa268c, which solved getting highlights for the regular nick after reconnecting as nick+'_'. However the nick is also used frequently to convey status - 'nick-away', 'nick|bbl', 'nick_office' - which is not covered by the current approach. To include those variants in highlighting, match up to the first non-alphanumeric character (rather than the last alphanumeric one).
Created attachment 311562 [details] [review] room: Split out polari_util_get_basenick() helper Stripping down a nick to a common base for different variants isn't just useful for getting highlights while not using one's regular nick, but also to group different nicks that supposedly identify the same person, so split out a utility method.
Created attachment 311563 [details] [review] chatView: Factor out _getNickTagName() method We need to generate a tag name from a nick both when creating the tag and when looking it up. Add a small method for that to make sure to use the same tag name in either place.
Created attachment 311564 [details] [review] chatView: Base online/offline status on basenick Since commit c96929c701bd, we use different colors for active and inactive nicks. This has proven quite helpful when scrolling through the log, however it can be confusing when multiple variants of a nick are present. As whether a particular user is online at all is much more interesting than whether they are currently identified by "foo" or "foo_", use a common status for all nicks we think refer to the same person.
Looks good to my eyes. LGTM?
Thanks. I don't think it's worth asking for a freeze break for this, so I'd leave it to 3.18.1 ...
Attachment 311561 [details] pushed as 925ae67 - room: Highlight more nick variants Attachment 311562 [details] pushed as 2b45e62 - room: Split out polari_util_get_basenick() helper Attachment 311563 [details] pushed as 05620be - chatView: Factor out _getNickTagName() method Attachment 311564 [details] pushed as 441c3bd - chatView: Base online/offline status on basenick