Commit Graph

63422 Commits

Author SHA1 Message Date
Anders Kaseorg
22de8cfea3 counts: Fix current_month_accumulated_count_for_user bounds.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-28 15:15:21 -08:00
Tim Abbott
1044af0015 api: Clarify semantics of sender_id for message edit typing. 2025-02-28 13:23:52 -08:00
opmkumar
c97fd1bca5 api: Rename edit typing endpoint to /messages/{message_id}/typing.
This is more consistent with how other URLs work in Zulip.

Replaces `/message_edit_typing` with `/messages/{message_id}/typing`.
The `message_id` parameter, previously passed in the request body,
is now included in the URL path.
2025-02-28 13:20:46 -08:00
Alya Abbott
61db2bc158 integrations: Update GitHub intergation for new configuration UI. 2025-02-28 13:04:42 -08:00
Prakhar Pratyush
32263b4b8d buddy_list: Fix missing 'THIS CONVERSATION' section for 'general chat'.
Earlier, 'THIS CONVERSATION' section was missing in the right sidebar
when narrowed to empty string topic.

This commit fixes the bug.
2025-02-28 13:02:22 -08:00
Alya Abbott
dfe189f189 help and integrations: Update doc on using Zulip via email. 2025-02-28 10:42:29 -08:00
Shubham Padia
3fb2695a32 message: Add is_modifying_message argument to bulk_access_messages.
Although, currently there are no scenarios where we are using
bulk_access_messages for edit. But we might do so in the future, and
it's better to have an explicit argument called is_modiying_message in
that case, so that the person making that change makes a conscious
decision of setting that property.
2025-02-28 10:10:33 -08:00
Shubham Padia
0def74b097 message: Make is_modifying_message a mandatory kwarg.
This is valuable so that one is forced to explicitly make a decision
on what is correct when adding new callers. Past experience tells us that
not having to explicitly show the decision leads to people introducing
security bugs in PRs that the maintainer has to catch in review, and our
goal for access control code should be that security bugs are hard to write.
Fixes #33688.
2025-02-28 10:10:33 -08:00
Shubham Padia
1a84a30759 typing: Add archived stream tests for typing and message_edit_typing.
Fixes part of #33688.
2025-02-28 09:27:28 -08:00
Shubham Padia
7f08278ce0 typing: Don't send typing notification if you can't send message.
We did not add any checks for `message_edit_typing` since it is not
possible to get to that state in the UI for an archived channel's
messages.
Fixes part of #33688.
2025-02-28 09:27:28 -08:00
Shubham Padia
da7354ca89 message: Make is_modifying_message a mandatory kwarg.
This is valuable so that one is forced to explicitly make a decision
on what is correct when adding new callers. Past experience tells us that
not having to explicitly show the decision leads to people introducing
security bugs in PRs that the maintainer has to catch in review, and our
goal for access control code should be that security bugs are hard to write.
Fixes part of #33688.
2025-02-28 09:27:28 -08:00
Shubham Padia
0f7982e4c8 test_markdown: Add content and metadata access asserts.
It's good to verify the claims we are making in the comments before the
actual test code block.
2025-02-28 09:03:38 -08:00
Sayam Samal
48dae579b2 alerts: Remove --base-font-size-px and allow font-size to be inherited.
This is a follow-up commit to d1de4457dc,
which had set the font-size for the alert popups to --base-font-size-px.

This removes that line of code, as it was pointed out by Tim Abbott
that the web/styles/alerts.css file was also being shared with portico
through the web/src/bundles/common.ts bundle, but the
--base-font-size-px variable doesn't exist there.

Removing the font-size property from the alert box doesn't affect its
styling since it still inherits the `--base-font-size-px` from the body
in the Zulip Web App.
2025-02-28 09:03:00 -08:00
Sayam Samal
d1de4457dc alerts: Enable font scaling in alert banners. 2025-02-27 23:22:04 -08:00
Aman Agrawal
7e16a4e778 test_message_summary: Fix failing tests.
Tests were failing due to credit usage being capture in the next
month instead of current if the current time is last day of the
month. To fix this, we mock current time to not be the last day
of any month.
2025-02-28 12:10:16 +05:30
Alya Abbott
986837af01 updates: Add update message (level=13). 2025-02-27 16:55:34 -08:00
evykassirer
ffe6e0fa35 reactions: Stop using height: fit-content for emoji picker.
This fixes a bug introduced in b2c5eed70d
and discussed here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20triangle.20next.20to.20emoji.20button/near/2105156
2025-02-27 15:21:04 -08:00
evykassirer
79a8b10407 modal: Scale channel email widget and email header with font size. 2025-02-27 14:40:48 -08:00
Anders Kaseorg
f8b027a4e2 copy_messages: Remove clipboard.write usage.
The clipboard.write API requires new permissions and can throw
NotAllowedError under certain circumstances in the browser (and always
in the current version of Zulip Desktop).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-27 14:24:54 -08:00
Karl Stolley
0ee4ab3601 compose: Correct alignment, ellipsis on general chat placeholder. 2025-02-27 13:30:09 -08:00
Anders Kaseorg
b3e0253eec eslint: Unify JavaScript and TypeScript configs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-27 13:29:41 -08:00
Alya Abbott
6f272d99d1 help: Remove outdated admin-only banners. 2025-02-27 13:27:44 -08:00
Alya Abbott
c3ffb60ebb help: Update for new channel management permissions. 2025-02-27 13:27:44 -08:00
Alya Abbott
1a63c46b14 help: Move channel types into an include file. 2025-02-27 13:27:44 -08:00
Alya Abbott
b6ff852d89 help: Add note about permissions to subscribe to channels. 2025-02-27 13:27:44 -08:00
Alya Abbott
0b86598e71 help: Add "subscribe to a channel" link to sidebar. 2025-02-27 13:27:44 -08:00
Alya Abbott
eb1cc50e65 help: Document new "who can subscribe" channel setting.
Also clean up link labels for "who can subscribe other users".
2025-02-27 13:27:44 -08:00
Alya Abbott
71aad4d4a4 help: Rename mislabeled include file. 2025-02-27 13:27:44 -08:00
Prakhar Pratyush
b1ddb2d5a9 compose_banner: Fix automatic visibility policy banner rendering.
Earlier when a new user sent a message in empty string topic,
it resulted in an error while displaying the automatic new
visibility policy banner.

'topic_name' was missing.

This commit fixes the bug.
2025-02-27 11:41:15 -08:00
Karl Stolley
390ab9d7c5 sidebar_vdots: Scale vdots areas to maintain square target. 2025-02-27 11:37:05 -08:00
Karl Stolley
ecbcfd23d5 right_sidebar: Perfectly align all right-sidebar vdots. 2025-02-27 11:37:05 -08:00
Karl Stolley
5b28684a72 right_sidebar: Improve available space in buddy list. 2025-02-27 11:37:05 -08:00
Sahil Batra
c2f1b3673e register: Optimize computing realm group setting values.
We do not fetch all the realm group settings using
select_related for register data now since it takes a
lot of time in planning phase. This commit updates
the code to fetch all the members and subgroups data
in user_groups_in_realm_serialized so that we do not
need to access each setting group individually.

user_groups_in_realm_serialized is updated to send the
required data accordingly.

Fixes #33656.
2025-02-27 10:03:28 -08:00
Sahil Batra
643182ce42 user_groups: Refactor code in user_groups_in_realm_serialized.
Following improvments are done in user_groups_in_realm_serialized-
- Members and subgroups are fetched using a single query using
union.
- Query to fetch groups now does not fetch setting fields since
we already have the members and subgroups of all the setting
groups and we can check if setting group was a named group
or not directly without checking named_user_group field of
UserGroup object as we have IDs of all named groups of the realm.
2025-02-27 10:03:28 -08:00
Sahil Batra
75b5d43a91 groups: Rename AnonymousSettingGroupDict to UserGroupMembersDict.
This change is done because we would use the same data structure
for named user groups as well in future commits.
2025-02-27 10:03:28 -08:00
Prakhar Pratyush
1ac7c2b942 migration: Handle conflict in UserTopic when topic="" pre-exists.
When a channel has both "general chat" and "" topic and a user
has visibility policy configured for both the topics, then
the migration to rename "general chat" to "" resulted in error
as it violated '(user_profile_id, stream_id, lower(topic_name)'
unique constraint.

This commit fixes the error.

For each row with topic="general chat", we create a new row
with topic="". On conflict we update the visibility policy
of the existing row -- we prefer the visibility policy of
'general chat' topic over "" as we're renaming 'general chat'
to "" so the configured policy of 'general chat' should be
preferred and any "" topic created wouldn't be intentional
or would be for testing purpose as it is not announced yet.

Finally, we delete the rows with "general chat" topic.
2025-02-27 09:44:27 -08:00
Aman Agrawal
eaec4fca50 typeahead: Show ellipsis for overflowing primary text.
Fixes #31392
2025-02-27 09:25:59 -08:00
evykassirer
04e30ab1df typeahead: Scale header text with font size. 2025-02-27 09:23:05 -08:00
Aditya Kumar Kasaudhan
18d83534ff github: Include old issue number in transfer message for new repo.
This commit updates the GitHub webhook integration to include the
old issue number in the transfer message sent for the new repository,
alongside the old repository's full name.
2025-02-27 09:22:15 -08:00
Sahil Batra
f9107adaa4 streams: Do not archive vacant private streams.
We no longer archive private streams when they become vacant,
since user can still have permissions to subscribe to it.

And streams can anyways be archived manually if needed.

Fixes #33689.
2025-02-27 09:21:03 -08:00
Aman Agrawal
96eb49d947 hotkey: Fix = to toggle reaction results in error.
Fixes #33574

This was due to the method used to get the emoji name was incorrect.
2025-02-27 09:13:48 -08:00
Prakhar Pratyush
cee474876d message_edit_history: Fix empty string topic not displaying correctly.
Earlier, for topic-edit involving empty string topic the rendered
topic name was not buggy.

We used to display `""` instead of `realm_empty_topic_display_name`
with proper styling.

This commit fixes the bug.
2025-02-27 09:09:06 -08:00
Tim Abbott
9107101fe0 popovers: Disable move-messages count due to logic errors.
Until we've fixed the bugs that display incorrect numbers, this is a
simple way to hide the component.

This will be reverted once #32892 is complete.
2025-02-26 17:29:19 -08:00
Sayam Samal
bd1ccfbf6d inline_topic_edit: Update styling for confirm and cancel buttons. 2025-02-26 17:26:35 -08:00
Sayam Samal
4c9d47c390 inline_topic_edit: Disable save button and show tooltip on empty topic.
This commit disables the save button when the topic name is considered
as empty as part of the `realm_mandatory_topics` being set to True.

Since disabled elements do not fire events, it is not possible to
trigger tippy tooltips on disabled elements – such as the Save button
in the inline topic edit UI. Thus this commit adds a tooltip to the
disabled save button by wrapping/unwrapping it inside a `span` wrapper
pragmatically via the `ui_util.disable_element_and_add_tooltip` and
`ui_util.enable_element_and_remove_tooltip` helper methods.
2025-02-26 17:26:35 -08:00
Sayam Samal
196fcd5c0a inline_topic_edit: Show invalid input error visually on empty topic.
This commit adds the `invalid-input` class to the inline topic edit
input element when the new topic name is considered empty as a result
of realm_mandatory_topics property being set to True. This adds the
red glow borders to the invalid input field, which visually
communicates that some thing is wrong with the new topic name.
2025-02-26 17:26:35 -08:00
Sayam Samal
faa08b6000 inline_topic_edit: Remove overflowing error text on saving empty topic. 2025-02-26 17:26:35 -08:00
Sayam Samal
62bd5f36dc inline_topic_edit: Fix keydown logic inside the inline topic edit form.
Previously, anytime Enter was pressed anywhere inside the inline topic
edit UI, it led to the submission of the form. This logic resulted in
the unintentional saving of the new topic name when Enter was pressed
even on the cancel button; which should have actually closed the inline
topic edit UI instead.

This commit makes sure to only save the new topic name when the user
presses enter when focused on the text input element or the save button.
2025-02-26 17:26:35 -08:00
Sayam Samal
8935abec16 inline_topic_edit: Change ID->Class since multiple instances can exist.
Since multiple inline topic edit forms can exist in a channel feed, when
multiple topic names are being edited, we change the ID to classname.
2025-02-26 17:26:35 -08:00
Sayam Samal
e729020d13 buttons: Set "button" type to prevent default submission in forms. 2025-02-26 17:26:35 -08:00