mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
message_edit: Add message edit local echo.
Updates the message editing process to do a local 'echo'. On slow connections, now there is visual confirmation of the edit, similar to when sending messages. The contains_backend_only_syntax logic and check are the same as there. We showing "(SAVING)" until the edit is completed, and on successful edit, the word "(EDITED)" appears. There's likely useful future work to do on making the animation experience nicer. Substantially rewritten by tabbott to better handle corner cases and communicate more clearly about what's happening. Fixes: #3530.
This commit is contained in:
committed by
Tim Abbott
parent
f0fd812cc5
commit
1682d75ea8
@@ -190,6 +190,15 @@ messages.
|
||||
primarily done in `exports.process_from_server` in
|
||||
`static/js/echo.js`.
|
||||
|
||||
### Local echo in message editing
|
||||
|
||||
Zulip also supports local echo in the message editing code path for
|
||||
edits to just the content of a message. The approach is analogous
|
||||
(using `markdown.contains_backend_only_syntax`, etc.)), except we
|
||||
don't need any of the `local_id` tracking logic, because the message
|
||||
already has a permanent message id; as a result, the whole
|
||||
implementation was under 150 lines of code.
|
||||
|
||||
## Putting it all together
|
||||
|
||||
This section just has a brief review of the sequence of steps all in
|
||||
|
||||
Reference in New Issue
Block a user