Commit Graph

50637 Commits

Author SHA1 Message Date
Anders Kaseorg 341f6173aa ci: Enable XML coverage report to fix Codecov uploads.
This was broken by commit 534754442a
(#22039).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-31 15:51:43 -07:00
Alex Vandiver ecd559edd4 settings: Point the "moving messages" help link to the right place. 2023-03-31 14:49:25 -07:00
aparna-bhatt 998f0b3735 stream settings: Fix cancel button in create stream to update the URL.
Clicking cancel button in create stream form wasn't updating the URL hash.
2023-03-31 14:27:36 -07:00
aparna-bhatt 710e42f862 stream settings: Fix archiving of a stream opened in right panel.
We expect the URL to be of stream if it is opened in right panel.
As archiving a stream extracts stream id from hash,
but while a stream is opened and we switch between `All Streams` or
`Subscribed` tabs, the url changes, causing bug in archiving the stream.

As as fix for this issue if a stream is opened in the right
panel the hash of the URL remain of the stream and doesn't update.
If it is archived then the URL updates accordingly.

Fixes #23855.
2023-03-31 14:27:36 -07:00
Lauryn Menard 344d26d936 pm-list-data: Clean up node test for `pm_list_data.js`.
Cleans up node test to use helper functions when setting a filter
and narrow state for private messages and when checking the return
value for `pm_list_data.get_list_info`.

Also, reduces the number of users in the test by creating more
group direct message conversations.
2023-03-31 14:22:30 -07:00
evykassirer 1e62a42d75 compose: Reduce height of compose banners to better match designs.
Figma: https://www.figma.com/file/jbNOiBWvbtLuHaiTj4CW0G/Zulip-Web-App?node-id=2441%3A180271&t=tFynBT5Akes5HJ95-0
2023-03-31 13:52:31 -07:00
evykassirer 4cfafa382a compose: Rename recipient selector classes to be more descriptive. 2023-03-31 13:45:24 -07:00
evykassirer 83b484db32 compose validate: Rename overflow verifier.
This makes it clearer what the return value means.
2023-03-31 13:40:41 -07:00
N-Shar-ma b406cc84ff Revert "typeahead: Fix bug where typeahead showed momentarily on shift + tab."
This reverts commit fa37befe3c, which broke
the topic typeahead after a complete stream name.
2023-03-31 11:08:45 -07:00
Tim Abbott 6c82772e15 compose: Fix incorrect scroll down notice in recent view.
The logic for whether one needs to scroll down to view messages sent
by the current client was incorrectly not checking whether a message
feed was visible at all.
2023-03-31 10:41:06 -07:00
Tim Abbott 872a336598 insert_new_message: Rewrite using all_rendered_message_lists.
This replaces one of the our larger remaining blocks of code with
explicit logic for message_lists.home with logic that should correct
if we support maintaining a different set of rendered message lists.

This should have identical behavior to the previous implementation
given that all_rendered_message_lists is either just
message_lists.home or that plus the current narrowed message list;
can_apply_locally() is always true for the home message list, and the
list === message_lists.current check is equivalent to the more complex
narrow_state.active() check.
2023-03-31 10:41:06 -07:00
Tim Abbott f165e59273 message_events: Check is_message_feed_visible in callbacks.
Because we don't call this function with home_msg_list, I believe the
existing msg_list !== message_lists.current check would have always
been false when the new check is false, but this is more explicit
about the logical intent.
2023-03-31 10:41:06 -07:00
Sahil Batra 2ebb9834cd modal: Fix flex-direction property for modal__content.
The flex-direction property for modal__content should
be set to column as we want to display the elements.

This does not affect most of the modals since they
do not have multiple direct child elements that are
visible at same time and the data-simplebar attribute
already sets the "flex-direction: column" property to
the elements where it is used.

But in the email address visibility modal on user
registration page, there are multiple direct child
elements for the "modal__content" element and we need
to set "flex-direction: column" property for them to
work correctly. We also change the width of select
element in the modal to "fit-content" to avoid it
taking the whole width even when not required.

This commit also fixes the bug in login_to_access
modal, since the `modal__content` for it also
has two direct child elements.
2023-03-31 10:02:42 -07:00
Alex Vandiver 790e4854dd hooks: Run hooks as the zulip user, not as root. 2023-03-30 16:16:37 -07:00
Alex Vandiver 89e366771a prometheus: Add a postgres exporter. 2023-03-30 16:16:18 -07:00
Alex Vandiver c2beb64a79 prometheus: Consistently import the base class and supervisor, if needed. 2023-03-30 16:16:18 -07:00
Anders Kaseorg 99ab700c1b Revert "node_cache: Work around pnpm install issue in Docker for Mac."
This reverts commit 126f3b5f47.

Testing showed that it was ineffective for many users.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-30 16:15:31 -07:00
Anders Kaseorg 9e0be51a56 dependencies: Switch tarball URL from codeload.github.com to github.com.
For some unexplained reason, this makes pnpm work more reliably in a
Docker for Mac shared volume.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-30 16:15:31 -07:00
David Rosa 95d34540a3 help: Add a dedicated page on how to format spoiler blocks. 2023-03-30 09:39:35 -07:00
Alya Abbott 0afd37dbae help: Add a dedicated page on how to format quotes. 2023-03-30 09:39:35 -07:00
David Rosa 56c03de927 help: Add a dedicated page on how to format LaTeX. 2023-03-30 09:39:35 -07:00
David Rosa 9c3efa6880 help: Update Message formatting section and page on code blocks. 2023-03-30 09:39:35 -07:00
David Rosa dad5869c1f help: Add a dedicated page on how to format links.
Also remove the Images section from the "Message formatting" help
page, and drop unused markdown-image.png.

Fixes part of #24209.
2023-03-30 09:39:35 -07:00
Josh Klar ef0c281070 integrations: Add documentation for Mastodon via public RSS feeds.
This uses the Mastodon logo SVG as pulled from
https://blog.joinmastodon.org/logo.svg.
2023-03-30 09:36:16 -07:00
Mateusz Mandera e3f754fb9b help center: Document SAML configuration steps with Auth0.
Auth0 is another SAML IdP that we haven't detailed the instructions for
yet.
2023-03-30 09:11:55 -07:00
Palash Baderia d5a12a7348 read_receipts: Open the help link in a new tab.
This commits improves the read link present inside the read receipts
to open the help page in a new tab.

Fixes: #24778
2023-03-30 09:10:20 -07:00
Alya Abbott e136636715 docs: Clarify "Should I follow this installation guide?" instructions. 2023-03-30 09:08:48 -07:00
David Rosa 2b9374875d templates: Update text on /accounts/find.
- Being more specific about what the user will get.
- Putting less emphasis on entering multiple emails, since most
  people probably just have one email they need to check.
- Using more intuitive wording and hint that deactivated or
  deleted accounts won't be included.

Fixes: #24890.
2023-03-30 09:06:14 -07:00
evykassirer e786c3ac98 dropdown list: Separate get_data() function, no functional change. 2023-03-29 21:58:17 -07:00
evykassirer e5dd2810ee puppeteer: Move functions around in common.ts.
They need to be declared higher so that a future
commit can use them.
2023-03-29 18:14:54 -07:00
evykassirer 01643d1d19 compose: Use stream_name() and topic() abstraction everywhere. 2023-03-29 18:14:54 -07:00
Joelute 75611c6cee integration: Modify branch names for Bitbucket 3 events.
This is a follow up to #24673, we want to modify every webhook events to
follow the same pattern and consistency where branch name should only
show on opened and merged events.
2023-03-29 18:13:36 -07:00
Joelute 1ddfbc94c3 integration: Support reviewer in `get_pull_request_event_message`.
This is a prep commit to help make the changes to make changes to pull
event message easier. Our Bitbucket has been using a custom template to
render the reviewers. This means that values are fixed to how the templates
like it. These changes will allow `get_pull_request_event_message` to
support reviewer and allow for a easier and flexible adjustment to these
messages if needed.
2023-03-29 18:13:36 -07:00
Joelute 4dc85dddc1 integration: Move assignee message to the end for git integrations.
Previously, the assignee message would stick around in the middle of the
event message. This doesn't look as good as if we put it to the end of
the event message. These changes does just that and move the assignee
messages towards the end of the event message to make it look better
and cleaner for the readers.
2023-03-29 18:13:36 -07:00
Aman Agrawal d564025d6a css: Integrate newly designed header. 2023-03-29 17:59:00 -07:00
Mateusz Mandera f3db618cb5 actions: Implement do_delete_user_preserving_messages function.
With an extensive docstring by tabbott documenting its limitations.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2023-03-29 12:51:21 -07:00
Prakhar Pratyush d8a5ca5ddc user_topics: Update test_edit_muted_topic to verify events sent.
Previously, there was a stale code that didn't verify
if 'muted_topics' and 'user_topic' events are sent correctly.

This commit updates the test to verify if the expected
users are notified via 'muted_topics' and 'user_topic'
events.
2023-03-29 09:50:06 -07:00
Prakhar Pratyush 117264fb37 user_topics: Update move-topic codepath to utilise bulk database operations.
This commit updates the move-topic codepath to perform
bulk database operations on the UserTopic record using
user_profiles for each visibility_policy instead of
previously looping over each user_profile one by one.
2023-03-29 09:50:06 -07:00
Prakhar Pratyush 60762a750b user_topics: Update 'set visibility policy' codepath for bulk db operations.
This commit refactors 'set_user_topic_visibility_policy_in_database'
to perform bulk database operations and the related changes.

There is an increase in database query count because requests
to delete user_topic rows now take two queries instead of one.
This is required for logging the info for a request to delete
a non-existent user_topic row while performing bulk operations
at the same time.

The overall query count will be lower while performing
bulk operations (multiple user_profiles instead of one).
2023-03-29 09:50:06 -07:00
Prakhar Pratyush a890aaf34d user_topics: Update UserTopic records regardless of the visibility_policy.
This commit updates the 'do_update_message' codepath to
update the UserTopic records regardless of visibility policy
during the "move-topic" operation.

This is required before offering new visibility policies
in the UI.

Previously, UserTopic records were moved or deleted only
for objects with a MUTED visibility policy.

Fixes: #24574
2023-03-29 09:50:06 -07:00
Prakhar Pratyush 0377085f15 user_topics: Update a comment regarding the database query count.
This commit updates a stale comment regarding query count
to its correct value.
2023-03-29 09:50:06 -07:00
Prakhar Pratyush e1ec814507 user_topics: Add a test helper to improve readability.
This commit adds a test helper function that helps
to remove line wrappings and improve readability.
2023-03-29 09:50:06 -07:00
Prakhar Pratyush 0ec9ff17ce user_topics: Update lib functions to work with any visibility_policy.
This is a prep commit that renames 'set_topic_mutes' and
'topic_is_muted' to 'set_topic_visibility_policy' and
'topic_has_visibility_policy' respectively, and refactors
them to work with any visibility_policy, not only MUTED.
2023-03-29 09:50:06 -07:00
Adarsh Tiwari 78fdb6135a
ts: Migrate gear_menu.js to TypeScript.
Includes adding various missing values to page_params.
2023-03-29 09:36:52 -07:00
Ujjawal Modi de8148bc9e notifications: Warn if all PM notifications will be disabled.
This PR adds a modal to warn when user unchecks a box on the "PMs,
mentions, and alerts" line of notifications panel that will result in
all notifications for private messages and mentions being disabled.

Fixes #24151.
2023-03-28 18:36:56 -07:00
Aman Agrawal ddb0a6bae9 recent_conversation: Fix possibility of undefined topic row.
`topic_row_top = $(topic_row).offset().top;` returns an error
while calling `topic_offset_to_visible_area` since we cannot
find the `topic_row` for some reason which doesn't seem logically
possible but we add logic to handle that case as well.
2023-03-28 17:01:31 -07:00
Tim Abbott b75b40cfa3 compose: Hide compose loading spinner after all failures.
The compose send button spinner (which disables the send button while
present) was correctly hidden in both the happy case of a sent message
as well as for all locally echoed message, in both cases via
clear_compose_box to reset the compose box for a new message.

But for a message that was not locally echoed, and failed to send,
nothing hid the compose spinner, resulting in the user being unable to
attempt to resend the message.
2023-03-28 16:47:12 -07:00
Tim Abbott 43fe61df1f compose: Fix disabled state for compose send button.
Disabling the send button was intended to prevent sending the same
message twice in immediate succession via the enter key.

Since a13058223d, this logic duplicates
the compose_spinner_visible check inside finish(), and more
importantly, was not cleaned up correctly if the message fails to send
without having been locally echoed, resulting in the compose box not
allowing you to send further messages after such a failure.

For successfully sent messages, the disabled state was cleared by
clear_compose_box calling check_overflow_text, which unconditionally
sets the disabled state on the send button based on whether the
message is too long.

Rather than try to clean this state up in the right places, remove
this duplicate mechanism for disabling the compose box.
2023-03-28 16:47:12 -07:00
Joelute a2a9e53423 integration: Refactor `get_issue_event_message` to use kwarg.
Previously, some call sites for the function provided optional
arguments as positional arguments. These changes will allow the
arguments to be passed as keyword arguments to the function and
fix up the call sites of the function to pass keyword arguments
instead.
2023-03-28 15:51:43 -07:00
Joelute a2c578e84d integration: Refactor `get_pull_request_event_message` to use kwarg.
Previously, some call sites for the function provided optional
arguments as positional arguments. These changes will allow the
arguments to be passed as keyword arguments to the function and
fix up the call sites of the function to pass keyword arguments
instead.
2023-03-28 15:51:43 -07:00