crowbartools / MixrElixr

Browser extension that enhances your Mixer viewing experience with custom emotes, new features, and a ton of options.
https://mixrelixr.com
GNU General Public License v3.0
23 stars 7 forks source link

[Feature Request] Mention History popup in chat #108

Open jzisser9 opened 4 years ago

jzisser9 commented 4 years ago

Is your feature request related to a problem? Please describe. I like to sometimes follow conversations between people in chat who @mention each other back and forth, but it can be really, really hard to follow it sometimes, especially in an active chat room.

Describe the solution you'd like When clicking on a mention in a chat line, a popup will appear showing the history of mentions between the two users.

I think this is how it could work:

When clicking the mention, Elixr passes the named mention and the author of the chat message into the normal popup window. Another section above the normal user pane shows the mention history. Elixr can then use the two names to try and build a mention history between two users by looking for messages in chronological order, and based on the sender and whatever mentions are in the message.

Additional context I'd like to take this feature on myself. Can you please assign it to me if I can't self-assign?

ebiggz commented 4 years ago

@jzisser9 This would be a great addition!

If it helps here's some details on Elixr's chat handling: Elixr currently uses a mutation observer to detect each new message (as well as any previous historical messages on page load).

One approach to this feature could entail searching for user tags within the message container (via a selector like "[class*='tagComponent_']") every time we handle a message, and then store the message author/usertag relationships in a map, along with any needed message data. And then that map could be referenced when building mention history for two users.

Another thing worth noting is Mixer includes a data-id attribute at the parent div message container that's unique to each message. So we could potentially save that message Id with the message author/usertag relationships and use it to clone the entire message node when building the Mention History UI to piggy back off of Mixer's message stylings instead of maintaining our own.