Commit Graph

625 Commits

Author SHA1 Message Date
Vector73 2e71ec78e3 settings: Add "Automatically follow topics where I'm mentioned" setting.
Fixes: #26795
2023-12-11 23:26:11 -08:00
Prakhar Pratyush 82191872a4 hotkey: Fix go to unread unmuted or followed topic in muted stream.
The N shortcut was not working to go to a unread unmuted or
followed topic in a muted stream.

This commit fixes the incorrect behavior.
2023-12-11 22:32:56 -08:00
Prakhar Pratyush 4df1692294 hotkey: Fix go to unread followed topic in muted stream.
The Shift+N shortcut was not working to go to unread
followed topic in muted stream.

This commit fixes the incorrect behavior.
2023-12-11 22:32:56 -08:00
Sahil Batra 9fd5ed27fe user_groups: Fix live-update of data when renaming groups.
The "user_group_name_dict" value for the old group name key
was not deleted and this led to a bug where the stream creation
UI was incorrectly showing about a user group already existing
with the old group name.

Fixes #28108.
2023-12-10 15:20:07 -08:00
Sahil Batra 75ceba6600 markdown: Do not show mention pills for inaccessible users.
This commit adds code to not show mention pills for inaccessible
users while local echoing the message and in the drafts UI.
2023-12-07 19:34:07 -08:00
Sahil Batra 55fd312379 typing_events: Do not show typing notifications for inaccessible users.
This commit adds code to not show typing notifications for inaccessible
users as the user would not have any information even if we show them
as the name shown would be "Unknown user".
2023-12-07 19:34:07 -08:00
Sahil Batra cd94837d6b drafts: Handle drafts with inaccessible users.
Inaccessible users are now shown as "Unknown user" in drafts UI.
2023-12-07 19:34:07 -08:00
Sahil Batra fef833008f server_events_dispatch: Handle "realm_user/remove" event.
This commit adds code to handle "realm_user/remove" event which
is received when a guest loses access to a user.
2023-12-07 19:34:07 -08:00
Sahil Batra bd1d0e6b46 settings: Handle inaccessible users in muted users list.
Inaccessible users are shown as "Unknown user" in muted
users list.
2023-12-07 19:34:07 -08:00
Sahil Batra abf7b9225f search: Do not show inaccessible users in search suggestions.
We do not show inaccessible users in search suggestions.
2023-12-07 19:34:07 -08:00
Sahil Batra 2da3bd2813 reactions: Handle reactions by inaccessible users.
Inaccessible user names are shown as "Unknown user" in the
reacted users list and tooltip.

This commit removes the call to `is_known_user_id` since we
may have reactions data from inaccessible users. And it is
fine to remove the `is_known_user_id` call anyways, because
it was added to ignore showing reactions from deactivated
users when the client did not have data about them, but now
the client has data about deactivated users.

So we anyways do not expect unknown user IDs in cases
other than inaccessible users for which we have to show
the reactions by showing their name as "Unknown user".

This commit also updates the comment for "is_known_user_id"
function accordingly.
2023-12-07 19:34:07 -08:00
Sahil Batra ce6dc40a42 markdown: Handle mention pill behavior for inaccessible users.
We do not update the name for mention pills of inaccessible users
and keep it same as it was in the message content, and we show
the "Unknown user" popover on clicking the pill.
2023-12-07 19:34:07 -08:00
Sahil Batra d67717c0d7 scheduled_messages: Handle scheduled messages to inaccessible users.
Inaccessible users are shown as "Unknown user" in the scheduled
messages list.
2023-12-07 19:34:07 -08:00
Sahil Batra 99f4f914e2 users: Handle UI for bots when bot owner is inaccessible. 2023-12-07 19:34:07 -08:00
Sahil Batra 30910a3403 settings_emoji: Handle unknown users as emoji authors.
Inaccessible emoji authors are shown as "Unknown user" in
emoji list.
2023-12-07 19:34:07 -08:00
Sahil Batra 380ff91c0e users: Do not pass unknown users data for webapp.
This commit sets the client capability value to not pass
unknown users data in the webapp and also does some changes
to avoid errors while loading the web-app home page.

This commit only does some basic webapp changes to not show
inaccessible users in sidebar and we would need need more
changes to make the web-app work as expected which will be
done in further commits.
2023-12-07 19:34:07 -08:00
Sahil Batra 3d181a8ee1 settings: Remove "User groups" panel from settings overlay.
The "User groups" panel is now removed from settings overlay
and we instead use new "#groups" UI.

This commit also makes some changes to tests to ensure coverage
for pill_typeahead.js which was previously done by
settings_user_group_legacy.test.js. We have still not got
complete coverage on user_pill.ts as we have removed
settings_user_group_legacy.test.js, but we just add the file
to EXEMPT_FILS list for now and will handle it in future.

Fixes #28012.
2023-12-07 06:35:38 -08:00
Prakhar Pratyush bbfcb2dcb3 banner: Make banner about automatic follow/unmute topics one-time only.
Fixes: #27847.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush 83bd9955e3 events: Add 'onboarding_steps' event deprecating 'hotspots'.
Earlier, the event sent when an onboarding step (hotspot till now)
is marked as read generated an event with type='hotspots' and
'hotspots' named array in it.

This commit renames the type to 'onboarding_steps' and the array
to 'onboarding_steps' to reflect the fact that it'll also contain
data for elements other than hotspots.
2023-12-06 18:19:20 -08:00
Sayam Samal e2485b7ee8 notification_settings: Add tooltip to checkboxes in the triggers table. 2023-12-04 16:38:19 -08:00
Anders Kaseorg 1efc6efd23 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-01 18:52:00 -08:00
Anders Kaseorg 9c7453c11e people: Downgrade get_user_time error to warning.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-30 12:36:06 -08:00
Aman Agrawal 47cdffb5fb recent_view: Drop unread header for spectators. 2023-11-29 21:47:36 -08:00
Sahil Batra 7da68259a6 presence: Do not raise blueslip error for presence data of unknown user.
We have already fixed the actual bugs that were resulting in client
receiving presence data for unknown user, so we can remove the
blueslip logging and just skip the unknown users.
2023-11-29 12:01:37 -08:00
Sayam Samal 9191f1a7eb uploads: Extend drag and drop upload area to the navbar. 2023-11-29 10:35:18 -08:00
Sayam Samal def4cf7f93 uploads: Extend drag and drop upload area to blank areas after sidebars.
To extend the drag and drop upload area to blank areas after sidebars,
we now detect the drag/drop event on the entire ".app" division.

We also change replace `width` and `height` css properties with
`min-width` and `min-height` properties respectively, to make sure
that the ".app" div spans the entire width and height of the viewport.

Fixes: #27550.
2023-11-29 10:35:18 -08:00
Anders Kaseorg 07bd1f28d1 time_zone_util: Avoid relying on timeZoneName: "longOffset".
Safari doesn’t support it yet.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-29 09:57:10 -08:00
evykassirer 32c730e530 emoji: Fallback to Google Modern for unsupported new Twitter emoji.
The Twitter emoji team was laid off in 2022, so new emoji aren't supported.
https://github.com/twitter/twemoji/issues/570#issuecomment-1303422143.
The "twitter" sprite sheet we’re using does have images in those locations,
but they’re fallback images that emoji-datasource fills in from the Apple
sprite sheet, which has unclear licensing implications.

To be able to support newer emoji, we fallback to Google Modern for any emoji
not covered by Twemoji.

CZO conversation:
https://chat.zulip.org/#narrow/stream/107-kandra/topic/emoji.20changes.20in.208.2E0/near/1689918
2023-11-28 23:46:49 -08:00
N-Shar-ma 9d3a606bfb compose: Add banner to go to conversation when replying in search view.
When a user is replying to a message while in a search view, we now warn
them that the full conversation is not visible and urge them to go to
the conversation they are composing to, so they can see the complete
conversation. On narrowing to that conversation, the banner is removed.

Fixes: #25893.
2023-11-28 16:55:05 -08:00
Anders Kaseorg 06c2b89525 timerender: Use an explicit time zone for all rendering.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-28 16:54:00 -08:00
Anders Kaseorg 33e335dbd1 time_zone_util: Add zoned date/time utility functions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-28 16:54:00 -08:00
Tim Abbott 39fb1a0f70 message_fetch: Fix get_frontfill_anchor fallback.
This fixes a very rare exception seen in production, which the
previous assertion allowed us to understand was possible in a rare
race, now documented in comments.
2023-11-28 15:08:00 -08:00
Prakhar Pratyush 451ddf4c84 typeahead: Show @-topic typeahead whenever it might be possible to use.
Earlier, when a topic had less than 15 participants,
the @-topic typeahead was not visible. It should be visible
irrespective of the 'realm_wildcard_mention_policy' setting
when the participant count is not greater than 15.

The participant count for a topic can't always be calculated
accurately in the client as some of the messages might still
be loading.

We show @-topic in the typeahead whenever it might be possible
to use it.

We will give an error later if you aren't allowed to use it.

Fixes #27852.
2023-11-28 09:24:18 -08:00
Prakhar Pratyush 590d43f475 mentions: Rename 'stream_wildcard_mention_allowed_in_large_stream'.
This prep commit renames:
* 'stream_wildcard_mention_allowed_in_large_stream' to
'wildcard_mention_policy_authorizes_user' because the function
checks if the sender is allowed to use wildcard mentions based
on the 'wildcard_mention_policy' setting, and we plan to use that
for topic wildcard mentions too.

* 'stream_wildcard_mention_large_stream_threshold' to
'wildcard_mention_threshold' because this value is going to be
used as a threshold value for the max number of subscribers and
participant count allowed for stream and topic wildcard mention
respectively.
2023-11-28 09:24:18 -08:00
Aman Agrawal fce35fc53b recent_view: Show checkbox icon for unread filter.
I accidentally removed the filter_unread parameter passed to the
template.
2023-11-27 07:57:42 -08:00
Prakhar Pratyush 9c5cfe83ba desktop_notification: Fix bad rendering of math formulas.
Earlier, for the desktop notifications having latex math
like "$$1 \oplus 0 = 1$$, the notification had the math
included multiple times.

This commit fixes the incorrect behavior by replacing
the KaTeX with the raw LaTeX source.

Fixes #25289.
2023-11-26 23:30:24 -08:00
Riken Shah 8d633cc368 hotspot: Add backend changes for non-intro hotspots.
This commit introduces non-intro hotspots.
They are a bit different than intro hotspots in the
following ways:

* All the non-intro hotspots are sent at once instead of
sending them one by one like intro hotspots.

* They only activate when a specific event occurs,
unlike intro hotspot where they activate after the
previous hotspot is read.
2023-11-24 07:49:24 -08:00
Prakhar Pratyush 0c159c5f47 mention: Fix mention highlighting in unsubscribed streams.
Rules followed:
1. Bold and highlighted background if the mention was processed
as a mention that includes you.
2. Bold personal mention (but not highlighted) if you were mentioned
but not subscribed at the time.
3. Otherwise not bold, no highlighting.

As we plan to keep the mention pill CSS the same if a user
was mentioned via that personal/wildcard/usergroup mention
irrespective of whether the user is subscribed or not, we use
usermessage flags to determine when to add 'user-mention-me' class.

Fixes #27654.
2023-11-24 07:10:20 -08:00
Prakhar Pratyush 49388d5d3d topic_mentions: Fix restriction rule for @-topic mentions.
Now, the topic wildcard mention follows the following
rules:
* If the topic has less than 15 participants , anyone
can use @ topic mentions.
* For more than 15, the org setting 'wildcard_mention_policy'
determines who can use @ topic mentions.

Earlier, topic wildcard mentions followed the same restriction
as stream wildcard mentions, which was incorrect.

Fixes part of #27700.
2023-11-23 12:52:25 -08:00
Prakhar Pratyush 31a731469d stream_mentions: Update compose banner text when @-stream restricted.
We simplify the banner message by replacing the
"stream wildcard mentions" text with `"@stream mentions`,
`"@-all mentions"`, or `"@-everyone mentions"` text.
2023-11-23 12:52:25 -08:00
Sahil Batra 189718dc64 settings: Add support to change user-access setting in development.
This commit updates the backend code to allow changing
can_access_all_users_group setting in development environment
and also adds a dropdown in webapp UI which is only shown in
development environment.
2023-11-23 10:40:42 -08:00
Aman Agrawal 1e7b4ae160 recent_view: Add drodown widget to filter topics. 2023-11-22 23:38:52 -08:00
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
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
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