Commit Graph

59847 Commits

Author SHA1 Message Date
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
Shubham Padia 2778aa5b0e settings: Fix alignment of `Forgot it` for change your password.
We've removed the unused parent div. We've also removed the class that
was only being used in that div from zulip.css. We've attached a class
to the anchor element now and it has the same name as the class we
removed.
2024-07-17 11:05:59 -07:00
Shubham Padia a4f1c9fd9e settings: Convert password dialog box to use flexbox.
Fixes https://chat.zulip.org/#narrow/stream/9-issues/topic/Eye.20icon.20misaligned.20in.20Manage.20your.20API.20key/near/1890711.
The eye icon to show and hide password was misaligned in the 16px info
density mode. But since the icon was using absolute positioning to style
the icon, we took this chance to refactor the element to use flexbox.
We've renamed the `password-div` to `settings-password-div` for settings
specific styling. The eye icon was only broken in settings, and since
the settings and the login/signup stuff the same class was used at is
quite different from each other, it might be better to have two
different classes. The other `password-div` has not been refactored, it
might be better refactored in its own PR along with other similar
elements to use flexbox.
2024-07-17 11:05:59 -07:00
Karl Stolley eb0f72ecef search_pills: Correct border radius to match images. 2024-07-17 10:31:01 -07:00
Karl Stolley 33d2c8fc4d search_pills: Improve grid for correct alignment. 2024-07-17 10:31:01 -07:00
Karl Stolley f738a68bb1 pills: Make --height-input-pill authoritative. 2024-07-17 10:31:01 -07:00
roanster007 47fad72226 narrow: Fix incorrect message_view_header title in `with` operator.
Previously, when a link containing the "with" operator in an incorrect
narrow is loaded, it used to open the correct view with the wrong
title of the message view header.

This commit fixes it by re building the message view header title
in case the narrow for the "with" operator has changed.
2024-07-17 10:15:54 -07:00
roanster007 125ef2a7d4 search: Fix `with` operator to be a valid search term.
This commit adds the "with" operator to be a valid search term,
which is used while rendering search pills.
2024-07-17 10:15:54 -07:00
roanster007 f02c1e321b topics: Fix unnecessary hashchange calls while using with operator.
Previously, while using "with" operator, even when the narrow
was not updated by the operator, hash change requests were
made.

This commit introduces a new variable - "narrow_requires_hash_change"
which determines whether the narrow was updated and thus
requires a hash change or not.

Fixes #30862
2024-07-17 10:15:54 -07:00
Sahil Batra cf14d8f611 users: Change bot owner only if needed.
This is a small optimization to avoid DB queries if the bot owner
is not changed.

This also helps in avoiding showing the error message in UI if
anything other than the owner is updated for a deactivated bot.
Ideally if the bot owner is not changed, the bot_owner_id field
should not be passed in the request, but we would handle that
later given this is anyways a small nice optimization and we
follow this pattern at other places as well in the API.
2024-07-17 10:07:51 -07:00
Sahil Batra 13eb1381de user_profile: Always include current bot owner in bot owner options.
This change is done to make sure that there is no error if the
bot owner is deactivated as the selected value should always be
present in options.
2024-07-17 10:07:51 -07:00
Shubham Padia 15ea879899 css: Scale font-size for .small buttons.
Fixes #30895.
The root font-size for the app has always been 16px, and it remains the
same when switching between 14px and 16px mode. This leads to
`.small` buttons looking relatively smaller to their surroundings in
16px mode. So, if we use a unit that changes when switching between
modes, we will have to multiple that value by (16/14) so that we don't
change the existing behaviour for the 14px mode and make things smaller.
This commit only affects `.small` buttons, the same named class is used
in other places but does not use rem unit there and therefore does not
require any changes.
The original plan was to use em instead of rem and multiply it by
(16/14 * 0.8), but since em depends on the parent element, there was a
case in the poll button widget where 1em was equal to 16px in the dense
14px mode. While, the right thing to do might have been some refactor to
make it work as desired, the safest thing to do right now might be to
use the --base-font-size-px variable directly for the 9.0 release.
2024-07-17 09:41:43 -07:00
Shubham Padia 16623bf3b7 modal: Scale modal buttons when using 16px mode.
Fixes #30920.

Before this, the buttons remained the same when switching 14px vs 16px
mode because rem was used as the unit and we are not changing the root
font-size for either of the 14px or 16px mode. Root font-size is 16px in
both cases.

We've removed 0.875 out of the 0.875rem for the font-size of the buttons
since 0.875rem is equal to 14px. It has been replaced with the base font
size variable.

We've removed the rem values for padding and border-radius and written
the pixel values directly taking in account 1 rem = 16px. We don't scale
the padding and border when switching b/w 14px and 16px mode, so we
should not do that here too. While keeping the rem around would be the
same as the current pixel value in either of the modes, removing the rem
is still better since we've concluded here that we don't need to scale
the padding and border-size b/w modes.
2024-07-17 09:40:41 -07:00
Lauryn Menard 08d48d3d97 api-docs: Clarify API feature level 271 changelog and changes notes.
Fixes #30864.
2024-07-16 23:40:45 -07:00
Lauryn Menard b9c33ce5f1 api-docs: Add changes section in construct a narrow article.
Adds a header to the section of changes notes about new and
deprecated narrow filters, so that it's easier to directly
link to the relevant content in the construct a narrow article
from the main API changelog and endpoint documentation.
2024-07-16 23:40:45 -07:00
evykassirer 5e975cd54b search: Remove all pills on backspace from fresh open.
More context:
https://chat.zulip.org/#narrow/stream/9-issues/topic/.F0.9F.8E.AF.20backspace.20doesn.27t.20clear.20all.20selected.20search.20pills
2024-07-16 23:32:21 -07:00
evykassirer 9865384d06 input pill: Differentiate how pills are removed in the callback. 2024-07-16 23:32:21 -07:00
Aman Agrawal 155f34412e search: Fix search suggestions not wrapping on overflow. 2024-07-16 23:29:45 -07:00
Aman Agrawal c82012e5e2 typeahead: Move all global typeahead styles together. 2024-07-16 23:29:45 -07:00
Vector73 7a80fcf042 events: Send `delete_message` event to user who deleted the message.
Fixes #29826.

Co-authored-by: Mukul Goyal <goyal.mukul7689@gmail.com>
Co-authored-by: Aman Agrawal <amanagr@zulip.com>
2024-07-16 23:29:02 -07:00
Anders Kaseorg 34d3b2302e blueslip_stacktrace: Handle thrown null or undefined.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-16 23:27:27 -07:00
Prakhar Pratyush cfba2e8837 stream_settings: Rename stream to channel in stream created banner.
When an administrators create channels that they are themselves
not initial subscribers, a channel creation confirmation banner
is displayed in the settings panel.

This commit updates the term "stream" to "channel" in the banner.
2024-07-16 23:27:03 -07:00
Anders Kaseorg 3a535cacdc dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-16 23:25:37 -07:00
Anders Kaseorg f5e2afd693 stylelint: Fix shorthand-property-no-redundant-values.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-16 23:25:37 -07:00
Niloth P 56aa72af90 integration-docs: Update Trello for new doc format.
Part of zulip#29592.
2024-07-16 17:02:55 -07:00
Niloth P c8781b4de7 integration-docs: Update TeamCity for new doc format.
Part of zulip#29592.
2024-07-16 17:02:55 -07:00
evykassirer 074542e7ae search: Always reset the search bar when opening it.
Some time ago, I added a condition to not reset
the search bar if the user had already started
typing, so that we wouldn't erase what they'd
started typing. But we encountered a situation
where the search bar can be opened with text in
it: clicking "searching all public channels"
from a search view. We want to reset the searchbox
to add the `channels: public` pill.

I tried to replicate original issue I encountered
where the search box resetting was clearing user
input and couldn't replicate it. So for now I'm
just removing that if statement.
2024-07-16 16:51:30 -07:00
evykassirer d634d202e3 search pills: Render message header when search content changes.
Before we prevented the message header rendering, but this was
tricky for several reasons, and just re-opening the search bar
seems like a better strategy.

More context here:
https://chat.zulip.org/#narrow/stream/9-issues/topic/.F0.9F.8E.AF.20search.20suggestion.20narrow.20from.20recent.20and.20inbox/near/1890393
2024-07-16 16:50:39 -07:00
evykassirer ad3490ce91 search: Remove extra call to narrow_to_search_contents_with_search_bar_open.
This is redundant, because the typeahead will always call this
through `updater`.
2024-07-16 16:50:39 -07:00
evykassirer e36891923b search: Ensure cursor is at end of input after focus. 2024-07-16 16:50:39 -07:00
roanster007 61f6ec0829 narrow_operators: Add `with` operator to `filter.is_conversation_view`.
This commit updates "filter.is_conversation_view" to be true for
"with" operator. This is important because essentially, the "with"
operator lands you in the same view as the channel-topic narrow
or the "dm" narrow i.e., the last unread message of the narrow.

Hence, the "with" narrow should be handled in a similar way
while determining whether to allow automatically marking
messages as read, or displaying the unread banner, etc.

Fixes #30863
2024-07-16 16:46:39 -07:00
Alya Abbott 48216ca151 help: Add keyboard tip for toggling read receipts. 2024-07-16 16:44:27 -07:00
Alex Vandiver 9983dc761f migrations: Further fix emoji re-thumbnailing.
90701978d9 was an incomplete fix.
2024-07-16 15:38:22 -07:00
Niloth P f663544353 integration-docs: Update Slack incoming-webhook for new doc format.
Part of zulip#29592.
2024-07-16 14:55:56 -07:00
Niloth P 32177a9a1c integration-docs: Update Sonarqube for new doc format.
Part of zulip#29592.
2024-07-16 14:55:56 -07:00
Niloth P a546fa719a integration-docs: Update Sonarr for new doc format.
Part of zulip#29592.
2024-07-16 14:55:56 -07:00