Commit Graph

63435 Commits

Author SHA1 Message Date
evykassirer
753edc4b1a navbar: Scale navbar with app font size, using em. 2025-02-05 12:33:50 -08:00
evykassirer
bc4ee9a4d0 input_pill: Scale close button with app font-size. 2025-02-05 12:33:50 -08:00
Aman Agrawal
5d4adcc2d7 emoji_picker: Show popover as overlay if reference is not visible. 2025-02-05 12:30:50 -08:00
Prakhar Pratyush
25a0d97a2b zulip_updates: Raise error to explicitly log deactivated channel case.
`zulip_update_announcements_stream` should be set to None when its
channel is deactivated. This commit adds a safeguard to explicitly
raise an error if it is found in a deactivated state, indicating a
potential bug that needs investigation.

Without this commit, we won't face any runtime error but the error
raised would be at a much later stage i.e. while sending message,
with a generic error message i.e. "Not authorized to send to channel "
which would require further investigation to determine the root cause.

This commit helps with an early return and better error message
to debug.
2025-02-05 12:22:39 -08:00
Prakhar Pratyush
fe3199b954 zulip_updates: Add test to verify deactivated channel case.
This commit adds test to verify that we skip the update messages
and directly update the `zulip_update_announcements_level` to the
latest level when the configured `zulip_update_announcements_stream`
is deactivated.
2025-02-05 12:21:55 -08:00
Prakhar Pratyush
77baa05aa9 streams: Set realm stream fields to NULL when streams are deactivated.
When a stream configured for any of these settings is deactivated,
the corresponding realm settings should be set to NULL:
* new_stream_announcements_stream
* signup_announcements_stream
* zulip_update_announcements_stream
* moderation_request_channel

Earlier, we were not updating those realm settings to NULL.
We had helper functions like 'get_new_stream_announcements_stream'
to return None if the configured stream was deactivated.
But it makes more sense to just set them to NULL in DB.

This commit also includes a migration to clear those fields
if the configured channels are deactivated.
2025-02-05 12:21:55 -08:00
Prakhar Pratyush
4063aa4a00 zulip_updates: Replace 'stream' with 'channel' in group DM content.
This commit updates the initial group DM content sent to admins
to use the word 'channel' replacing 'stream'.

We used to call channel as stream.
2025-02-05 12:21:55 -08:00
Prakhar Pratyush
46f518fdbf api_docs: Improve topic parameter docs to list restricted values.
This commit updates the docs to specify that when topics are
required in an organization, the `topic` parameter in
`POST /messages` and `PATCH /messages/{message_id}` cannot be
* "(no topic)"
* an empty string
* `realm_empty_topic_display_name`.
2025-02-05 12:04:39 -08:00
Prakhar Pratyush
d4ae480985 api_docs: Update scheduled_message docs to specify empty string topic.
We missed to update this section of the docs while working
on feature level 334.
2025-02-05 12:04:39 -08:00
Aman Agrawal
5f709245c0 inbox: Allow user to select empty view text.
We likely added this logic to allow links to be opened in new tab
on ctrl + click and not trigger text selection.

We retain this behaviour but allow selection of empty view text.
2025-02-05 05:59:12 -08:00
Prakhar Pratyush
3b279d38a0 api_docs: Improve topic-permalink docs in /api/message-formatting.
This commit updates the wording related to topic-permalink in
`/api/message-formatting` to clarify that the condition applies
when a topic has no messages, not when the topic name is empty.

Also, it reorders examples so that similar input formats are
grouped together, improving readability.
2025-02-05 05:56:46 -08:00
Prakhar Pratyush
23f16885d5 push_notifications: Show EMPTY_TOPIC_FALLBACK_NAME for topic="".
This commit adds support to display `Message.EMPTY_TOPIC_FALLBACK_NAME`
value (translated) in the push notifications for topics having the
actual value of empty string.

Fixes part of #32996.
2025-02-05 05:56:07 -08:00
apoorvapendse
d3b601ef3b copy_and_paste: Support inline tags with katex siblings. 2025-02-04 21:53:44 -08:00
evykassirer
774e981487 settings: Redesign of remove date button.
This fixes placement for larger font sizes and
also updates the button to the newer style.
2025-02-04 16:16:11 -08:00
apoorvapendse
ac8614caf8 copy_and_paste: Fix regression caused by quoting math.
We now do a more precise check to decide whether
to perform the span conversion for intermediate
text nodes.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/HTML.20paragraphs.20misconverted.20by.20copy.20and.20paste.
2025-02-04 16:10:49 -08:00
Sahil Batra
fbbd36b306 group-settings: Live update permissions panel.
This commit adds code to live update permissions panel when
a group gains permission.
2025-02-04 16:08:58 -08:00
Sahil Batra
69437c5bc8 group-settings: Refactor code to fix live update of permissions panel.
This commit refactors the code so that we can correctly update the
permissions panel when a group gains permission. The changes done are-

- Extracted templates for subsection for stream and group settings
because we might need to add complete subsection to DOM if group has
no existing permission for a particular stream or group.

- Also, updated get_group_assigned_realm_permissions to return all
subsection objects even when group has no assigned permission for
a subsection because we now have headers for all the subsection
in DOM but just hide them so that order can be maintained when
a setting of a subsection is added during live update.
2025-02-04 16:08:58 -08:00
Sahil Batra
38b785cf9b settings_config: Extract common list of owner editable group settings. 2025-02-04 16:08:58 -08:00
Alya Abbott
0430a4bd0a contributor docs: Add link to GSoC 2024 blog post. 2025-02-04 15:58:54 -08:00
Alya Abbott
b080ebb140 contributor docs: Drop outdated GSoC projects. 2025-02-04 14:35:02 -08:00
Alya Abbott
8a0e9b87ad integrations: Update documentation on the Zoom integration.
- Duplicate admin instructions on /integrations (with context).
- Move end user instructions to /help.
2025-02-04 12:41:53 -08:00
Mateusz Mandera
a352d35660 retention: Add flag to ArchiveTransaction to prevent automatic deletion.
This adds an index non-concurrently, but the table should be small
enough for this to be fine.
2025-02-04 11:31:13 -08:00
Sahil Batra
bec0326776 group_permission_settings: Use set instead of list.
check_group_permission_settings_data now uses set for the
list of settings defined in data structures in settings_config
which makes the code little efficient when checking if the
data structure contains all the setting names or not.
2025-02-04 11:21:01 -08:00
Sahil Batra
0f1621c88f tests: Add test for default setting values when creating streams.
This test helps in making sure we send the correct setting
value in stream creation events as well especially after
changes in fd70e83980.
2025-02-04 11:21:01 -08:00
whilstsomebody
c4a3b69f5c user_card_popover: Make user name selectable.
The 'user-select: none' property was originally added to
prevent users from highlighting images and menu option text
in popovers. However, applying it to the entire
'.popover-menu' unintentionally blocks text selection in
cases where it's useful, such as usernames in user cards.

This commit refines the approach by restricting by adding
'text-select' class to the username in user cards without
affecting the other elements of the popovers.
2025-02-04 11:19:58 -08:00
Sahil Batra
7bfaf45bcf stream-settings: Fix clicking on "?" in group setting label.
This commit fixes the bug when clicking on "?" icon in group
setting label by making sure that click handler returns early.

Also, updated the handler to use e.currentTarget instead of
e.target when opening the typeahead and focusing the input
as that is more correct and prevents future unexpected bugs.
2025-02-04 11:13:22 -08:00
whilstsomebody
8a64940868 message_edit: Fix "(deleted)" not showing for empty edited DMs.
This commit fixes a bug introduced in commit `37f2c5bc788`,
where a message in DM is not updated to "(deleted)" when
left empty after editing.

Fixes: #33305
2025-02-04 11:02:30 -08:00
Aditya Kumar Kasaudhan
21412b9f79 channels: Auto-mark channel archival event messages as read.
Previously, channel archival event messages were unread in
archived channels, which makes the archived channel accessible
from the inbox view.
This commit fixes this issue by auto-marking the channel archival
event message as read.

Fixes: zulip#33258.
2025-02-04 11:01:20 -08:00
Aditya Kumar Kasaudhan
cbc72fe491 subs: Split test_deactivate_stream_backend test by permission source.
This commit splits the existing deactivation test into two separate
tests — one for realm administrators and one for user group-based
permissions to improve clarity.
2025-02-04 11:01:20 -08:00
Aman Agrawal
0313435b8d inbox_ui: Avoid AssertionError when starting new compose message.
This is hard to debug but likely not a critical UX bug.
2025-02-04 10:44:46 -08:00
Alex Vandiver
59dde93a47 run_hooks: Diff to "last" instead of "current" during post-deploy. 2025-02-04 10:44:17 -08:00
evykassirer
4482d0a009 compose: Use grid for enter sends choices to align radio buttons. 2025-02-04 10:43:51 -08:00
evykassirer
3a8f4bdc22 settings: Simplify tab switcher styles.
Both of these styles work well at both widths, so we don't
need the @container query.
2025-02-04 10:43:10 -08:00
evykassirer
23b29bf283 settings: Move settings-sidebar-width to app_variables. 2025-02-04 10:43:10 -08:00
evykassirer
9bf2a8e317 settings: Change modal sidebar collapse breakpoint to use em and @container.
This applies to the main settings overlay, the stream/subscription
settings overlay, and user group settings overlay.

@container is necessary because @media queries convert em values
using the browser-wide font size, so it won't change properly at
the user-defined app-wide font size.
2025-02-04 10:43:10 -08:00
evykassirer
442d5db99b settings: Center tabs using flex. 2025-02-04 10:43:10 -08:00
evykassirer
05e336c6fc settings: Use em for max-width of modal. 2025-02-04 10:43:10 -08:00
evykassirer
6db27ad7dd settings: Use em for sidebar width. 2025-02-04 10:43:10 -08:00
evykassirer
7da8dfcced settings: Use em for header instead of px. 2025-02-04 10:43:10 -08:00
evykassirer
cc88bcdf2a settings overlay: Use shared variable for subheader height. 2025-02-04 10:43:10 -08:00
evykassirer
43b90dd6db settings: Use flexbox for settings overlay headers.
This affects the user groups and subscriptons overlays
more specifically.
2025-02-04 10:43:10 -08:00
evykassirer
ef02dc093e settings/subscriptions: Use shared variable for header height. 2025-02-04 10:43:10 -08:00
evykassirer
2b95ee7fb6 settings: Remove max-width for table min-widths.
These styles were being added to table cells at narrow widths
that weren't yet at the breakpoint to collapse the settings menu
left sidebar, to make sure those columns would stay wide enough
to be readable.

This commit simplifies the media query by keeping this min-width
for all screen widths above the breakpoint. There doesn't seem
to be a downside to this, since we want to keep those cells
readable at wider widths as well, and at wider widths there's
even more space for the other cells.
2025-02-04 10:43:10 -08:00
roanster007
410ae119d4 markdown: Convert topic links generated by "#-mentions" to permalinks.
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Fixes part of #21505
2025-02-03 18:48:24 -08:00
Tim Abbott
7c90d0a588 mention: Allow linking archived streams.
Now that they are not completely inaccessible, there's no reason to
disallow this.
2025-02-03 18:48:24 -08:00
Tim Abbott
bd8b845a4d mention: Use filter_stream_authorization.
In preparation for accessing the messages in channels to link topics
in them, we need to check channel access.
2025-02-03 18:48:24 -08:00
Aman Agrawal
bb8d0684e7 message_viewport: Fix msg selection not updated on scroll.
Reproducer:
* Mark all messages in a topic as unread.
* Go to recent view.
* Click on topic.
* Scroll
* Message selection is not updated.

To fix this, we don't disable updating message selection unless
we are sure we are going to trigger a scroll event.
2025-02-03 17:11:24 -08:00
Alya Abbott
a4e8b97e28 contributor docs: Document policy for non-code attributions. 2025-02-03 16:50:05 -08:00
Sahil Batra
f644c23e84 groups: Fix code to show newly added settings in permissions panel.
The newly added "can_create_write_only_bots_group" and
"can_create_bots_group" were not added in "Permissions" panel
of groups UI if the group has that permission and this commit
fixes it.

We also add a function called in ui_init.ts to make sure that
the settings data defined in settings_config.ts used for
"Permissions" panel contains all the group settings.
2025-02-03 13:42:02 -08:00
Sahil Batra
fd70e83980 streams: Fix incorrect setting value in stream creation event.
Value for "can_administer_channel_group" passed in stream
creation event was incorrect when there was no value passed
for the setting while creating the stream and thus the setting
was set to anonymous group containing stream creator as default.

This was because code for creating setting_groups_dict, which
is used to send setting values in the stream creation event,
incorrectly assumed that defaults for all settings is a system
group.

This was not noticed before because we pass all the settings
when creating streams using webapp, but can be reproduced
by creating streams using API without passing any value for
"can_administer_channel_group".
2025-02-03 13:42:02 -08:00