-
Notifications
You must be signed in to change notification settings - Fork 31
Message Reply Feature #531
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
Conversation
|
You can probably look at this place, to help with setting the proper mention tag: chat-gui/assets/chat/js/chat.js Line 955 in 18ea863
|
assets/index.html
Outdated
| <span> Replying to </span> | ||
| <span id="chat-reply-user"></span> | ||
| </div> | ||
| <span class="chat-reply-cancel"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" |
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.
is there a font awesome glyph that will work here?
assets/chat/js/messages.js
Outdated
| // Cuts the message limit into a quater | ||
| const prevPreview = this.prevMessage.length > 128 ? this.prevMessage.substring(0, 128) + "…" : this.prevMessage; | ||
| // Previous message block | ||
| // Possable problem getting the traget username here |
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.
nit: target
| if (this.historical) classes.push("msg-historical"); | ||
| if (this.highlighted) classes.push("msg-highlight"); | ||
| // Cuts the message limit into a quater | ||
| const prevPreview = this.prevMessage.length > 128 ? this.prevMessage.substring(0, 128) + "…" : this.prevMessage; |
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.
can we use white-space: nowrap; text-overflow: ellipsis to make this responsive?
| return; | ||
| } | ||
|
|
||
| this.source.emit("MSGREPLY", { data: replyText, nick: this.user.nick, target: targetNick, prev: prevMessage.message, prevMessageId: prevMessage.msgid }); |
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.
does the server handle this command?
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.
I wasn't able to fully get the chat WebSocket server to connect to the gui for a full on production test but from testing with the mock server I was able to emit the reply like a message would and get the client to store it in its dom and render / show it in chat
assets/chat/js/chat.js
Outdated
| } | ||
| }); | ||
|
|
||
| // Cancel a repl to someone |
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.
nit: reply
|
we need to add server support before merging this... |
Enhance chat UI with a flexible reply system (right-click, slash command, and banner support).
Added Features
Reply Functionality in Chat
Reply Options
### Feature Needing Help!Mentions / Highlights in Reply Container+ show mentions (e.g. @username / username) inside the reply preview container.Need to understand how mentions are currently constructed & rendered in chat to replicate them in the reply UI.Edit: Working!
Note
Full disclosure, a bit of chatgpt was used to create the initial reply functions to get me start.