-
Notifications
You must be signed in to change notification settings - Fork 419
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
Start with system chat messages #1067
Conversation
f1384a9
to
3ab43b8
Compare
Ready for review @Ivansss @danxuliu can you help with the layout when the chat is in the sidebar? The timestamp seems to overlap the message there, due to the missing author row parts. @jancborchardt if you want to comment on the look, do it soon, please, not 2 days before the release ;) |
b07fe70
to
8c3ee6d
Compare
@nickvergessen I have fixed the date on system messages. The fix itself is the first commit; the second commit provides a nicer layout (at least, in my opinion), but I added it in a separate commit easily droppable just in case I am the only one that likes it ;-) Date on its own row (well, in this screenshot the text of the date when there is an author is not right-aligned, but it is fixed in the pushed commit): |
docs/api-v1.md
Outdated
@@ -549,6 +549,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1` | |||
|
|||
* `joined_call` - {actor} joined the call | |||
* `left_call` - {actor} left the call | |||
* `call_ended` - Call with {user1}, {user2}, {user3}, {user4} and {user5} (Duration 30:23) |
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.
Shouldn't it be Duration {duration}
instead?
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.
No, similar to the room name on rename its not a placeholder (not a known rich object string type)
8c3ee6d
to
7f49c42
Compare
7f49c42
to
8c3ee6d
Compare
The system chat messages should trigger an event to the standalone signaling server, so the clients get notified that they should load the new messages (similar to the regular chat messages). With #1074 the ChatManager now has a dispatcher that could be used for this. |
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
System messages have no author, so the author row only contains the date. As the date was shown using an absolute position it had no influence on the width calculation of other elements and thus sometimes overlapped them (for example, when a wide system message was shown in the sidebar, but also if the user name was too long). Now the date uses a static position with an automatic left margin, which in practice causes it to be right aligned (both with and without author) due to being a child of a flex display. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
System messages have no author, so instead of showing the date on its own row and the message below it now the system message and the date are merged in a single row using flexboxes. When there is little available width the message and the date compress each other and use several lines as needed. The width of the date is limited to its content, while the message expands itself when possible, which causes the date to be aligned to the right. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
4a9e44a
to
15ad813
Compare
Signed-off-by: Joas Schilling <coding@schilljs.com>
@fancycode after adding the event+listener to update the chat, the signaling backend tests fail because the message is different:
Can you help with that? |
The tests only remember the last message that was received:
With the system messages there will be more now: first the |
… the form anyway Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
public function clearLastRequest() { | ||
$this->lastRequest = null; | ||
} | ||
public function clearLastRequest() { |
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.
Please rename to clearRequests
to match the other function names.
Signed-off-by: Joas Schilling <coding@schilljs.com>
The specification of acceptance tests for chats do not take into account the system messages, so now the selector for chat messages filters them out and leaves only messages sent by users. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fix #614
Messages
Special design: