Commit Graph

60181 Commits

Author SHA1 Message Date
Prakhar Pratyush 52a9846cdf user_profile: Remove 'tutorial_status' field.
The 'tutorial_status' field on 'UserProfile' model is
no longer used to show onboarding tutorial.

This commit removes the 'tutorial_status' field,
'POST users/me/tutorial_status' endpoint, and
'needs_tutorial' parameter in 'page_params'.

Fixes part of zulip#30043.
2024-08-15 13:31:40 -07:00
Prakhar Pratyush ee806c49b9 ui_init: Use OnboardingStep for narrowing on first web app load.
We plan to remove the 'tutorial_status' field from UserProfile
table as it is no longer used to show tutorial.

The field is also used to narrow a new user in DM with
welcome bot on the first load.

This prep commit updates the logic to use a new OnboardingStep
for the narrowing behaviour on the first load. This will help
in removing the 'tutorial_status' field.
2024-08-15 13:31:40 -07:00
Prakhar Pratyush 13c0571183 message_fetch: Use email as operand for 'dm' operator.
In our web client code we use email as the operand for
'dm' operator. Later user_ids_array is set as operand
in 'handle_operators_supporting_id_based_api' before
making the API call.

Earlier, using user_id as the operand was resulting in
the following error during user signup:
data=b'{"result":"error","msg":"Invalid narrow[0]: Value error,
operand is missing","code":"BAD_REQUEST"}

This commit replaces user_id with email as operand.
2024-08-15 13:31:40 -07:00
PieterCK d974c10efc integration-docs: Update Open Collective for new doc format.
Other than reformatting documentation for Open Collective, this
commit also moves it to the "Financial" category from "Communications".
This is because Open Collective is mainly a fundrising + legal status +
money management platform, as stated in https://opencollective.com/.

Part of #29592.
2024-08-15 13:16:14 -07:00
PieterCK 00f9892d8d integration-docs: Update Mention for new doc format.
Part of #29592.
2024-08-15 13:16:14 -07:00
PieterCK 07fda86ff9 integration-docs: Update Netlify for new doc format.
Besides reformatting the Netlify doc, this commit also updates the
instructions to match some UI changes in Netlify. The "Outgoing Webhook"
menu is now called "HTTP Post request".

Part of #29592.
2024-08-15 13:16:14 -07:00
PieterCK 9494620022 integration: Delete Opbeat integration.
Opbeat was acquired by Elastic in 2017[1] and maintained until Elastic
APM went live[2]. Now that Elastic APM is online, it looks like Opbeat
repositories have been marked as archived/unmaintained[3].

[1]: https://www.elastic.co/blog/welcome-opbeat-to-the-elastic-family
[2]:
https://www.elastic.co/observability/application-performance-monitoring
[3]: https://github.com/opbeat
2024-08-15 13:16:14 -07:00
Tim Abbott 60eb621477 help: Update documentation for new deletion feature. 2024-08-15 12:03:49 -07:00
Vector73 80969a62e6 settings: Add `can_delete_any_message_group` setting.
Fixes #30717.
2024-08-15 12:03:49 -07:00
evykassirer dc938768ca message_edit: Avoid use of e.target.
This commit changes some event handlers to pass in relevant
JQuery objects instead of using `e.target`. This will be
necessary for converting message_edit to typescript.
2024-08-15 10:08:07 -07:00
evykassirer b0c90c0ba2 message_edit: Remove unused topic edit code.
`message_edit_topic_propagate` is only used in the template for
moving messages, separate from the message edit template, and
`message_edit_topic` doesn't show up anywhere anymore. Editing
the topic of a message used to be part of the message edit file,
and was removed in 0fc19732bc (diff-c68d68d71e21a4d22f39212a43e4f66ecc774bd17109963fe017d9878aace9bf)
2024-08-15 10:08:07 -07:00
Lauryn Menard 73029c8348 support: Show sponsorship and discount headers for Zulip Cloud. 2024-08-15 09:51:35 -07:00
Lauryn Menard 391c52639f support: Show discount information on remote support views.
In commit 7203661d99, we removed the default_discount field on the
Customer model, but we didn't update the remote support views for
this change.

Adds a has_discount boolean to the SponsorshipData that's used in
the support views for headers, and updates the discount information
on a deactivated remote realm to show any pre-existing discounted
prices.
2024-08-15 09:51:35 -07:00
evykassirer fc2ce3deb2 search: Fix bug preventing closing regular search pills.
In an earlier refactor, `removePill` was being called with the exit
button element instead of the pill. This change fixes that bug by
using similar code to what we previously did (and still do in
input_pill for cases without on_pill_exit).
2024-08-15 09:49:12 -07:00
Prakhar Pratyush c0ac38fe8a docs: Update the stale links in "Set up Git" docs. 2024-08-15 09:46:31 -07:00
roanster007 e104fed6ef echo: Extract the waiting for id and ack into separate module.
This commit extracts the "waiting_for_id" and "waiting_for_ack"
data structures of "echo.js" into a separate module in "echo_state".

This is a preparatory commit so as to be able to use them for
"stream_topic_history" module, without causing import cycles.
2024-08-14 18:24:56 -07:00
Prakhar Pratyush 19d56f77b5 rocketchat: Fix "OSError: [Errno 36] File name too long" error.
Earlier, we were replacing too long attachment name with random uuid
when the character count of the file name was greater than 255.

This results in "OSError: [Errno 36] File name too long" error in
few cases when the file name has less than 255 characters but more
than 255 bytes (file name with Non-ASCII characters).

This commit updates the code to check the file name's byte size
instead of characters count.
2024-08-14 18:18:31 -07:00
Prakhar Pratyush 54492ec7a0 help: Add a note in "Export your Rocket.Chat data" section.
This commit adds a note to NOT shut down Rocket.Chat server
while creating database dump using mongodump utility because
as this results in bugs like empty instances.bson file and
empty uploaded data after import.
2024-08-14 18:18:31 -07:00
Prakhar Pratyush adae69c65f help: Document rocketchat's livechat channels/messages not imported.
We ignore Rocket.Chat livechat channels/messages. It was
implemented in #20195.

This commit documents the caveat.
2024-08-14 18:18:31 -07:00
Tim Abbott 2144904cf5 docs: Explicitly discuss management commands in Zulip Cloud.
This already seems obvious to many users, but it seems appropriate to
spell out.
2024-08-14 14:04:46 -07:00
Tim Abbott e01206d04c help: Document change_auth_methods command.
I also added a basic warning to help avoid folks getting into this
state.
2024-08-14 14:04:46 -07:00
Mateusz Mandera bf7fc5701f management: Add change_auth_backends command.
A utility command to enable or disable certain authentication backends
for a realm from the command line. Can be helpful e.g. if the
administrator accidentally disables some auth methods in the UI leaving
themselves with none remaining that they could actually use to log back
into the organization.

Example usage:
```
(zulip-py3-venv) vagrant@c32c137f59a0:/srv/zulip$ ./manage.py change_auth_backends -r zulip --show
Current authentication backends for the realm:
Enabled backends:
  Dev
  Email
  GitHub
  GitLab
  Google
  Apple
  SAML
  OpenID Connect
(zulip-py3-venv) vagrant@c32c137f59a0:/srv/zulip$ ./manage.py change_auth_backends -r zulip --disable GitHub
Disabling GitHub backend for realm Zulip Dev
Updated authentication backends for the realm:
Enabled backends:
  Dev
  Email
  GitLab
  Google
  Apple
  SAML
  OpenID Connect
Disabled backends:
  GitHub
Done!
(zulip-py3-venv) vagrant@c32c137f59a0:/srv/zulip$ ./manage.py change_auth_backends -r zulip --enable GitHub
Enabling GitHub backend for realm Zulip Dev
Updated authentication backends for the realm:
Enabled backends:
  Dev
  Email
  GitHub
  GitLab
  Google
  Apple
  SAML
  OpenID Connect
Done!
```
2024-08-14 14:04:46 -07:00
Tim Abbott e4567e05ac css: Explode dark theme disabled rule.
This replaces a :disabled selector with individual ones for each
element type; I verified in CSS selector profiling that this change
removes lines that were previously about 10% of profiled CSS selector
processing time for rendering the combined feed.

The reason being that the rendered elements have very few disable-able
elements, but the browser was spending a lot of time trying to match
**every** element for whether it might have been disabled, which was
slow.

This probably reflects a browser bug.
2024-08-14 13:42:59 -07:00
Lauryn Menard 206531f703 help: Fix details in "Change your call provider" section.
Adds note about feature being available only to organization owners
and administrators.

Fixes the icon in the note about BigBlueButton to be the zulip icon
that's currently used in the compose box.
2024-08-14 13:21:43 -07:00
Prakhar Pratyush 39c5bb9fa5 user_topics_ui: Fix 'toggle_topic_visibility_policy' behavior.
This commit updates the stale logic in 'toggle_topic_visibility_policy'
function. It was not updated after the addition of 'follow' visibility
policy resulting in buggy behavior.
2024-08-14 13:20:58 -07:00
Prakhar Pratyush cbc3f84be4 hotkey: Fix 'Shift + M' to not work in unsubscribed channel.
Earlier, 'Shift + M' hotkey was working in unsubscribed channels.

This commit updates the logic to make it non-functional. This
helps to keep the UI consistent as we don't offer a way to
change visibility_policy in unsubscribed channels via
recipient_bar_controls or other UI elements.

Note: We don't implement this restriction in server because
we don't delete the user-topic states in db when a channel is
unsubscribed as it helps to retain those states when re-subscribed.
And implementing this restriction at server level can create
a confusion of why such states exists in db when API doesn't allow.
2024-08-14 13:20:58 -07:00
Alex Vandiver 2bfdccd065 narrow: Do not error when given an empty DM recipient list. 2024-08-14 10:39:40 -07:00
Vector73 fa408a969e api-docs: Handle multiple examples in `responses`. 2024-08-14 09:37:15 -07:00
Tim Abbott 07c927ae88 migrations: Fix Nagios bot cleanup crash.
We didn't correctly check for the possibility that these users don't
exist.
2024-08-13 23:30:32 -07:00
Aman Agrawal a7b86a7e66 filter: Cached computed values for faster comparison. 2024-08-13 23:28:21 -07:00
Aman Agrawal e956ec0483 filter: Make filter comparison more robust and faster.
Convert operand to lowercase for case-insensitive operators.
2024-08-13 23:28:21 -07:00
Aman Agrawal 1ce9fcdada left_sidebar: Fix user unable to type in DM search input.
This was due to non message list views didn't know that they
shouldn't try to process hotkey when DM search input is in focus.
2024-08-13 23:22:50 -07:00
Shubham Padia b322ca4cc3 help-beta: Set pagination to false.
Fixes #31250.
2024-08-13 22:52:53 -07:00
Shubham Padia a746a7e784 css: Remove unnecessary rule for subscriptions_overlay.
Even though the border-color was set for `#subscriptions_overlay
.subsection-parent div`, since the border-style was not set. It did not
have any effect on the appearance of the children div of
.subsection-parent.
2024-08-13 22:36:35 -07:00
Shubham Padia 2081fb52a1 css: Use padding-top instead of putting margin-top on first div.
It has the same visual effect and we do not have to use a div selector.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
2024-08-13 22:36:35 -07:00
Shubham Padia 0d95d79033 css: Use classname instead of div for .flex.overlay-content.
Each child div for .flex.overlay-content has the class
.overlay-container, so it is safe to replace the div with that
classname.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
2024-08-13 22:36:35 -07:00
Shubham Padia 8b96aa277a css: Use classname instead of `div` selector for .blocks.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
2024-08-13 22:36:35 -07:00
Shubham Padia e9d0e1d30d css: Use flexbox for .stream-row and .group-row.
Before this, we were having each direct child div for both the classes
as inline blocks. It is better to just have `display: flex` on the
parent element instead. There is a slight change in appearance which has
been confirmed in
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Subscription.20list.20slight.20look.20change/near/1906254
2024-08-13 22:36:35 -07:00
Shubham Padia b619fbb7a7 css: Remove unused css for top-bar & bottom-bar for subscriptions.css.
These were added in ae7fe85ec5, and
should have been deleted in 333b8b095c.

Having those rules did not make any difference to the subscription and
user group list items.
2024-08-13 22:36:35 -07:00
Shubham Padia 52240e09ff css: Use classname for .thanks-page instead of div.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
2024-08-13 22:36:35 -07:00
Shubham Padia a48ce954aa rendered_markdown: Remove unused .data-container div css.
Having that css there or not did not make any visual difference.
2024-08-13 22:36:35 -07:00
Shubham Padia 996a091bd9 css: Use class_name for .client-logos div.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
We've introduced a new class called `.client-logos-div`.
In `hello.ts` we just manually append the name of this new class for the
logo changing logic since that felt more readable than adding the class
programmatically.
2024-08-13 22:36:35 -07:00
Shubham Padia f0e484ea07 app_components: Remove unused div selector css.
Having the styling there or not did not make any difference visually to
either of the drafts, scheduled messages or edit history overlays.
2024-08-13 22:36:35 -07:00
Alex Vandiver 8e1582d82e support: Reject attempts to approve sponsorship for deactivated orgs. 2024-08-13 20:29:02 -07:00
evykassirer 1806c390c1 search: Navigate results with up/down when input is focused.
What was happening:

* Focus being in the search input text box made Up/Down be handled
  by the browser and move the cursor. This is default browser behavior,
  and not useful to us (you can use home/end for the same goal, but
  also one just doesn't put much text in that input given the pills
  system).
* We probably don't want to push keyboard focus out of the search box
  after completing a search, since that would make it annoying to type
  a new search term or whatnot.

The fix is to just make the existing Up/Down keyboard handler apply
even if the search input is focused.

More context here:

https://chat.zulip.org/#narrow/stream/9-issues/topic/Can't.20navigate.20search.20results.20using.20the.20keyboard.20.2331291/near/1913535
2024-08-13 19:09:20 -07:00
Shubham Padia 5ffb75387a typeahead: Change color for the right hand side option label.
Fixes
https://chat.zulip.org/#narrow/stream/101-design/topic/UI.20redesign.3A.20new.20topic.20indicator.20in.20typeaheads/near/1908770.
We could have made this change specific to the option label for
composebox typeahead only, but I don't see a scenario where all the
other colors are the same for another typeahead but the right option
label color is different. Currently, the option_label is only used in
composebox typeahead, so visually this commit will only affect that
typeahead.
2024-08-13 18:28:32 -07:00
Shubham Padia 10da3e3626 typeahead: Give appropirate name to option label container.
The class was named `typeahead-option-label` for the element containing
the actual option label. We renamed it to
`typeahead-option-label-container` to give it a more appropriate name.
2024-08-13 18:28:32 -07:00
Varun Singh d8dd682944 echo: Convert module to TypeScript. 2024-08-13 09:37:35 -07:00
Varun Singh 3dd8a4c6d5 echo: Fix incorrect check for message `topic`.
The actual check should be for `falsy` (to handle empty string)
and not undefined, since topic is an empty string for
private messages.
2024-08-13 09:37:35 -07:00
Varun Singh 2e12d3cd25 user: Drop `is_mirror_dummy` field from 'user' object. 2024-08-13 09:37:35 -07:00