Commit Graph

59782 Commits

Author SHA1 Message Date
Sayam Samal f545adcb93 compose_closed_ui: Remove unnecessary code updating the new DM button.
The `update_new_direct_message_button` function sets the text for the
new DM button to "New direct message" on every update cycle, which makes
no difference since the button starts with that text and never changes.
2024-07-18 12:13:03 -07:00
Sayam Samal 39d6d3ed27 compose_closed_ui: Make UI in DMs view consistent with non DMs view.
This adds the "New direct message" button back in the closed compose UI
for DMs view, to make the closed compose UI consistent across the app.

Since the closed compose UI is always visible, and one that is likely
to be used frequently, it makes sense to have the same UI across all
the views to avoid the mental overhead of figuring out how to compose
a message in different views.
2024-07-18 12:13:03 -07:00
Aman Agrawal 48edf4c8b8 typeahead: Ignore mouse position once user uses keyboard.
This keeps the first item focused when user uses keyboard.
User can still move the focused item using mouse and click to select it.
Highlighting an item via mouse and then pressing enter would select
the highlighted item.
2024-07-18 11:52:37 -07:00
Sahil Batra 6b1216402f settings: Hide font size and line height inputs when compact mode is checked. 2024-07-18 11:36:53 -07:00
Sahil Batra d8aedc1f8e settings: Fix flashing of information density setting inputs.
We change the code to update the visibility of information
density setting inputs only on successful completion of
request and not on receiving events.

Visibility of inputs is not being live updated on receiving
events because that leads to flashing of inputs when deselecting
the "Compact mode" checkbox due to the data being sent in
different events and data with the client being different for
time till the all events are received.
2024-07-18 11:36:53 -07:00
Sahil Batra 59068c24e9 settings: Pass dense_mode value if changing other settings.
This commit updates code to pass dense_mode value in request
if changing font size or line height settings to some value
other than legacy settings.
2024-07-18 11:36:53 -07:00
Sahil Batra c1c4c95ce7 settings: Require clients to pass dense_mode value when needed.
Previously, if someone changed the font-size or line height
settings to some value other than the legacy values, we set
dense_mode to False if it was True. This commit changes the
code to require clients to pass dense_mode as False in such
cases and raise an error otherwise.
2024-07-18 11:36:53 -07:00
Sahil Batra 0ea5daece8 user_settings: Flush cache after commiting changes to DB.
We should flush the cache after commiting changes to DB to
make sure that the cache does not contain stale data when
updating multiple settings in a single request.
2024-07-18 11:36:53 -07:00
Prakhar Pratyush e1f3c54a1d message_edit: Fix tooltip not hidden on closing message edit form.
Bug:
A tooltip appears on hovering over a control button in the
message edit form. Now when the form was closed either using
Esc key (cancel) or Enter / Ctrl + Enter (save), the tooltip
didn't disappear. This resulted in a random tooltip visible
in the message list view.

Fix:
Since tippyjs doesn't hide tooltip even after the element is
hidden we need to explicitly hide the tooltip in those cases.
See https://github.com/atomiks/tippyjs/issues/938

This commit fixes the above mentioned bug by explicitly hiding
the tooltip instance.
2024-07-18 10:52:48 -07:00
Kenneth Rodrigues 2be9774192 integration_url_modal: Fix multiple modals opening.
Earlier the `generate integration url` button (fa-link) was still in
focus even after opening the modal.
This caused the modal to open multiple times when the user pressed the
enter key. This commit fixes that issue by focusing on the input
dropdown when the modal is opened.
2024-07-18 10:46:52 -07:00
Kenneth Rodrigues 5023daaf9b settings_emoji: Fix multiple modals opening.
Earlier the `Add a new emoji` button was still in focus even
after opening the modal. This caused the modal to open multiple times
when the user pressed the enter key. This commit fixes that issue by
focusing on the input field when the modal is opened.
2024-07-18 10:46:52 -07:00
Kenneth Rodrigues 87ff793b5a edit_linkifier: Fix multiple modals opening.
Earlier the `edit` button was still in focus even after opening the
modal. This caused the modal to open multiple times when the user
pressed the enter key. This commit fixes that issue by placing the
carat at the end of the first input field when the modal is opened.
2024-07-18 10:46:52 -07:00
Kenneth Rodrigues 37725e4e9f change_password: Fix multiple modals opening.
Earlier the `change your password` button was still in focus even
after opening the modal. This caused the modal to open multiple times
when the user pressed the enter key. This commit fixes that issue by
focusing on the input field when the modal is opened.
2024-07-18 10:46:52 -07:00
Alya Abbott c5d95d4552 docs: Improve mobile push notifications documentation. 2024-07-18 10:15:57 -07:00
Mateusz Mandera e833cd10be docs: Fix bug in upgrades notes for the push notifs settings transition.
The behavior added in #30748 is opposite to what was stated in this
sentence.
2024-07-18 10:15:57 -07:00
Mateusz Mandera 5977d39a8c docs: Fix some entries about user inivitations in changelog.
This item was not accurate.
2024-07-18 10:01:41 -07:00
Anders Kaseorg 97753fe3b0 emoji_names: Rebuild with CLDR 45, emoji-data 15.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 22:49:52 -07:00
Anders Kaseorg 4707edb9d8 install-node: Upgrade Node.js from 20.15.0 to 20.15.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 21:39:03 -07:00
Anders Kaseorg bfd68d5e69 ci: Upgrade github/codeql-action.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 19:37:28 -07:00
Anders Kaseorg e0208784ea docs: Update Black and isort references to Ruff.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 18:33:21 -07:00
Anders Kaseorg 7b8fb017c3 settings: Disable KaTeX server in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 17:58:32 -07:00
Mateusz Mandera 4a93149435 settings: Rework how push notifications service is configured.
Instead of the PUSH_NOTIFICATIONS_BOUNCER_URL and
SUBMIT_USAGE_STATISTICS settings, we want servers to configure
individual ZULIP_SERVICE_* settings, while maintaining backward
compatibility with the old settings. Thus, if all the new
ZULIP_SERVICE_* are at their default False value, but the legacy
settings are activated, they need to be translated in computed_settings
to the modern way.
2024-07-17 17:14:06 -07:00
Anders Kaseorg 722842a0aa rocketchat: Remove unnecessary SHA-1 hashing of direct message groups.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 15:56:00 -07:00
Anders Kaseorg 541699a1c6 mattermost: Remove unnecessary MD5 hashing of direct message groups.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 15:56:00 -07:00
Anders Kaseorg 90cc88c88e mattermost: Split get_recipient_id_from_receiver_name to 3 functions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 15:56:00 -07:00
Anders Kaseorg 27b0618704 data_import: Fix IdMapper typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 15:56:00 -07:00
Anders Kaseorg 1fd3f983a5 data_import: Remove int detection from IdMapper.
This seems to have been used only for HipChat.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-17 15:56:00 -07:00
Karl Stolley daadf28260 search_pills: Fix subtle but serious alignment bug on user pills. 2024-07-17 14:50:35 -07:00
Karl Stolley 27d5227e48 navbar_search: Make search bar conform to short viewports. 2024-07-17 14:50:35 -07:00
Karl Stolley a86465de54 navbar: Keep descriptions and closed search box from colliding. 2024-07-17 14:37:14 -07:00
evykassirer c622622135 search pills: Decode display value.
https://chat.zulip.org/#narrow/stream/9-issues/topic/.F0.9F.8E.AF.20quotes.20representation.20in.20pills/near/1890117
2024-07-17 12:27:40 -07:00
evykassirer 05d4e02dcd search pills: Don't re-narrow when deleting pills. 2024-07-17 12:25:59 -07:00
Sanchit Sharma 6dba4cf943 invite_stream_picker_pill: Hide typeahead after backspacing a pill.
Include `hide_on_empty_after_backspace` when
passing opts to `set_up_streams`

Fixes: #30542.
2024-07-17 12:15:45 -07:00
Sanchit Sharma afe9ac7900 typeahead: Add hideOnEmptyAfterBackspace option.
Ensure that for invite modal the typeahead menu does not
display every time a pill is deleted using the backspace
key.
2024-07-17 12:15:45 -07:00
Sanchit Sharma 65635ab948 invite: Increase clickable area to display typeahead menu.
Previously, the .input area was small, restricting the activation
of the typeahead menu to a small region.
2024-07-17 12:15:45 -07:00
Sanchit Sharma 05cc24d2f0 set_up_streams: Fix function to use value from `opts`
Nullish operator has been used for more clarity.
2024-07-17 12:15:45 -07:00
Shubham Padia ce0e2caba1 icons: Remove unused mail.svg.
zulip-icon-mail was removed here.
2024-07-17 12:08:07 -07:00
Shubham Padia 93e2941fb8 compose_box: Replace zulip-icon-mail with zulip-icon-user.
This commit removes all occurences of `zulip-icon-mail`.
2024-07-17 12:08:07 -07:00
Shubham Padia 0565fbb6ff recent_view: Replace fa-envelope with zulip-icon-user.
We don't have any more occurrences of fa-envelope is our codebase now.
2024-07-17 12:08:07 -07:00
Shubham Padia 2f8238d74c inbox: Replace fa-envelope with zulip-icon-user. 2024-07-17 12:08:07 -07:00
Shubham Padia a696294355 user_card_popover: Change icon for `Send direct message`.
Fixes #30918.
This commit also adds a paper plane icon under `send-dm.svg`. `dm` is
used instead of `direct-message` to opt for brevity when using the
icons.
2024-07-17 12:08:07 -07:00
Shubham Padia e5440c7bba user_card_popover: Replace envelope icon with zulip-icon-user.
Fixes part of #30918.
2024-07-17 12:08:07 -07:00
Shubham Padia f77738c235 navbar: Replace fa-envelope with zulip-icon-user.
Fixes part of #30918.
We don't need `align-self: baseline;` for `fa-envelope` set in
`message_view_header` since this is a different icon and it appears
better without it like other icons.
We also don't need the explicit font-size for switching b/w 14px and
16px mode since `zulip-icon` class takes care of that by default.
2024-07-17 12:08:07 -07:00
Alex Vandiver ab6b6639e6 migrations: Derive emoji content-type from the bytes. 2024-07-17 11:39:04 -07:00
Karl Stolley 8271c2b083 user_circles: Adjust circles top margin on low-res screens. 2024-07-17 11:37:01 -07:00
Prakhar Pratyush 5cdebcb2dd banner: Update banner text for notify_messages_outside_current_search.
This commit updates the banner text in the case of message sent
while in search view to match the narrow_to_recipient_banner text
displayed in other cases.
2024-07-17 11:35:47 -07:00
Prakhar Pratyush 91e935c695 echo: Fix error during local echo while narrowed to search view.
Earlier, on sending a message while narrowed to a search view
'!can_apply_locally()' resulted in error during local echo.

Reason:
In 'insert_new_messages' the call to 'maybe_add_narrowed_messages'
needs message ID to make a GET request to '/messages/matches_narrow',
but during local echo message ID is not available. We were using
'local_id' (a float) resulting in 400 error response.

Fix:
This commit fixes the bug by skipping the discussed GET request
during local echo.
2024-07-17 11:35:47 -07:00
Prakhar Pratyush 3090247221 process_from_server: Fix message sent in search view not appearing.
Earlier, on sending a new message in a search view it didn't
appear in that view for the sender.

This was because the message event received by the sender
was processed by 'msg_list.view.rerender_messages' which
effectively did nothing because the message is not
rendered in the first place during local echo in that
message list view.

We can't determine locally if the message should be added
to the search narrow. So, we use maybe_add_narrowed_messages
when narrowed to such views.

This fixes the bug and the message appears in the search view.
2024-07-17 11:35:47 -07:00
Shubham Padia 629e6c701c settings: Fix eye icon misaligning with password input on small screen. 2024-07-17 11:05:59 -07:00
Shubham Padia e72b42ec13 settings: Add parent div to all input password elements in same row.
We had to specify margin-bottom as 10px separately for
`modal_password_input`, `password_visibility_toggle` and
`settings-forgot-password` classes. We've added a div that encapsulates
all these 3 elements which are meant to be in the same row and gives it
a common margin-bottom.
This is a refactor commit.
2024-07-17 11:05:59 -07:00