After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755133 - If "nick" is online, mark "nick-afk", "nick|bbl" etc. as online in the log too
If "nick" is online, mark "nick-afk", "nick|bbl" etc. as online in the log too
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-16 21:24 UTC by Bastian Ilsø
Modified: 2015-09-21 21:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
demonstration-picture (176.17 KB, image/png)
2015-09-16 21:24 UTC, Bastian Ilsø
  Details
room: Highlight more nick variants (1.44 KB, patch)
2015-09-17 14:45 UTC, Florian Müllner
committed Details | Review
room: Split out polari_util_get_basenick() helper (4.84 KB, patch)
2015-09-17 14:45 UTC, Florian Müllner
committed Details | Review
chatView: Factor out _getNickTagName() method (1.74 KB, patch)
2015-09-17 14:45 UTC, Florian Müllner
committed Details | Review
chatView: Base online/offline status on basenick (1.41 KB, patch)
2015-09-17 14:45 UTC, Florian Müllner
committed Details | Review

Description Bastian Ilsø 2015-09-16 21:24:13 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.
Comment 1 Florian Müllner 2015-09-16 21:29:27 UTC
Also by the same reasoning:
Highlight any of "nick", "nick_", "nick-afk" or "nick|bbl" when my nick matches any of those variations.
Comment 2 Florian Müllner 2015-09-17 14:45:15 UTC
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).
Comment 3 Florian Müllner 2015-09-17 14:45:20 UTC
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.
Comment 4 Florian Müllner 2015-09-17 14:45:26 UTC
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.
Comment 5 Florian Müllner 2015-09-17 14:45:31 UTC
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.
Comment 6 Bastian Ilsø 2015-09-17 15:33:01 UTC
Looks good to my eyes. LGTM?
Comment 7 Florian Müllner 2015-09-17 15:52:17 UTC
Thanks. I don't think it's worth asking for a freeze break for this, so I'd leave it to 3.18.1 ...
Comment 8 Florian Müllner 2015-09-21 21:27:41 UTC
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