Commit Graph

51062 Commits

Author SHA1 Message Date
Anders Kaseorg 9db3451333 Remove statsd support.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-25 19:58:16 -07:00
Anders Kaseorg ca6b0d8c5a e2e-tests: Fix ensure_enter_does_not_send.
A variable in the Node.js context cannot be mutated by a function
evaluated in the browser context.  The boolean was also incorrectly
inverted, and a click to open the dialog containing
`enter_sends_choice` was missing.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-25 19:30:35 -07:00
Anders Kaseorg ae7a21834e utils: Fix make_safe_digest type safety.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-25 19:01:01 -07:00
Anders Kaseorg 408ef63404 utils: Fix process_list_in_batches type safety.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-25 19:01:01 -07:00
Tim Abbott 9886cd1488 popovers: Tweak mute/unmute icons for topic menu.
While we use a different convention in recent conversations and
recipient bars, in this context, it make sense for this icon to just
match the action we'll be doing.
2023-04-25 18:00:11 -07:00
Tim Abbott 5c528f164c help: Use correct unmute icon for unmute. 2023-04-25 17:56:47 -07:00
Tim Abbott f4424c38db emails: Remove stale CSS from previous message email designs.
Elements with these classes stopped being generated in
a5c69fb707,
be762f9485, and
3a6fc09a4d.
2023-04-25 17:53:14 -07:00
Daniil Fadeev d79f4d4f46 emails: Fix style regression for dynamically generated content.
The migration to css-inline "fixed" the fact that styles from this
file previously were never applied to the internals of missed-message
emails.

Rewrite much of the CSS to more correctly scope to apply to the
appropriate elements, and document with comments the purpose of most
blocks.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2023-04-25 17:53:14 -07:00
N-Shar-ma 9f2ef69c71 compose: Add banner for unmuting the muted topic a message is sent to.
We add a new banner informing the user if and when they send a message
to a muted topic / stream. It also has a button to unmute the topic.

Fixes: #24246.
2023-04-25 16:16:47 -07:00
N-Shar-ma ff8d209807 compose: Add utility function to clear all compose banners. 2023-04-25 16:04:38 -07:00
David Rosa 6608f2b211 help: Update links for muting / unmuting topics and streams. 2023-04-25 15:04:24 -07:00
Alya Abbott dd4b391229 help: Cover unmuting topics in /help/mute-a-topic. 2023-04-25 15:04:24 -07:00
Hardik Dharmani fa53026244 topic_sidebar_actions: Implement new mute/unmute toggle UI for topics.
For topics in muted streams, replace the "Mute topic" option in the
three-dot topic menu with an "Unmute topic" option, which should make
the topic unmuted. For unmuted topics in muted streams, show the
regular "Mute topic" option, which should specifically mark the
topic as muted, as usual.

Also, used new unmute icon for unmute option in three-dot menu for
topics in muted stream.

Fixes part of #24243
2023-04-25 15:01:52 -07:00
Hardik Dharmani dd001e1a5f recent_conversations: Use unmute icon for topics in muted streams.
Updated click handlers for mute/unmute icons for topics in
recent_conversations to work as per their stream.

Fixes #25124
2023-04-25 13:35:38 -07:00
Hardik Dharmani eee5c99cd7 recipient_row: Use unmute icon for topics in muted stream.
Updated mute_or_unmute_topic to take visibility policy as parameter
and set topic visibility_policy to the passed visibility_policy.

In zulip.css, updated CSS to set opacity as per visibility_policy.

Updated click handlers for recipient_row mute/unmute icons to
work as per stream.

Fixes #25124
2023-04-25 13:35:38 -07:00
Hardik Dharmani 06709bc5da icons: Add new unmute icon SVG.
Added unmute.svg in web/shared/icons. Also added
source and license information for the icon in
docs/THIRDPARTY.

Additionally, used unmute icon for unmute option in
topic_sidebar menu for topics in muted stream.

Fixes #25124
2023-04-25 13:35:38 -07:00
Sahil Batra 99f8c19d6d compose: Show loading spinner in "Schedule" button.
We now showing spinner in the "Schedule" button while the
message is being schedules similar to how we show the spinner
for "Send" button.

Fixes #25182.
2023-04-25 12:51:59 -07:00
Sahil Batra 0e20cdfa50 compose: Fix behavior when scheduling message using slash command.
We show the loading spinner when scheduling message using slash
command as the submit button present is "Send" button and not
"Schedule" button. This commit fixes the behavior to hide the
loading spinner in case of both success and error and also resets
the UI (mainly enabling the textarea element and clearing the
compose box) after successful scheduling of message using the
slash command.
2023-04-25 12:51:59 -07:00
Sahil Batra 639af1d56d compose_ui: Refactor functions to show and hide loading spinners.
This commit refactors show_compose_spinner and hide_compose_spinner
functions to use class of the button instead of ID to select the
appropriate elements such that we can use the same function to show
and hide spinner in "Schedule" button in further commits. For this
purpose, we add a new class compose-submit-button to the "Send"
button and this class will be added to "Schedule" button as well
in the next commit.
2023-04-25 12:51:59 -07:00
Prakhar Pratyush a079bb811b user_topics: Rename 'settings_muted_topics.js'.
This commit renames 'settings_muted_topics.js'
to 'settings_user_topics.js' because the file now
supports the settings for topics with any visibility_policy,
not just MUTED.

It also renames the corresponding test file.
2023-04-25 12:46:05 -07:00
Prakhar Pratyush d5846ab534 user_topics: Rename 'muted_topics_settings.hbs'.
This commit renames 'muted_topics_settings.hbs' to
'user_topics_settings.hbs', because the file now represents the
settings for topics with any visibility_policy, not just MUTED.
2023-04-25 12:46:05 -07:00
Prakhar Pratyush c526543498 settings: Update the 'Muted topics' setting.
This commit updates the existing 'Muted topics'
settings UI to add support for other visibility
policies.

Changes:
Settings sidebar:
1. Rename 'Muted topics' to 'Topics'.
2. Change icon.
Main panel:
3. Rename 'Muted topics' header to 'Topic settings'.
Topics table:
4. Rename 'Date muted' to 'Date updated'.
5. Update the search bar placeholder text to 'Filter topics'.
6. Drop the 'Actions' column.
7. Add a status column with a dropdown set of options.
(Muted, Unmuted, Default for stream)

Fixes #25081.
2023-04-25 12:46:05 -07:00
Prakhar Pratyush e87f2ff408 user_topics: Update 'get_user_topics_for_visibility_policy'.
This prep commit updates the function
'get_user_topics_for_visibility_policy' to include 'visibility_policy'
as one of the keys in the user_topic objects.
2023-04-25 12:46:05 -07:00
Lalit 9cad825d95 refactor: Rename `stream_sort.js` to `stream_list_sort.js`.
Renamed `stream_sort` to `stream_list_sort` to make it clear that this
module is part of the stream_list bundle of modules.
2023-04-25 10:05:59 -07:00
Lalit 2996e8e722 js: Break cyclic dependency between modules related to `stream_data`.
Moved `stream_data.is_active` to `stream_sort.has_recent_activity` to
remove the cyclic dependency between `stream_data` and `stream_topic_history`.
2023-04-25 10:05:59 -07:00
sbansal1999 40cea58f87 ts: Convert fenced_code.js to TypeScript. 2023-04-25 09:31:15 -07:00
sbansal1999 5a758c74e4 fenced_code: Remove unused argument from stash_func calls.
The default stash function (which does nothing, as it's
essentially an identity function) and the function passed
from "markdown.js" do not accept any boolean input.

However, in "fenced_code.js", the function calls provide
a boolean parameter that is not used. This commit removes
that unused boolean argument.

It is required for its migration to TypeScript.
2023-04-25 09:31:15 -07:00
sbansal1999 a4f05af256 dependencies: Add "minimalistic-assert" and its type definitions. 2023-04-25 09:31:15 -07:00
Lalit 833cc71181 ts: Convert input_pill.js to TypeScript.
Migrated input_pill subsystem to TypeScript, used generics to make
it a generic module so that it works with different implementations
like stream_pill or user_pill.
2023-04-25 09:09:48 -07:00
Lalit 83e1d78b7b input_pill: Break import cycle with `compose_recipient.js`.
This commit breaks the trivial import cycle between `input_pill` and
`compose_recipient.js` by manually triggering an on-change event when we remove
a pill which makes sure to run the `update_on_recipient_change` as
the event callback without us having to import it inside `input_pill`
and manually calling it.

Fixes: #25022
2023-04-25 09:09:48 -07:00
Lalit c0e9e463fb input_pill: Refactor `payload` object in `appendValidatedData` function.
Refactored `payload` object such that when we migrate this module to typescript,
we will not have to write an incomplete type definition for this object.
2023-04-25 09:09:48 -07:00
Lalit e5e8c949d3 input_pill: Consistent binding of functions.
This is a prep commit for preparing this module for typescript
migration. We should consistently use `.bind` and bind the funcs
in the final prototype correctly.
2023-04-25 09:09:48 -07:00
Lauryn Menard 9880fcb936 narrow: Document new filters `is:dm`, `dm` and `dm-including`.
Documents narrows now have support for new filters for direct messages:
`is:dm`, `dm`, and `dm-including`. Also documents that `is:private`,
`pm-with` and `group-pm-with` are now legacy aliases for these three
new filters respectively.

Note that API documentation references the help center documentation
for search/narrow filters.

Fixes #24806.
2023-04-25 09:07:08 -07:00
Lauryn Menard ae41e61520 narrow: Remove frontend support for "group-pm-with" operator.
Replaces "group-pm-with" in the web app with "dm-including".
2023-04-25 09:07:08 -07:00
Lauryn Menard 311f436c68 narrow: Add frontend support for `dm-including:` narrow.
Adds support in the web app for `dm-including` operator.

This will deprecate the `group-pm-with` operator, but any changes
to that narrow operator will be in a separate commit since it
returns a different message query. The `group-pm-with` operator
only returned group direct messages, while the new `dm-including`
operator returns both group and 1-on-1 direct messages.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Lauryn Menard 243216cb60 url-encoding: Update URLs for direct messages.
In a previous commit, the frontend of the web app was updated for
URLs with `#narrow/dm/...` for direct messages (group and 1-on-1).

Updates the URLs generated for email notifications and outgoing
webhook notification messages to use the new `/dm/...` format.
2023-04-25 09:07:08 -07:00
Lauryn Menard 0f7341dd48 narrow: Add frontend support for `dm:` narrow and `/dm/...` URL.
Adds support in the web app for `dm` operator. This will deprecate
the `pm-with` operator, but existing links/URLs are still supported
for backwards-compatilibity.

This commit updates the web app default behaviors to default to
the new narrow/URLs `dm/...` and `/#narrow/dm/...` when navigating
and searching in the app.

There is some general clean up of references to private messages
or PMs to be either direct messages or DMs in these changes.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Lauryn Menard d379020726 narrow: Add frontend support for `is:dm` narrow and `/is/dm` URL.
Adds support in the web app for `is` operator with the `dm` operand.
This will deprecate the `is` operator with the `private` operand,
but we keep support for backwards-compatibility with links/URLs.

This commit updates the web app default behaviors to default to
the new narrow/URLs `is:dm` and `/#narrow/is/dm` when navigating
and searching in the app.

There is some general clean up of references to private messages
or PMs to be either direct messages or DMs in these changes.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Lauryn Menard 33886575b2 narrow: Add backend support for `dm-including` operator.
Adds backend support for `dm-including` operator. This will
deprecate the `group-pm-with` operator, but we keep support
for backwards-compatibility.

For testing updates, because the messages returned by these
two operators are different, most of the tests for `group-pm-with`
remain unchanged, but added comments about deprecated state.

Also, cleans up remaining instance of "PM" in `narrow.py` to
be "DM".

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Lauryn Menard 29832de5f6 narrow: Extract function for calculating huddle recipients.
Extracts the code from `by_group_pm_with` that calculates the
huddle recipients. Prep commit for implementing new `by_*`
method for "dm-including".
2023-04-25 09:07:08 -07:00
Lauryn Menard 665e435b58 narrow: Add backend support for `dm` operator.
Adds backend support for `dm` operator. This will deprecate the
`pm-with` operator, but we keep support for backwards-compatibility.

For testing updates, updates the existing tests for `pm-with` to
use `dm`, and adds one basic test for `pm-with` in the `add_term`
tests as the two operators refer to the same `by_*` method.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Lauryn Menard ece752014c narrow: Add backend support for `is:dm` narrow.
Adds backend support for `is` operator with the `dm` operand. This
will deprecate the `is` operator with the `private` operand, but we
keep support for backwards-compatibility.

Note that there is some clean up of references to private messages
in the updated backend test. In commit 43ec7ed, the documentation
for `build_narrow_filter` wasn't updated for the rename of
`BuildNarrowFilterTest` to `NarrowLibraryTest`, so that's also
corrected in these changes.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
Lauryn Menard 45da8c2a54 pm-list-data: Increase max conversations shown in left sidebar.
Incresase the max number of conversations shown when not zoomed
into the direct messages in the left sidebar to be 8 when there
are no unread conversations and 15 when there are unread
conversations.
2023-04-25 08:59:03 -07:00
Lauryn Menard 94837d56cf templates: Add `account-creation` class to `unsubscribe_success.html`.
Adds the `account-creation` class to `<div>` tag in template so that
the associated CSS styles for `white-box p:last-of-type` and the
font-weight are applied.
2023-04-25 08:56:30 -07:00
sbansal1999 77ae3176ca webhooks: Rephrase message for Issue Assigned and Unassigned Events.
This commit rephrases the message for Issue assigned and unassigned
events for GitHub Integration.
2023-04-24 23:16:48 -07:00
sbansal1999 31a9d0e69e webhooks: Change assignee info for Issue events in Github Integration.
This commit changes the assignee info to the correct one.

Earlier, the current assignee info of the issue was used
to create the message but when an issue was unassigned
this would give incorrect information if there are still
assignees left on the issue. Now, it uses the details of
the user who has been unassigned from the issue.
2023-04-24 23:16:48 -07:00
sbansal1999 e15df084ad webhooks: Remove description from Issue Unassigned event message.
This commit removes the description from the Issue Unassigned
event message that is sent by the Github Integration.
2023-04-24 23:16:48 -07:00
sbansal1999 85689a5343 webhooks: Remove description from Issue Assigned event message.
This commit removes the description from the Issue Assigned
event message that is sent by the Github Integration.

Previously when an issue was assigned, the message also had the
description of the issue, which is redundant as the description
has been already sent through the issue created event. After
this commit, the description no longer appears in the message.

Fixes #24554
2023-04-24 23:16:48 -07:00
sbansal1999 566e59f0c2 webhooks: Add issue unassigned fixture to GitHub Integration.
This commit adds the fixture that is received when an issue
is unassigned. This fixture helps in testing the integration
for that event.
2023-04-24 23:16:48 -07:00
sbansal1999 f2e820d103 webhooks: Add issue assigned fixture to GitHub Integration.
This commit adds the fixture that is received when an issue
is assigned. This fixture helps in testing the integration
for that event.
2023-04-24 23:16:48 -07:00