Commit Graph

63698 Commits

Author SHA1 Message Date
Sahil Batra
6f6059da73 personal_menu: Support changing information density settings.
This commit adds UI in personal popover menu for user to change
font-size and line-height.

Fixes part of #33186.
2025-03-10 16:07:37 -07:00
Sahil Batra
d8bc2f350e settings: Remove conditions for dense_mode setting. 2025-03-10 16:07:37 -07:00
Sahil Batra
63ef84d9a3 popovers: Decrease width of theme switcher in spectators menu.
Matches the width of other items in the menu.
2025-03-10 16:07:37 -07:00
Sahil Batra
222843578e settings: Fix save-discard behavior in default user settings.
Save discard widget behavior was not correct for
"General" subsection of user default settings as the
proposed value for color scheme was a string which
was being compared to the numerical current value
and thus check_realm_default_settings_property_changed
always returned true for "General" subsection.
2025-03-10 16:07:37 -07:00
Kartikay Nusture
aead403f66 bot: Set Incoming webhook the default bot type.
This commit sets "Incoming Webhook" as default bot type
when opening the "Create New Bot" modal.

Fixes: #33740.
2025-03-10 15:55:16 -07:00
evykassirer
a64a20ce38 information_density: Resize page components when changing font size.
Discussion here:
https://chat.zulip.org/#narrow/channel/431-redesign-project/topic/Weird.20bug.20possibly.20involving.20calc/near/2113977
2025-03-10 15:38:35 -07:00
Tim Abbott
6066675e3c clipboard_handler: Improve fallback text copying links.
There's no reason we need to make up weird fallback text when we're
specifically trying to copy a given link; we can just use the original
link when we determine we can't add special formatting.
2025-03-10 15:33:08 -07:00
Tim Abbott
e9dde4ba9c copy_messages: Fix browser copy code paths for Firefox.
On Firefox, with `dom.event.clipboardevents.enabled` set to false, the
previous code path (shared with the fancy "copy link" code that tries
to add extra content types) would fail.

Fix this by reverting part of 37b5d539a0.

The comments in this code were correct that we just want to let the
browser handle the copy event. We can do that by just returning the
right value to the hotkey code path such that it won't do
preventDefault, without using deprecated execCommand or doing anything
else special.

Fixes #33912.
2025-03-10 15:33:08 -07:00
Tim Abbott
acaddc2d4e copy_messages: Rename select_div for clarity. 2025-03-10 15:33:08 -07:00
Tim Abbott
26355df8e9 copy_messages: Extract restore_original_selection.
The previous naming scheme was rather confusing.
2025-03-10 15:33:08 -07:00
Alya Abbott
80078971b5 docs: Link to instructions for configuring billing admin in the UI. 2025-03-10 14:31:18 -07:00
Alya Abbott
e8ade79f93 help: Document configuration for who can manage billing. 2025-03-10 14:31:18 -07:00
Karl Stolley
54b0ba0248 compose: Hold DM picker, topic marker to top recipient line. 2025-03-10 13:39:47 -07:00
Harsh
b7a943b8cb left_sidebar: Hide menu option for home view if all messages are read.
This commit hides sidebar menu option button instead of showing
it with "Mark all messages as read" option, for home view when
there are no unread messages.
2025-03-10 13:08:39 -07:00
Mateusz Mandera
c031cf9275 import: Fix export/import of SavedSnippet.
This table's export and import weren't working:
1. It didn't have a Config in export.py, so it wasn't exported at all.
2. Its `date_created` wasn't registered in `DATE_FIELDS`.
3. It wasn't registered in `ID_MAPS` in import_realm.py, so having any
   SavedSnippets in the export would cause the import to fail with an
   exception.
4. It was missing a `fix_datetime_fields` call in its import codepath.
2025-03-10 13:07:56 -07:00
Mateusz Mandera
acb1731bf9 export: Fix export of child tables when exporting mirror dummy users.
Without this change, the child tables of UserProfile didn't get their
objects exported if those objects were tied to a mirror dummy user.

For example, a `Recipient` of type `PERSONAL`, or the associated
`Subscription` would not get exported. Same for other tables with
foreign keys to `UserProfile` - such as `UserPresence`.

This happened because the Configs for the export are defined as follows:

```python
user_profile_config = Config(
    custom_tables=[
        "zerver_userprofile",
        "zerver_userprofile_mirrordummy",
    ],
    # set table for children who treat us as normal parent
    table="zerver_userprofile",
    virtual_parent=realm_config,
    custom_fetch=custom_fetch_user_profile,
)

user_subscription_config = Config(
    table="_user_subscription",
    model=Subscription,
    normal_parent=user_profile_config,
    filter_args={"recipient__type": Recipient.PERSONAL},
    include_rows="user_profile_id__in",
)

Config(
    table="_user_recipient",
    model=Recipient,
    virtual_parent=user_subscription_config,
    id_source=("_user_subscription", "recipient"),
)
```

while in `export_from_config` we have:
```python
    elif config.normal_parent:
        # In this mode, our current model is figuratively Article,
        # and normal_parent is figuratively Blog, and
        # now we just need to get all the articles
        # contained by the blogs.
        model = config.model
        assert parent is not None
        assert parent.table is not None
        assert config.include_rows is not None
        parent_ids = {r["id"] for r in response[parent.table]}
```

This meant that when processing a table with
`normal_parent=user_profile_config`, the `parent_ids` above would only
have the ids of `UserProfile` objects under the `zerver_userprofile` key in
the exported data - completely missing those in
`zerver_userprofile_mirrordummy`.
2025-03-10 13:07:56 -07:00
Apoorva Pendse
56293b19fc user_groups: Persist the edit group view post deactivation.
Fixes:
https://github.com/zulip/zulip/pull/33820#issuecomment-2705912743.
2025-03-10 12:45:49 -07:00
apoorvapendse
be6cc5e56e user_groups: Show group name for smaller widths.
https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AFdeactivated.20group.20indicator.20disappears/near/2113197
2025-03-10 12:45:49 -07:00
apoorvapendse
27ac91a8c8 user_groups: Add deactivated icon on top title.
https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AFdeactivated.20group.20indicator.20disappears/near/2112723
2025-03-10 12:45:49 -07:00
apoorvapendse
525efb7c73 user_groups: Remove fa-ban icon for deactivated group settings.
prerequisite: #33812
2025-03-10 12:45:49 -07:00
Harsh
eb013580a5 user_groups: Add banner for settings for a deactivated group.
This commit adds a banner at the top of the group settings panel, to
make it super clear when a group is deactivated.

Fixes: #33803.
2025-03-10 12:42:44 -07:00
Harsh
db53482685 user_groups: Disable permission tab for deactivated groups.
Since there can't be any permissions to display there, it seems not
helpful.
2025-03-10 12:42:25 -07:00
Tim Abbott
f4bb1ac30f realms: Require a non-empty set of users who can manage billing.
This isn't a configuration that's useful, and it seems marginally
helpful to make it hard to end up in a state where this is the empty
set.
2025-03-10 11:50:22 -07:00
Sayam Samal
6043063d21 alerts: Fix alert popup not closing in portico.
The alerts in portico were not being closed since the class responsible
for hiding them — `home-error-bar` was defined in `web/styles/zulip.css`
which isn't being shared with portico. This commit moves this class to
`web/styles/alerts.css` which is shared with portico, and fixes the bug.
2025-03-10 11:21:11 -07:00
Sayam Samal
2c84f60bbc popup_banners: Add loading indicator to connection error banner button.
This commit adds a loading indicator to visually communicate that the
retry button in the connection error banner has executed the retry
sequence.
2025-03-10 11:21:11 -07:00
Sayam Samal
80a352dc02 buttons: Add loading indicator to buttons. 2025-03-10 11:21:11 -07:00
Sayam Samal
3275fcc96e popup_banners: Redesign connection banner to use new banner component.
This commit serves as the base commit for redesigning the alert banners
by migrating them to use the new banner component. We use a new name
to refer to these banners — "Popup banners", which is more descriptive
about their behavior.

The Popup banners are appended to the container in a stacking order,
i.e., the most recent popup banner appears on the top and the oldest one
is sent to the bottom of the stack. These banners also inherit the
animations from the alert banners for visual appeal.

This commit also fixes the bug where clicking on the "Try now" button
in the popup banner resulting from an error in the `/json/messages`
endpoint resulted in call to restart_get_events in server_events.js
instead of load_messages in message_fetch.ts.

Fixes #31282.
2025-03-10 11:21:11 -07:00
Sayam Samal
cd08c628ba alerts: Modify alert-box container to use flex layout.
This is prep commit for the alert banner redesign, which adds flex
layout to the alert-box container and modifies the animations logic to
work with the new layout.
2025-03-10 11:21:11 -07:00
evykassirer
602d0f4914 right_sidebar: Remove invite users icon at bottom of buddy list.
Discussion here:
https://chat.zulip.org/#narrow/channel/101-design/topic/right.20sidebar.20design.20tweaks.20.20.2332976/near/2115335
2025-03-10 09:47:00 -07:00
Tim Abbott
4cfaf18145 api: Increment API feature level to 363. 2025-03-10 09:36:30 -07:00
Vector73
0ba3b787cf settings_config: Fix hardcoded numbers for plan_type and org_type. 2025-03-10 09:36:30 -07:00
Vector73
c049259d07 user: Remove is_billing_admin user property.
Removed `is_billing_admin` user property as it is no longer used since
billing permissions are now determined by `can_manage_billing_group`
realm setting.
2025-03-10 09:36:30 -07:00
Tim Abbott
e9334abbf4 events: Reorder fetch_initial_state_data. 2025-03-10 09:36:30 -07:00
Vector73
158fd58cde settings: Add "can_manage_billing_group" realm setting.
Added "can_manage_billing_group" realm group permission setting
to control who can manage billing and plans in the organization.

Fixes #32745.
2025-03-10 09:36:30 -07:00
Alex Vandiver
2a0f3c9746 message_send: Do not attempt to place a set into a message event.
This would have triggered exceptions in production, since orjson
cannot serialize sets.
2025-03-10 09:35:02 -07:00
evykassirer
0fe2afe8b3 settings: Standardize right panel button height for streams/usergroups. 2025-03-10 09:26:50 -07:00
Karl Stolley
6668b96b73 dropdowns: Correct columnar flex alignment in recents, inbox. 2025-03-10 09:22:41 -07:00
Vector73
47897e6f95 tools: Fix merge-api-changelogs. 2025-03-10 09:22:13 -07:00
evykassirer
d84a23f1f8 topic_edit: Scale spinner with font size. 2025-03-10 09:20:43 -07:00
Alex Vandiver
583ec00db7 zulip_update_announcements: Add missing close-paren. 2025-03-10 09:19:51 -07:00
Niloth P
b3049b9d35 unread_ops: Add confirm_dialog to bulk mark unread in interleaved views.
Fixes #31292.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-03-08 17:38:49 -08:00
Niloth P
6ba3bdc05d filter: Add may_contain_multiple_conversations.
Preparatory commit for #31292.
2025-03-08 17:38:49 -08:00
Apoorva Pendse
9a2983fd87 copy_messages: Extend smart selection for inline math.
This replicates the smart selection
feature that works with selecting a
single expression within a math block
for inline math expressions.

Fixes: #33865.
2025-03-08 00:05:23 -08:00
Alya Abbott
2c13c0c24a help: Document viewing archived channels in settings.
Also spell out how to hide content in archived channels.
2025-03-07 18:17:15 -08:00
Alya Abbott
887e6e0283 help: Fix incorrect settings section label. 2025-03-07 18:17:15 -08:00
Apoorva Pendse
795c05784f copy_messages: noop for empty selection.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/Ctrl.2BC.20with.20nothing.20selected.20exception
2025-03-07 18:12:15 -08:00
sanchi-t
423ee27a23 stream_privacy: Add archive icon for archived channels.
Archived channels are now displayed with an archived
icon.
2025-03-07 18:08:41 -08:00
sanchi-t
1aef79078c stream_settings: Display archived channels.
By default, archived channels will be hidden.
2025-03-07 18:08:41 -08:00
sanchi-t
f9babb37a2 delete_sub: Do not remove stream from subscriptions when archived. 2025-03-07 18:08:41 -08:00
sanchi-t
874e7bacf9 popover_menus_data: Hide actions user can't take for archived channels.
Hide actions users cannot perform for messages and topics within
archived channels.
2025-03-07 18:08:41 -08:00