Commit Graph

61309 Commits

Author SHA1 Message Date
evykassirer 269066e10a settings_org: Convert module to typescript. 2024-10-14 15:33:01 -07:00
evykassirer 39137e67f7 user_groups: Generate UserGroup type from a schema.
This will be useful for later when we'll need the schema for
converting settings_org to typescript.
2024-10-14 15:33:01 -07:00
evykassirer 5aa5163bbb settings_components: Generate SimpleDropdownRealmSettings type from a schema.
This will be useful for later when we'll need the schema for
converting settings_org to typescript.
2024-10-14 15:33:01 -07:00
evykassirer 897f605acf settings_components: Generate StreamSettingProperty type from a schema.
This will be useful for later when we'll need the schema for
converting settings_org to typescript.

This commit also renames StreamSettingProperty to more accurately
reflect the type of a single property key.
2024-10-14 15:33:01 -07:00
evykassirer c133f7f219 sub_store: Generate StreamSubscription type from a schema.
This will be useful for later when we'll need the schema for
converting settings_org to typescript.
2024-10-14 15:33:01 -07:00
evykassirer 905a234966 settings_components: Generate RealmUserSettingDefaultProperties from schema.
This will be useful for later when we'll need the schema for
converting settings_org to typescript.
2024-10-14 15:33:01 -07:00
evykassirer 67f4866201 settings_components: Generate RealmSettingProperty type from a schema.
This will be useful for later when we'll need the schema for
converting settings_org to typescript.

This commit also renames RealmSettingProperty to more accurately
reflect the type of a single property key.
2024-10-14 15:33:01 -07:00
evykassirer 69db3c422a settings_org: Remove get_widget() call and use equivalent `this`.
Manually verified here: https://github.com/zulip/zulip/pull/31940#discussion_r1798533802
2024-10-14 15:33:01 -07:00
evykassirer 808c24aef2 typescript: Convert some && constructions to optional chains.
Some upcoming changes to how types are constructed are going
to bring up these type linter errors, so fix them now.
2024-10-14 15:33:01 -07:00
evykassirer e5dd75baf0 buddy_list: Differentiate updating and changing to an undefined filter.
Followup to #31960. I forgot to consider the case of a narrow with
an undefined filter. To make sure we fully run render_section_headers
on narrows like Recent Conversations the first time they load, this
commit initializes `current_filter` to the string "unset".
2024-10-14 15:15:26 -07:00
Lauryn Menard 3e3ca26aae docs: Update keyboard shortcuts to always show "Fn" key option.
Previously, these were only shown for Mac OS users and replaced
the "Home", "End", "PgUp" and "PgDn" shortcuts. But as this really
depends on the keyboard the user is using (there are Mac keyboards
with the above keys), we instead show both options in our web app
and help center documentation on keyboard shortcuts.

The tooltip for the "Scroll to bottom" button will now always show
"End" for all users. Previously, it showed a "Fn" key option for
Mac users.

Fixes #31815.
2024-10-14 15:14:10 -07:00
Lauryn Menard 93c172ee3f message-fetch: Add spectator term when building narrow parameter.
Again, since the spectator term is added to the narrow parameter
for all views, then we consolidate that logic when building the
initial narrow data.
2024-10-14 15:11:41 -07:00
Lauryn Menard 7289d43f74 message_fetch: Simplify building narrow data.
If page_params.narrow is defined, then it is added to the narrow
parameter (whether it is the home view or not), so here we
consolidate that logic.
2024-10-14 15:11:41 -07:00
Lauryn Menard 09bce62d98 messsage-fetch: Convert channel operator's operand to integer ID.
The operand for the canoncial "channel" operator can be an ID, but
it must be an integer and not a string, so we take care of that
directly in handle_operators_supporting_id_based_api.
2024-10-14 15:11:41 -07:00
Lauryn Menard 3405e95b6b message-fetch: Use canonical operator for ID based API updates.
Updates handle_operators_supporting_id_based_api to use the
canonical operator when updating the narrow parameter to use
object IDs.
2024-10-14 15:11:41 -07:00
Lauryn Menard 62c2f35995 message-fetch: Refactor handle_operators_supporting_id_based_api.
Instead of updating the object with all of the parameters for the
message fetch, we only update the narrow parameter.
2024-10-14 15:11:41 -07:00
Varun Singh 697e7acaaa scheduled_messages_ui: Convert module to TypeScript. 2024-10-14 13:35:11 -07:00
Shubham Padia b3d75d619a help: Consistently name restrict email setting.
Remove question mark.
See https://chat.zulip.org/#narrow/channel/101-design/topic/name.20permissions.20settings.20consistently/near/1959774
2024-10-14 13:30:01 -07:00
Shubham Padia 588f609a9c help: Consistently name unsubscribe channel setting.
Remove question mark.
See https://chat.zulip.org/#narrow/channel/101-design/topic/name.20permissions.20settings.20consistently/near/1959774
2024-10-14 13:30:01 -07:00
Shubham Padia d7d3da6f9f help: Consistently name channel post setting.
Remove question mark and replace `the` with `this`.
See https://chat.zulip.org/#narrow/channel/101-design/topic/name.20permissions.20settings.20consistently/near/1959774
2024-10-14 13:30:01 -07:00
Shubham Padia 2f7dcfae7b help: Consistently name access channel setting.
Remove question mark and replace `the` with `this`.
See https://chat.zulip.org/#narrow/channel/101-design/topic/name.20permissions.20settings.20consistently/near/1959774
2024-10-14 13:30:01 -07:00
Shubham Padia 065703c779 help: Consistently name mention group setting.
Remove question mark.
See https://chat.zulip.org/#narrow/channel/101-design/topic/name.20permissions.20settings.20consistently/near/1959774
2024-10-14 13:30:01 -07:00
Alya Abbott 95131873cd help: Note that email domain restrictions apply to email changes. 2024-10-14 11:54:12 -07:00
Shubham Padia 797438b0f7 user_groups: Allow setting and changing can_leave_group setting.
Fixes #31951.
2024-10-14 11:44:27 -07:00
Shubham Padia 1862c3b333 user_groups: Use can_leave_group setting to check permisison.
This commit adds code to use can_leave_group setting when
checking permission to leave group in webapp.
2024-10-14 11:44:27 -07:00
Shubham Padia bf46747735 user_groups: Check can_leave_group when removing members. 2024-10-14 11:44:27 -07:00
Shubham Padia 060156fca4 user_groups: Add can_leave_group setting for user group.
This field will be used to control permission for who can
leave a user group.
2024-10-14 11:44:27 -07:00
Sahil Batra 6007630164 user_group_edit: Fix update_group function.
This commit fixes the mistakes made during rebase in
96abf2501a and 9bbd6a7316.
2024-10-14 10:06:17 -07:00
Vector73 6bc8651d22 settings: Remove `add_custom_emoji_policy` setting.
Removed `add_custom_emoji_policy` setting as the permission to
add custom emoji is now controlled by `can_add_custom_emoji_group`
setting.
2024-10-13 16:09:04 -07:00
Vector73 f733ab112c settings: Add `can_add_custom_emoji_group` realm setting.
Added `can_add_custom_emoji_group` setting to replace `add_custom_emoji_policy`.
2024-10-13 16:09:04 -07:00
Mateusz Mandera b95225d071 docs: Minor tweaks to thumbnailing.md.
The first change fixes the incorrect claim that stills of animated
emojis are unused.
Second change just fixes the missing words in the sentence.
2024-10-13 11:43:28 -07:00
Anders Kaseorg ff97788b6e health: Disable RabbitMQ check if not USING_RABBITMQ.
Fixes a spurious error that’s logged and ignored during the Puppeteer
tests, introduced by commit eef65d7e30
(#31438).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-13 11:42:49 -07:00
Prakhar Pratyush 723346b05c settings_exports: Add 'Type' column to data exports table.
This commit adds a 'Type' column to the Data exports table
in the org settings.

It specifies whether it's a public data or standard export.

Fixes part of #31201.
2024-10-11 17:38:17 -07:00
Prakhar Pratyush 6e7cb8a8c4 settings_export: Add modal to select export_type before starting export.
This commit adds a modal which offers a way to select export_type
before making a POST request to start export.

Fixes part of #31201.
2024-10-11 17:38:17 -07:00
evykassirer 478cd9220c buddy_list: Refactor menu popover to support keyboard navigation. 2024-10-11 17:26:57 -07:00
evykassirer 88ae87c10f buddy_list: Use user_sidebar_entry selector instead of li. 2024-10-11 17:26:57 -07:00
Prakhar Pratyush 3314c89288 realm: Add maximum file size upload restriction.
This commit adds a restriction to the maximum file size
that can be uploaded to a realm based on its plan_type.
2024-10-11 17:16:48 -07:00
Prakhar Pratyush 808acc9e47 events: Migrate plan_type & upload_quota to update_dict event format.
'realm_upload_quota_mib` is updated when `plan_type` changes.

Earlier, we were including 'upload_quota' to update
`realm_upload_quota_mib` in extra_data field of 'realm op: update'
event format when property='plan_type'.

This commit migrate those two parameters to `realm op: update_dict`
event format.

* None of the clients processes these fields, so no compatibility
  code required.
* Renamed `upload_quota` to `upload_quota_mib` as it better aligns
  with our goal to encode units in the client-facing API names.
  Also, it helps to avoid extra code to update 'realm_upload_quota_mib`
  in web client, web client simply aligns with
  'realm["realm_" + key] = value'.
2024-10-11 17:16:48 -07:00
Prakhar Pratyush 417d74e032 api-docs: Maintain sorted order for properties in realm/update_dict.
Few of the properties in the data field of 'realm/update_dict'
event format were no longer in sorted order (by alphabet).

This commit rearranges them to maintain the order.
2024-10-11 17:16:48 -07:00
Prakhar Pratyush 276648ef87 realm_settings: Remove 'enable_spectator_access' from update_fields.
In 'do_change_realm_plan_type' function we use 'do_set_realm_property'
to set 'enable_spectator_access' to False.

There is no need to again update that field.

This change was included in d2f2fbf6b9.
2024-10-11 17:16:48 -07:00
Lauryn Menard d3987f611c urls: Generate narrow links in frontend with "channel" operator.
Fixes #30385.
2024-10-11 17:00:23 -07:00
Lauryn Menard 70ab893d34 urls: Generate narrow links in backend with "channel" operator. 2024-10-11 17:00:23 -07:00
Lauryn Menard 240c4d85ae docs: Update existing links to use "channel" operator. 2024-10-11 17:00:23 -07:00
Aman Agrawal 592afffab4 message_events: Fix messages missing in combined feed.
When combined feed is cached, moving messages can cause some
messages to be missing.

This can be reproduced by moving messages from a muted stream to
non muted stream.

Fixed by updating all rendered message lists for the messages
that were moved.
2024-10-11 16:38:44 -07:00
Tim Abbott 3554afde36 api docs: Document can_manage_all_groups final semantics.
This also does the feature level 305 stamp.
2024-10-11 16:31:18 -07:00
Shubham Padia 2b6df48ebb user_groups: Split update members test into add/remove tests. 2024-10-11 16:31:18 -07:00
Shubham Padia c9d5276031 user_groups: Set can_manage_all_groups to administrator group.
Earlier we use to restrict admins, moderators or members of a group to
manage that group if they were part of the realm wide
`can_manage_all_groups`. We will not do that anymore and even
non-members of a group regardless of role can manage a group if they are
part of `can_manage_all_groups`.

See
https://chat.zulip.org/#narrow/stream/101-design/topic/Group.20add.20members.20dropdown/near/1952902
to check more about the migration plan for which this is the last step.
2024-10-11 16:31:18 -07:00
Shubham Padia 9bbd6a7316 user_groups: Check can_add_members_group when adding members.
Fixes #25942.
Users with permission to manage the group (either on the group level or
realm level) should be able to add members to the group without being
present in can_add_members_group.
2024-10-11 16:31:18 -07:00
Shubham Padia 8a2a8b64aa user_groups: Add can_add_members_group field to group create/edit. 2024-10-11 16:31:18 -07:00
Shubham Padia f134662312 user_groups: Check can_add_members_group before adding members.
Removing members will be controlled by `can_manage_group` until we add
`can_remove_members_group` in the future.

Users with permission to manage a group can add members to that group by
default without being present in `can_add_members_group`.
2024-10-11 16:31:18 -07:00