Fixes#31501
Collapse all unread messages that are over min(150 em, 2*viewport_height).
Collapse all bot messages and human messages marked as read that are over max(35 em, 0.65*viewport_height).
When rendering message list directly from cached data, we sometimes
ask server to verify the current data.
If the data doesn't match, we include events at the time cached
data was restored to help with debugging or to determine if there
was race in updating the data.
`Filter.public_terms` will return the same result even if the
narrow is combined feed. Since we are no longer passing
empty narrow parameters for combined feed, this condition is
not required.
When we will no longer clear cached data on moving messages in
later commits, we have to clear cached data for the new filter when
changing narrow to avoid the message list from being populated
from it since the cached msg data is not updated as per the moved
topic and needs to be updated.
We extend the existing logic that updates message events for
rendered message lists to apply for cached message list data
objects as well.
Manually tested for common message property narrows to test
update of the message property.
Earlier in navbar navigation, keyboard events only worked with `gear-
menu`, `personal-menu` and `help-menu`.
This commit introduces the ability to navigate to login in spectator
mode by adding `navbar-item` class and trigger focus to it.
Fixes: zulip#28037.
Earlier in navbar navigation, keyboard events only worked with `gear-
menu`, `personal-menu` and `help-menu`. Now that userlist-toggle is
introduced in navbar, we should make it navigable.
This commit introduces the ability to navigate from `help-menu` to
userlist button by adding `navbar-item` class and trigger focus to it.
Fixes: zulip#29465.
This commit introduces `navbar-item` class for each navbar menus and
`active-navbar-menu` class to indicate active navbar menu. Also
introduces new function `get_target_navbar_menu` to return target
navbar menu from keyboard event. `change_active_navbar_menu` uses target
menu to switch between navbar items.
This commit extracts menu switching logic from `handle_keyboard_events`
to separate `change_active_navbar_menu` to toggle between the current
active navbar menu and the adjacent navbar menu.
Since "Nobody" and other user-defined empty groups has no
members or subgroups, we need a UserGroup query.
Since we are doing UserGroup query, updated the code to
check whether the setting is set to anonymous group or
not just after doing UserGroup query and not in membership
queries.
Also, added tests to check query count when setting is set
to anonymous group.
Previously, when resizing the window, the filters/buttons and the
header did not fit on the same row, the filters/buttons were pushed
onto the next row but not put directly below the heading. This
changes the settings_panel_list_header and
add_default_streams_button_container into flex containers and
properly aligns the items below the heading when changing window
size.
Fixes: #30353
We give the new users some messages in their feed.
Earlier, we were including upto 1000 messages which were sent
within the last 12 weeks.
For realms with low-traffic it results in very few messages
being included in the new user's feed.
This commit removes the 12 week limit.
Now, we simply include upto 1000 recent messages.
Dropdown widget in compose box and in message move modal should
not show archived streams in dropdown as we do not allow sending
messages or moving messages to archived streams.
We need a more focused audit of code for fixing other things
where archived streams are shown.
This commit extends the test for the `/api/v1/register` endpoint
for spectator users by adding an assertion to check the number
of database queries.
Fixes: #32409
This commit adds a custom rule to check python files
and raise lint error if they have transaction.atomic used
without any argument or savepoint=True is used.
It helps to avoid creating unintended savepoints in the future.
We create savepoint at a couple of places in backend tests
to avoid rollback due to error raised within test's transaction.
This commit explicitly adds 'savepoint=True' at those places.