Commit Graph

3 Commits

Author SHA1 Message Date
Lalit 7e52509ee7 ui: Move update_message_lists related functions to other related modules.
This commit moves mainly two functions from `ui.js` to `message_live_update`,
`update_message_in_all_views` and `update_starred_view`. This is done in favor of
eliminating `ui.js` and also these functions are more closely related to
`message_live_update` module than to `ui` module.

We also move `show_message_failed` and `show_failed_message_success` to `echo.js`
for cleaner seperation of responsibilities.
2023-04-26 12:59:08 -07:00
Haridarshan Choudhary d335cb34af
message_events: Avoid full rerender when marking unread.
Previously, when you did a "mark as unread from here" operation, we triggered 
a full rerender of both the recent topics view and the message feed. This was 
needlessly expensive, on and a large server with a somewhat busy CPU from 
other applications, can cause a visible lag, even when the message feed that 
you're looking at only has like 3 messages in it.

Improve this by passing the set of modified messages to the rerender.

There's likely further improvements to be made here -- we shouldn't need to
do more than toggle the unread markers -- but this should be good enough to
eliminate the visible lag.

Fixes #24263.
2023-03-06 10:39:47 -08:00
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00