-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chat-gui-112: Enhance message user info window #222
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking on a username in the user list menu didn't show the messages box because it didn't make sense contextually. Now that it's displaying the user's entire message history, you can show the message box in that situation, too.
@@ -49,6 +49,10 @@ export default class ChatUserInfoMenu extends ChatMenuFloating { | |||
this.chat.output.on('mouseup', '.msg-user .user', (e) => { | |||
e.stopPropagation(); | |||
}); | |||
|
|||
this.chat.output.on('DOMSubtreeModified', (e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOMSubtreeModified
seems to be part of the MutationEvent
family of APIs, which is deprecated according to MDN's docs. I think you should use MutationObserver
instead.
Also, there's a bug where, if you have a DM window for the target open, you can see messages from both the DM window and the main chat window. You should monitor changes in the currently-visible window only.
Addresses issue 112: #112
When users right click on a username from the chat window, we now parse out all messages that are authored by selected username and display as a message history in the user info menu. As long as the user info menu remains open, an event listener will dynamically update the message history based on the chat ui. Older messages will disappear from the selected user message history as they disappear from chat and new messages will render as they're added to the chat.
Untitled.mp4