Commit Graph

6626 Commits

Author SHA1 Message Date
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
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
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
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
Anders Kaseorg 801e267e00 integrations: Properly pass data-categories as a JSON array.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-21 14:41:36 -08:00
Tim Abbott 77cac403ee integrations: Fix jQuery .data mishandling translated category names.
Apparently `.data("category")` would be come back as a single-element
array for some French translations, rather than a string.

We fix this by using `.attr("data-category")` across this file, which
is our preferred coding pattern anyway.
2024-11-21 14:41:36 -08:00
Sahil Batra 90ae342af2 stream-settings: Add info to can_remove_subscribers_group label.
Mention that admins can unsubscribe others from any channel
in the setting label.
2024-11-21 11:28:54 -08:00
Sahil Batra d1e76a9281 streams: Allow admins to unsubscribe others irrespective of setting. 2024-11-21 11:28:54 -08:00
Sayam Samal d619ffa9c4 bootstrap: Remove unused bootstrap button classes.
This commit removes the `button-secondary`, `button-group` and
`bootstrap-btn-group` classes which don't have any corresponding styles
attached to them or are no longer in use in the codebase.
2024-11-21 10:14:26 -08:00
Aman Agrawal 11153eb2c8 settings: Wait for settings overlay to close.
Since pressing `escape` key closes flatpickr and settings overlay
at the same time, we need to wait for the settings to be not
visible.

If we don't wait for the settings overlay to close, the next test
could think the settings overlay is already open and continue with
its tests which can easily become flaky.
2024-11-21 21:34:04 +05:30
Sayam Samal d4aebccd62 portico: Remove `bootstrap-btn.css` dependency from portico.
This commit removes the final vestiges of `bootstrap-btn.css` from
portico, allowing us to move `bootstrap-btn.css` from `common.ts` bundle
to just `app.ts` bundle.
2024-11-21 06:44:05 -08:00
Saubhagya Patel 65f05794ee invitations: Default to empty channel list when inviting guest users.
This commit includes the following changes:
 - While inviting users for guest roles, we display an
   empty channel list rather than the default channel list
   and the default channels checkbox is unselected.
 - While inviting users for non-guest roles we continue
   to select the default channels checkbox.
 - When switching between guest and non-guest roles, the
   previous state of included channels for the guest role
   is restored while inviting a user as a guest.

Fixes: #31988.
Co-authored-by: Aditya <113302312+userAdityaa@users.noreply.github.com>
2024-11-20 16:21:13 -08:00
Vector73 4e89b4a88c settings: Add `can_invite_users_group` realm setting.
Added `can_invite_users_group` realm setting to replace
`invite_to_realm_policy`.
2024-11-20 13:35:05 -08:00
Karl Stolley 4e6d098cda right_sidebar: Suppress empty circle over user avatars. 2024-11-20 13:26:07 -08:00
Karl Stolley 60ce314c87 left_sidebar: Clamp topics to two lines, breaking words as needed. 2024-11-20 12:37:27 -08:00
Karl Stolley 6465c494e5 left_sidebar: Present multi-line topics. 2024-11-20 12:37:27 -08:00
Karl Stolley bb08bf53f7 left_sidebar: Set tighter line-height on inner topics. 2024-11-20 12:37:27 -08:00
Karl Stolley f482639af8 left_sidebar: Prep multiline topics by decoupling from action headings. 2024-11-20 12:37:27 -08:00
evykassirer e5cd6e3432 buddy_list: Add more left padding beside left status circle. 2024-11-20 11:42:36 -08:00
Sayam Samal 35ba96bd9d recent_view: Remove bootstrap classes from recent view buttons.
This commit removes the final vestiges of `bootstrap-btn-default` class
from the codebase, by moving the relevant styles from the
`bootstrap-btn` and `bootstrap-btn-default` classes to the
`button-recent-filters` class.
2024-11-20 11:08:58 -08:00
Tim Abbott 6c981d9385 custom_profile_fields: Remove unused generic title CSS class. 2024-11-19 18:37:02 -08:00
joseph 55ffa76b4c settings: Add missing class to labels in stream settings.
Some labels in stream settings were missing the class name for settings
labels. Add the missing class name to the labels.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph ca650368bc settings: Open group setting typeahead when its label has been clicked.
Add an event listener so that clicking on its label will open the
typeahead.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph 9aaa7719fa settings: Focus on the input when its label has been clicked.
Our user type field utilizes the contenteditable div which isn't a
labelable element, so clicking on its label doesn't do anything. Add
an event listener so that clicking on the label will focus on the input.

The cursor will always be placed at the start of the input if the field
is accessed in this way. This is the browser's default behavior.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph e237faabf5 settings: Open the date picker when its label has been clicked.
Flatpickr isn't a native input element, so clicking on its label
doesn't do anything. Add an event listener so that clicking on the
label will open the date picker.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph 4ab519214a test: Ensure input field is visible before attempting to click on it.
There is an case of flakiness in the test where we attempt to click on
an input field before it's even visible. Make sure the input field is
visible before attempting to click on it.
2024-11-19 18:37:02 -08:00
joseph f1da8a9151 settings: Fix labels using full width of the modal.
Currently, the labels are using the full width of the modal, which results
in a clickable area that is too large. This commit fixes the issue by
setting the width of the labels to just fit its content.
2024-11-19 18:37:02 -08:00
joseph 8332c7d93b settings: Refactor the labels in stream settings.
This commit changes refactors all the labels in stream settings and
corrects the attribute values to fix the interaction between labels and
select/button elements.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph ee66488fbf settings: Refactor labels in organization settings.
This commit changes refactors all the labels in organzation settings and
corrects the attribute values to fix the interaction between labels and
select/button elements.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00
joseph cef901367e settings: Refactor the labels in personal settings.
This commit changes refactors all the labels in personal settings and
corrects the attribute values to fix the interaction between labels and
select/button elements.

Fixes part of #21769.
2024-11-19 18:37:02 -08:00