Commit Graph

55028 Commits

Author SHA1 Message Date
Aman Agrawal 26f7f9d3d8 recent_view: Remove `All` filter.
Fixes #27588

Co-authored-by: cherish2003 <saicherissh90@gmail.com>
2023-11-22 10:31:26 -08:00
Sahil Batra b1d5cd6bf6 realm: Allow setting notification settings to unsubscribed private streams.
We previously did not allow setting signup_notifications_stream and
notifications_stream settings to private streams that admin is not
subscribed to, even when admins have access to metadata of all the
streams in the realm and can see them in the dropdown options as well.

This commit fixes it to allow admins to set these settings to private
streams that the admin is not subscribed to.
2023-11-22 10:01:19 -08:00
David Rosa b392655cdb help: Document updated UI for subscribing/unsubscribing from streams.
Updates instructions for subscribing/unsubscribing to streams via
Stream settings on desktop/web, adding new SVG images for the icons.

Fixes #27753.
2023-11-22 09:06:09 -08:00
David Rosa ad9d1c5380 help: Rename CSS .mobile-icon -> .help-center-icon.
Renames CSS rule that styles Zulip UI icons in the help center
so that it makes sense to use it regardless of whether we are
documenting a mobile or desktop/web feature.
2023-11-22 09:06:09 -08:00
Sayam Samal 2cb4210319 invite: Add setup tips to user invite modal.
We include setup tips to the user invite modal for the following
cases:

At the top of the invite modal
- If the org description is missing.
- If the org profile picture is missing.
- If the custom profile fields have not been added, where we also
  provide a link to the default user settings for the time being,
  until we have a better way to compare if the default user settings
  have been changed.

We also use the new banner ui to display these tips. In doing so, we
extract the banner component from `compose_banner.hbs` to
`popover_banner.hbs`, removing any compose specific code from the
banner component.

Fixes: #24262

Co-authored-by: Lalit <lalitkumarsingh3716@gmail.com>
2023-11-22 09:03:19 -08:00
David Rosa 08d0516b4b help: Document "Manage a user".
Adds a dedicated page to document getting to the user management UI
from the user's profile and from Settings / Users.

Fixes #27748.
2023-11-22 08:33:52 -08:00
Satyam Bansal bf2d216100 integrations: Add action to GitHub discussion comment notifications.
Previously, the notifications had "commented" as the action word
for every event.

As part of these changes, we extract a shared comment action function
in GitHub Integration that's used for both issue and discussion
comment events.
2023-11-22 08:28:03 -08:00
Satyam Bansal 62ec51f715 integrations: Add GitHub discussion comment edit fixture. 2023-11-22 08:28:03 -08:00
Satyam Bansal 9f01876de8 integrations: Update GitHub discussion related fixtures. 2023-11-22 08:28:03 -08:00
Satyam Bansal 22fa5a7ee3 integrations: Use consistent code boundaries in GitHub notifications.
In other templates we have used "~~~" to start and end a code block.
2023-11-22 08:28:03 -08:00
Lauryn Menard a4d1211ec6 integrations: Reformat Github pull request assigned message body.
Instead of adding the assignee to the end of the message body,
we update the message body where the verb is so that the link
formatting at the end of the message is not broken, for example:
"user_a assigned user_b to [issue #XXX title text is here](link)."

This matches the formatting for the issue assigned message body.
2023-11-22 08:26:09 -08:00
Lauryn Menard f6e17fa972 integrations: Reformat Github issue assigned message body.
Instead of adding the assignee to the end of the message body,
we update the message body where the verb is so that the link
formatting at the end of the message is not broken, for example:
"user_a assigned user_b to [issue #XXX title text is here](link)."

Also updates the issue title in the test fixture so that it tests
that only the first instance of "assigned" or "unassigned" in the
issue title is updated for the assignee text.

Also adds punctuation to the issue title in the test fixture to
test the expected behavior for titles that end in a value from
`string.punctuation`.
2023-11-22 08:26:09 -08:00
Aman Agrawal d82efbd503 free_trial: Remove extra onboarding flow.
We still redirect free trial users to upgrade page on first
signup but no longer pass the onboarding param.
2023-11-22 08:06:22 -08:00
Aman Agrawal 2218c49244 billing: Minor changes to text for free trial.
Fixes #27685
2023-11-22 08:06:22 -08:00
Sahil Batra f75b4f65c1 streams: Send user remove events when deactivating streams. 2023-11-21 23:58:45 -08:00
Sahil Batra 4f58733d82 events: Remove deactivated streams from subscriptions field.
We did not remove the objects for deactivated streams from
subscriptions field in apply_event. We need to do this because
we do not send "subscription/remove" events to subscribers
when deactivating streams.
2023-11-21 23:58:45 -08:00
Sahil Batra 45e1b32447 users: Send user remove events on user deactivation.
Guests might lose access to deactivated users if the user
is not involved in any DM with guest. This commit adds
code to send "realm_user/remove" events for such cases.
2023-11-21 23:58:45 -08:00
Sahil Batra 58461660c3 users: Restrict accessing avatar for inaccessible users.
We now return the special avatar used for inaccessible users
when a guest user tries to access avatar of an inaccessibe
user using "/avatar" endpoint.
2023-11-21 23:58:45 -08:00
Sahil Batra 3d96969398 avatar: Update avatar used for inaccessible users.
This commit adds a new avatar image which will be shown for
all inaccessible users.
2023-11-21 23:58:45 -08:00
Sahil Batra 32c15d67b5 users: Send user creation events when sending DMs.
We now send user creation events to recipient users
when sending DMs if recipients gain access to either
sender or other pariticpating users in the DM.
2023-11-21 23:58:45 -08:00
Sahil Batra e4a97dd3ac message: Restrict sending DMs to inaccessible users.
This commit adds code to not allow guest users to send DMs
to users they cannot access.
2023-11-21 23:58:45 -08:00
Sahil Batra 39a31170ee streams: Send event when guest loses access to a user.
This commit adds code to send "realm_user/remove" event
when a guest user loses access to a user due to the user
being unsubscribed from one or more streams.
2023-11-21 23:58:45 -08:00
Sahil Batra d394cfc4db streams: Send user creation events on adding subscribers.
This commit adds code to send user creation events to
guests who gain access to new subscribers and to the
new guest subscribers who gain access to existing
stream subscribers.
2023-11-21 23:58:45 -08:00
Sahil Batra dbcc9ea826 users: Update presence and user status code to support restricted users.
The presence and user status update events are only sent to accessible
users, i.e. guests do not receive presence and user status updates for
users they cannot access.
2023-11-21 23:58:45 -08:00
Sahil Batra 650e55fef8 users: Send events only to users who can access the modified user.
This commit adds code to make sure that update events for changing
a user's role, email, etc. are not sent to guests who cannot access
the modified user.
2023-11-21 23:58:45 -08:00
Sahil Batra 6f14d105a7 create_user: Update data in user creation events for guests.
We do not send the original user data in user creation events
to guests if user access is restricted in realm, as they would
receive the information about user if user is subscribed to some
common streams after account creation.
2023-11-21 23:58:45 -08:00
Sahil Batra a23eff20fe users: Restrict read access to users in access_user_by_id.
This commit adds code to update access_user_by_id to raise
error if guest tries to access an inaccessible user.

One notable behavioral change due to this is that we do
not allow guest to mute or unmute a deactivated user if
that user was not involved in DMs.
2023-11-21 23:58:45 -08:00
Prakhar Pratyush 476b44ae67 stripe: Use 'get_price_per_license' in 'get_initial_upgrade_context'.
This commit updates the 'get_initial_upgrade_context' method
to use 'get_price_per_license' for determining 'annual_price'
and 'monthly_price' based on tier and discount instead of hardcoding.

Also, removed the 'percent_off' page_params as
'get_price_per_license' already performs the price calculation
taking discount into consideration.
2023-11-21 23:39:18 -08:00
Satyam Bansal cda7ed7101 integrations: Use correct type for GitHub pull request comment messages. 2023-11-21 21:05:26 -08:00
Satyam Bansal d2589a5bd1 integrations: Send GitHub pull request comment alerts to correct topic.
Pull request comment alerts were previously sent to a topic for an issue,
which resulted in two different topics for the same PR.

Fixes: #26086.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2023-11-21 21:05:26 -08:00
Satyam Bansal 7ebf572b8e integrations: Add pull request comment fixture to GitHub Integration.
Updated the repo name and pull request number/title for the new
pull request commit fixture to be the same as the one used for the
other pull request test fixtures (e.g. pull_request__opened) so
that the TOPIC_PR can be used in the subsequent updates.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2023-11-21 21:05:26 -08:00
N-Shar-ma 9eeeabf877 compose: Move buttons to popover in 2 batches instead of all at once.
This ensures that there is never too much awkward empty space in the
row of buttons below the compose box.
2023-11-21 21:01:17 -08:00
N-Shar-ma 143db56992 polls: Add option for modal to create polls.
Earlier the `/poll` slash command was the only way to create polls.
To increase user friendliness with a GUI, a button to launch a modal
to create a poll, has been added to the compose box. This button is
enabled only when the compose box is empty, to avoid complexities with
losing / having to save as draft any message already being composed.

The modal has a form which on submission frames a message using the
`/poll` syntax and the data input in the form, and sets the content of
the compose box to that message, which the user can then send. The
question field is mandatory for form submission.

Fixes: #20304.
2023-11-21 21:01:17 -08:00
N-Shar-ma 084718b776 popovers: Wrap modal submission button in a container div.
This is a prep commit for the next commit, which will add a modal for
creating polls. The container div allows a tooltip to be added to the
button in a disabled state (which is needed for the poll modal).
2023-11-21 21:01:17 -08:00
Julia Bichler f74721d926 compose: Allow un-toggle for links.
When toggling off link formatting, it is assumed that the description
does not contain [ and ] characters, and the url does not contain ( and
) characters.

Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
2023-11-21 21:01:17 -08:00
Julia Bichler 2db8563a7e compose: Format button for spoilers.
Note that toggling off spoiler formatting works if either all the
content inside, or the header (if it exists) or both are selected.

Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
2023-11-21 21:01:17 -08:00
Julia Bichler df143137ef compose: Format button for code.
Note that toggling off, only works for code blocks without a specified
language. So toggling formatting off only works for code blocks like:
```
code
```
and not:
```javascript
code
```

Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
2023-11-21 21:01:17 -08:00
Julia Bichler a872ab2a1a compose: Format button for quotes.
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
2023-11-21 21:01:17 -08:00
Julia Bichler c83af7c304 compose: Format button for latex.
Co-authored-by: N-Shar-ma <bablinaneh@gmail.com>
2023-11-21 21:01:17 -08:00
Julia Bichler 63e5e05643 compose: Format button for strikethrough. 2023-11-21 21:01:17 -08:00
N-Shar-ma 4ccbde23cc compose: Reorder and divide compose control buttons into more sections. 2023-11-21 21:01:17 -08:00
N-Shar-ma 30933c5145 compose: Remove gaps between formatting buttons, and make all same size.
Also, added a slight background color change on hover.
2023-11-21 21:01:17 -08:00
N-Shar-ma 42fa4c0011 compose: Refine breakpoints for new compose control buttons.
This is a preparatory commit for new formatting buttons which are added
in the following commits.

Earlier we used multiple classes, each of which handled the hiding or
showing of the element it was applied to, at each breakpoint. Now all
the media queries of those classes have been combined into a new class,
for cleaner and more reusable code. This new combined media query is
also updated to accommodate the new formatting buttons.
2023-11-21 21:01:17 -08:00
Aman Agrawal 3471e84d7f hotkey: Fix emoji popover not triggered in a narrow width range.
We don't show emoji icon on message on width range even if the
logged in user is not the sender, which causes popover to not
be displayed since the reference is not visible.

To avoid such case in future, we just check if the emoji icon is
visible and if not fallback to the ellipsis icon for reference.
2023-11-21 20:56:31 -08:00
Sayam Samal 5c82a923a9 message-editing: Make default "Move messages" form context-dependent.
In the previous menu for moving messages, the default option was
"Move this and all following messages." However, this default choice
was not always aligned with user intentions, particularly when moving
the first or last message in a topic. In such cases, the desired
behavior often corresponds to "Move all messages in this topic" for the
first message and "Move only this message" for the last message.

To address this, we have updated the default options as follows:

1. **When moving the first message in a topic:** The default option is
now "Move all messages in this topic." This change better represents
the user's intention when moving the initial message in a topic.

2. **When moving the last message in a topic:** The default option has
been adjusted to "Move only this message." This change ensures that
users can easily move the last message without affecting other messages
in the topic.

These changes are designed to enhance the user experience and
facilitate the management of topics, especially when users follow or
unmute topics.

Fixes: #27298.
2023-11-21 18:15:11 -08:00
Alex Vandiver 49263ba69f migrations: Keep the existing constraints until the new ones are made.
This removes a window where more violations could enter, and also a
period where indexes which may be useful are lacking.
2023-11-21 21:02:37 -05:00
Alex Vandiver 8b0cecc7e4 migrations: Fix revert migration to not lose all preferences.
Renumbering 4 -> 3, and then 3 -> 2 leads to everyone having their
preferences set to 2.  Swap the order, so that we renumber 3 -> 2,
then 4 -> 3.
2023-11-21 17:56:53 -08:00
M1gue11 2e818a071e
popovers: Insert silent mentions for deactivated users.
Fixes #26858.
2023-11-21 12:28:40 -08:00
Tim Abbott 8a0428ffa5 gear_menu: Fix offer of sponsorship when self-hosting.
This had a logic bug, displaying notices intended for Zulip Cloud to
non-business organizations that were self-hosting.
2023-11-21 12:23:21 -08:00
Tim Abbott 2702e09a98 gear_menu: Fix display of version for forks of betas. 2023-11-21 12:23:21 -08:00