Commit Graph

61792 Commits

Author SHA1 Message Date
Tim Abbott eba4c37eae settings_config: Allow using new user list style. 2024-11-22 13:01:54 -08:00
Karl Stolley 3009223e8b dark_theme: Adjust message colors for higher contrast. 2024-11-22 13:01:54 -08:00
Aman Agrawal abf1183abc condense: Modify height offset to collapse messages.
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).
2024-11-22 13:01:54 -08:00
Karl Stolley ce284a6e89 typeaheads: Increase user-circle size. 2024-11-22 13:01:54 -08:00
Karl Stolley a0826167b6 right_sidebar: Increase user-circle size on avatars. 2024-11-22 13:01:54 -08:00
Karl Stolley c91c16ee95 right_sidebar: Don't adjust user-circle border on row hover. 2024-11-22 13:01:54 -08:00
Karl Stolley 4620e5bf0c user_circles: Introduce icon to user typeahead. 2024-11-22 13:01:54 -08:00
Karl Stolley 6c07e64842 user_circles: Introduce icon into layout-corrected user modal. 2024-11-22 13:01:54 -08:00
Karl Stolley b7352f9d12 user_circles: Introduce icon to group info popover. 2024-11-22 13:01:54 -08:00
Karl Stolley 14bef0fc50 user_circles: Introduce icon to user card avatar. 2024-11-22 13:01:54 -08:00
Karl Stolley 8da90b9f0b user_circles: Introduce icon to personal menu avatar. 2024-11-22 13:01:54 -08:00
Karl Stolley 45cf03bf08 user_circles: Introduce icons to Inbox, Recent conversations views. 2024-11-22 13:01:54 -08:00
Karl Stolley 28830c9371 right_sidebar: Style presence icons for avatars showing. 2024-11-22 13:01:54 -08:00
Karl Stolley eb6074a8a2 user_circles: Set new icons, colors in sidebars. 2024-11-22 13:01:54 -08:00
Karl Stolley 3e7aedf59f user_circles: Remove unused .user_circle_empty_line selector and styles. 2024-11-22 13:01:54 -08:00
Aman Agrawal 933870f2fd message_fetch: Don't include full messages data in sentry logs.
Sentry has a limit for how much data it can store as extra info,
we cannot pass full message object here.
2024-11-22 13:01:40 -08:00
Aman Agrawal 6d66312707 message_fetch: Account for recently sent messages in data verification. 2024-11-22 13:01:40 -08:00
Aman Agrawal 05339921d7 message_view: Verify msg list data state when restoring cached data.
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.
2024-11-22 13:01:40 -08:00
Aman Agrawal 07f9dff62b message_fetch: Extract function to standardize API parameters.
There some common checks we need to perform before requesting
messages from the server. We extract it to be used elsewhere.
2024-11-22 13:01:40 -08:00
Aman Agrawal 20be5fb567 message_fetch: Remove no longer needed check for home filter.
`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.
2024-11-22 13:01:40 -08:00
Aman Agrawal 808a222d41 message_fetch: Remove inaccurate comment.
This comment became inaccurate as we made combined feed to no longer
be a special view.
2024-11-22 13:01:40 -08:00
Aman Agrawal feb6ba6c52 message_events: Remove non matching edited msgs from search result. 2024-11-22 13:01:40 -08:00
Aman Agrawal 99a79ed8f4 message_events: Fix live update for search narrow on content update.
For messages whose content was edited, we ask the server if the
message matches the current search narrow.
2024-11-22 13:01:40 -08:00
Aman Agrawal bbc71cb91a message_events: Update cached msg list data when moving messages. 2024-11-22 13:01:40 -08:00
Aman Agrawal 452d378e1c message_view: Avoid initial fetch if we have enough context to render.
We don't contact the server at all when rendering a narrow if the
locally cached data has enough number of messages.
2024-11-22 13:01:40 -08:00
Aman Agrawal 88d0328e49 message_view: Attempt rendering cached data without contacting server.
For narrows for which we cannot filter the messages locally,
we attempt to select a message without contacting the server.
2024-11-22 13:01:40 -08:00
Aman Agrawal 4b6fd4057c message_events: Avoid populating from outdated cached msg data.
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.
2024-11-22 13:01:40 -08:00
Aman Agrawal fb6432a77d message_events: Add comment. 2024-11-22 13:01:40 -08:00
Aman Agrawal 5e9fe4a83c message_view: Copy fetch status of superset data to msg data.
We can rely on the fetch status of the superset data since it
is now live update for message events.
2024-11-22 13:01:40 -08:00
Aman Agrawal 4dc8cc80fa message_fetch: Extract part of post message fetch process.
This will be useful to separately call when restoring msg list
from cached msg list data.
2024-11-22 13:01:40 -08:00
Aman Agrawal e34b96cb7e message_events: Update cached msg list data for msg property update.
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.
2024-11-22 13:01:40 -08:00
Karl Stolley 6e0913d742 right_sidebar: Match invite-user grid to others. 2024-11-22 13:00:28 -08:00
Pratik Chanda 46651a1591 navbar: Make login button work with keyboard navigation.
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.
2024-11-22 10:55:11 -08:00
Pratik Chanda 633ae45f1d navbar: Make login button focusable.
This commit allows login button in navbar draw focus to
them.

Fixes part of zulip#28037.
2024-11-22 10:55:11 -08:00
Pratik Chanda bb6b25d0d1 navbar_menu: Make userlist-toggle-button work with keyboard navigation.
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.
2024-11-22 10:55:11 -08:00
Pratik Chanda e0e81aa47c navbar_menu: Use switch/case to handle navbar menu toggle.
This commit refactors `change_active_navbar_menu` to use switch/case
to toggle open target menu after closing any open popovers.
2024-11-22 10:55:11 -08:00
Pratik Chanda d4bcf5bae3 navbar_menu: Refactor `change_active_navbar_menu` to use target menu.
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.
2024-11-22 10:55:11 -08:00
Pratik Chanda 566e5e688b navbar_menu: Refactor keyboard events for navbar menu.
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.
2024-11-22 10:55:11 -08:00
Pratik Chanda 9d578247a7 navbar_menu: Add keyboard event check for navbar navigation.
This commit adds a keyboard event check statement for navbar navigation.
2024-11-22 10:55:11 -08:00
Sahil Batra f197d881ca streams: Fix handling empty groups when computing setting values.
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.
2024-11-22 10:48:41 -08:00
Nicklas Steen 90e42ca8ed settings: Fix filter alignment under headings in all settings panels.
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
2024-11-22 10:46:39 -08:00
Prakhar Pratyush ded6bfd3f2 add_new_user_history: Remove the RECENT_MESSAGES_TIMEDELTA limit.
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.
2024-11-22 10:41:27 -08:00
Sahil Batra 7a6159eee2 streams: Do not show archived streams in dropdown.
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.
2024-11-22 10:40:59 -08:00
Harsh c570194ff2 tests: Add assertion for database queries count.
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
2024-11-21 19:02:09 -08:00
evykassirer 28376bf353 buddy_list: Center toggle arrow. 2024-11-21 19:01:48 -08:00
evykassirer 17de265116 buddy_list: Redesign view user links.
As discussed here:
https://chat.zulip.org/#narrow/channel/101-design/topic/.22View.20all.22.20links.20in.20right.20sidebar/near/1976275
2024-11-21 15:17:44 -08:00
evykassirer d43e3c31ea right_sidebar: Redesign invite users link.
Fixes #32266 (second half).
2024-11-21 15:16:45 -08:00
evykassirer d168ff2a0f left_sidebar: Redesign create a channel link.
Fixes part of #32266.
2024-11-21 15:16:45 -08:00
Prakhar Pratyush c5b3d2e434 custom_check: Add rule to avoid creating savepoints.
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.
2024-11-21 14:55:15 -08:00
Prakhar Pratyush 62b3e49075 transaction: Add 'savepoint=True' explicitly in tests, if used.
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.
2024-11-21 14:55:15 -08:00