Commit Graph

51199 Commits

Author SHA1 Message Date
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
Lakshay Mittal 0b10a33565 search: Fix display of suggestion box when search bar empty.
When search bar is empty and we've reached that state
by using the `backspace` key. There are no suggestions
as there are when you select an empty search bar.

The cause of this was an explicit prevention of this
suggestion box in `typeahead.js` so that the
`backspace` key is free to interact with the other
elements.

The fix here is to add an optional `hideOnEmpty` option
so that if we want this suggestion box to appear we can
set this option to `false` and this behavior will be
prevented.

This option is enabled for the search input when pills are not
enabled.

Fixes: #25062.
2023-04-24 21:45:06 -07:00
Tim Abbott a66c8227d8 node tests: Fix drafts tests for new colors.
This should have part of a03cf8045a3bb9ea47f91901533c3ca2a15ff548.
2023-04-24 18:16:04 -07:00
Aman Agrawal 219a936aee css: Use less saturated colors for PMs. 2023-04-24 17:29:06 -07:00
Aman Agrawal defd1c30df stream_color: Try a different color mix for recipient bar color. 2023-04-24 17:29:06 -07:00
Alex Vandiver 63e31a6de4 upgrade-zulip-from-git: CWD will be the cache directory.
96e42b8e81 broke this when it split out the steps to reset the
upstream.
2023-04-24 17:19:27 -07:00
evykassirer 7c9677becd search: Put typeahead under search bar in the DOM with full width.
Previously the typeahead container was being created at the bottom
of `body`, and its width (and `top` and `left`) were being set to
move it to the right position.

Now it sits in the search box container, which gives it the correct
position and width by default. This is better for DOM readability,
and is also better for the new 100% width (which is part of the
search bar redesign) because it can change width more smoothly
with the search bar when the page changes width.

This commit adds custom functionality to the bootstrap typeahead
to allow the typehead to be placed in the search box container
(whereas previously, it could only be appended to `body`).
2023-04-24 17:15:41 -07:00
Lakshay Mittal e3984f119d popovers: Fix popovers not hiding when clicked on search.
Added `popovers.hide_all()` call in desired functions related
to search bar.

Fixes: #24318
2023-04-24 17:09:36 -07:00
N-Shar-ma f1ec9e139f typeahead: Hide typeahead on clicking outside after clicking its header.
Until now, the typeahead was hidden on clicking outside only if the last
click was not on the header. This happened because clicking the header would
blur the input, and any other click then would not trigger the blur event
(which is responsible for hiding the typeahead).

Now we refocus the input after clicking the header, so that clicking
elsewhere blurs the input and hides the typeahead.
2023-04-24 17:06:56 -07:00
Ujjawal Modi 449febf036 streams: Make stream settings and create stream UI more consistent.
This commit make changes in create stream panel by moving
announce stream option below stream description and adds a
"Stream permissions" section heading just above
"Who can access the stream?" and also rewords the text
"Announce stream".

Also now announce stream option is only shown if the user creating
stream have access to the announcement stream name. When option
is not shown, default behaviour is to announce public and
web-public streams.

Fixes #23327.
2023-04-24 17:02:33 -07:00
m-e-l-u-h-a-n 308f42eded css: Add word-break property to .modal__title.
Modal that were used as dialog boxes for editing info
had issues with long heading text int .modal__title,
This commit add word-break to break words and avoid
abrupt ui in such cases.
2023-04-24 16:53:35 -07:00
m-e-l-u-h-a-n ae16787a25 css: Remove redundant css rule from streams/groups overlay. 2023-04-24 16:53:35 -07:00
m-e-l-u-h-a-n 4b5c073c05 user groups: Minor fixes in CSS common to #groups and #streams overlay.
This commit does following improvements in #streams and #groups overlay.
* Adds word break in the title in the right pane to handle long stream
  and group names.
* Fix positioning of edit (pencil) button to the right end and provide
  maximum available space for stream/group name.

Co-authored-by: Hardik Dharmani <Ddharmani99@gmail.com>
2023-04-24 16:53:35 -07:00
Akarsh Jain b154722dec todo_widget: Fix cursor focus in todo lists.
Previously, when adding a task to a /todo list, after pressing "Add
task", the cursor would move to the "Description" field, which is
not the desired behavior. This commit fixes this issue by ensuring
that the cursor moves to the "New task" field after a task is created.

The core bug was introduced in
68dcdcd28e, which added the incorrect
.focus().

Also tighten the selectors while we're at it.

Fixes #25064.
2023-04-24 16:11:20 -07:00