Commit Graph

53074 Commits

Author SHA1 Message Date
evykassirer d40030d4ae recent: Rename .recent_topics_participants. 2023-09-08 07:36:33 -07:00
evykassirer 8896cb28cb recent: Rename .recent_topics_participant_item. 2023-09-08 07:36:33 -07:00
evykassirer 29b796db7a recent: Rename .recent_topics_focusable. 2023-09-08 07:36:33 -07:00
evykassirer 6d67723fbe recent: Rename .recent_topics_participant_overflow. 2023-09-08 07:36:33 -07:00
evykassirer 77fcedfb50 recent: Rename #recent_topics_search. 2023-09-08 07:36:33 -07:00
evykassirer e5cd59c224 recent: Rename #recent_topics_filter_buttons. 2023-09-08 07:36:33 -07:00
evykassirer f7b96b2bee recent: Rename #recent_topics_loading_messages_indicator. 2023-09-08 07:36:33 -07:00
evykassirer 11591f7169 recent: Rename #recent_topics_bottom_whitespace. 2023-09-08 07:36:33 -07:00
evykassirer f4954d3183 recent: Rename .recent_topics_container. 2023-09-08 07:36:33 -07:00
evykassirer 0e6cbf14ea recent: Rename #recent_topics_view. 2023-09-08 07:36:33 -07:00
evykassirer 131127aa30 recent: Rename #recent_topics_table. 2023-09-08 07:36:33 -07:00
evykassirer d13a16055b recent: Rename recent_topics templates. 2023-09-08 07:36:33 -07:00
evykassirer 0b1a41ad09 recent: Rename sender_info_for_recent_topics_row. 2023-09-08 07:36:33 -07:00
evykassirer f8dee6c860 recent: Rename recent_topics_filters_height. 2023-09-08 07:36:33 -07:00
evykassirer e08f64cc1c recent: Rename recent_topics_data. 2023-09-08 07:36:33 -07:00
evykassirer 3c16541eb4 recent: Rename recent_topics_util. 2023-09-08 07:36:33 -07:00
evykassirer f8db06569f recent: Rename recent_topics_ui. 2023-09-08 07:36:33 -07:00
Lalit Kumar Singh 9a6f7f0ead ts: Migrate `attachments_ui.js` to typescript. 2023-09-07 17:54:48 -07:00
Lalit Kumar Singh bcb0406f9b attachment_ui: Use `Math.trunc` instead of `Math.parseInt`.
We should use `Math.trunc` here instead of `Math.parseInt` as it is more safe.
Reference Doc: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt#using_parseint_on_non-strings
2023-09-07 17:54:48 -07:00
Lalit Kumar Singh 02e0537248 attachments_ui: Avoid modifying the attachment data sent from server.
We should avoid adding extra fields directly on the server data because
it makes it hard to infer the types for the functions such as
`format_attachment_data`.
2023-09-07 17:54:48 -07:00
Mateusz Mandera 18b0e58831 billing: Rename a few confusing references to "Zulip Limited".
We call this Zulip Free on the /plans page.
2023-09-07 17:52:04 -07:00
Anders Kaseorg 0ce6dcb905 mypy: Upgrade mypy from 1.4.1 to 1.5.1.
_default_manager is the same as objects on most of our models. But
when a model class is stored in a variable, the type system doesn’t
know which model the variable is referring to, so it can’t know that
objects even exists (Django doesn’t add it if the user added a custom
manager of a different name). django-stubs used to incorrectly assume
it exists unconditionally, but it no longer does.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-07 17:51:42 -07:00
Daniil Fadeev c99c8f4640 i18n: Mark info overlay usage_html for translation. 2023-09-07 17:38:35 -07:00
Palash Baderia 1e85683570 user_profile: Sort the stream list on update.
This commit fixes the issue of reordering the stream list when the
user unsubscribes from a stream. The issue was caused because, on
rendering, we sorted the list by name but did not sort it while
updating the stream list on any update.
2023-09-07 16:55:47 -07:00
Prakhar Pratyush 59cf305053 compose_banner: Remove the warning for messages in FOLLOWED topics.
Earlier, when a message was sent in a followed topic in
a muted stream, a compose banner warning with a suggestion
to UNMUTE the topic for receiving notifications about new messages
was shown.

This commit fixes the incorrect behavior. No warning is shown
in the case mentioned above because a user, in general, already
receives notifications for messages in FOLLOWED topics.
2023-09-07 16:54:06 -07:00
Anders Kaseorg 2cd018ce57 models: Remove duplicate index definition for date_sent.
Commit cf0eb46afc added this to let
Django understand the CREATE INDEX CONCURRENTLY statement that had
been hidden in a RunSQL query in migration 0244.  However, migration
0245 explained that same index to Django in a different way by setting
db_index=True.  Move that to 0244 where the index is actually created,
using SeparateDatabaseAndState.

Also remove the part of the SQL in 0245 that was mirrored by dummy
state_operations, and replace it with real operations.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-07 16:44:43 -07:00
Daniil Fadeev 0a424f0c5e message_reactions: Clean up the aria attributes for reaction_button. 2023-09-07 14:44:18 -07:00
Daniil Fadeev dc49c52b95 message_reactions: Fix the emoji icon that has a strange outline. 2023-09-07 14:44:18 -07:00
Daniil Fadeev 96d070143a emoji: Rename `reaction_button_visible`.
This commit renames the `reaction_button_visible` class to
`active-emoji-picker-reference` to clearly document what it's for.
2023-09-07 14:44:18 -07:00
Daniil Fadeev 08279820fb emoji: Rename `emoji-info-popover` to `emoji-picker-popover`. 2023-09-07 14:44:18 -07:00
Daniil Fadeev 6d3d9165b1 emoji_picker: Rename reactions_popped to is_open.
emoji_picker.is_open() much more accurately describes what this does,
and in particular the fact that the function applies to all places the
emoji picker might be.
2023-09-07 14:44:18 -07:00
Daniil Fadeev 82ca794f94 emoji: Migrate popover from Bootstrap to Tippy.
Fixes part of #23632.
2023-09-07 14:44:18 -07:00
Daniil Fadeev 8fc4d99e33 emoji: Make the emoji popover toggling process simpler.
After this change we add the "reaction_button_visible" class to every
reference element of the emoji popover. There's no need to handle the
user status picker case since the reference element should always be
visible. That's why we're reducing some complexity, even though it
means adding a class to the user status picker reference.
2023-09-07 14:44:18 -07:00
Daniil Fadeev 42bea85666 popovers: Ignore `data-reference-hidden` attribute for mobile popovers.
By default, Tippys with the `data-reference-hidden` attribute aren't
displayed. But when we render them as centered overlays on mobile and
use `getReferenceClientRect` for a virtual reference, Tippy slaps this
 hidden attribute on our element, making it invisible. We want to
 bypass this in scenarios where we're centering popovers on mobile
 screens.
2023-09-07 14:44:18 -07:00
Daniil Fadeev c33dac8ab3 popover_menus: Fix the API for popover centering.
The offset modifier is tricky and its calculations is related to the
placement of the popover. So, to prevent inconsistency, we should fix
the placement to some value.
2023-09-07 14:44:18 -07:00
Daniil Fadeev e5b8731e83 popover_menus: Fix the error that happens when the props are missing.
When `onMount` or `onHidden` methods aren't provided at the original
point of popover creation, an execution error occurred.
2023-09-07 14:44:18 -07:00
Tim Abbott 6c83bbcbdb settings: Disallow everyone group for new setting.
This is important because the "guests" value isn't one that we'd
expect anyone to pick intentionally, and in particular isn't an
available option for the similar/adjacent "email invitations" setting.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 88ec312b21 events: Send invites changes event to non-admin users also.
Earlier whenever a new invitation is created a event was sent
to only admin users. So, if invites by a non-admins user are changed
the invite panel does not live update.

This commit makes changes to also send event to non-admin
user if invites by them are changed.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 5e31a6b1c0 invites: Make it possible for non-admins to revoke multiuse invites.
This commit makes changes to allow non-admins to revoke multiuse
invitations created by them.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 9a96d19315 invites: Frontend changes for adding the new realm setting.
This commit does the changes in frontend required
for adding the new setting `Who can create multiuse invite link.`

Fixes #15159.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 21b1298c1d frontend: Initialize user_group module before right_sidebar module.
This commit initializes the user_group module before right_sidebar
module. This was needed to check whether user is member of user_group
whose members are allowed to create invite links.
2023-09-07 14:21:01 -07:00
Ujjawal Modi ec49c3acc8 invites: Rename `can_invite_others_to_realm` local variables.
This commit rename the existing setting `Who can invite users to this
organization` to `Who can send email invitations to new users` and
also renames all the variables related to this setting that do not
require a change to the API.

This was done for better code readability as a new setting
`Who can create invite links` will be added in future commits.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 77c67464ba invites: Live update option to create new invitations.
Earlier option to create new invitations in right_sidebar,
gear_menu and invitations panel does not get live update
when the setting `who can invite others to realm` is changed.

This commit make changes to do live update.
2023-09-07 14:21:01 -07:00
Ujjawal Modi f67cef8885 invite: Add new setting for "Who can create multiuse invite links".
This commit does the backend changes required for adding a realm
setting based on groups permission model and does the API changes
required for the new setting `Who can create multiuse invite link`.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 54c7cbaf1c docs: Change `Create an invitation link` heading.
This commit changes the `Create an invitation link` heading
in help docs to `Create a reusable invitation link`.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 9eccb4336e types: Add id_field_name field to GroupPermissionSetting type.
This commit adds id_field_name field to GroupPermissionSetting
type which will be used to store the string formed by concatenation
of setting_name and `_id`.
2023-09-07 14:21:01 -07:00
Tim Abbott 5f8bbfa652 invite: Explicitly mark REALM_OWNER as requiring an admin.
This was already enforced via separate logic that requires an owner to
invite an owner, but it makes the intent of the code a lot more clear
if we don't have this value mysteriously absent.
2023-09-07 14:21:01 -07:00
Ujjawal Modi a0b16e550e invites: Add a function to check if owner or admin is required.
Earlier there was a function to check if owner is
required to create invitations for the role specified
in invite and check for administrator was done
without any function call.

This commit adds a new function to check whether
owner or administrator is required for creating
invitations for the specified role and
refactors the code to use that new function.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 2e59b1f30e tests: Use function to create realm rather than django ORM.
This commit makes changes in backend tests to use
`do_create_realm` function to create realm.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 72b099524d internal_realm: Single transaction for changes while creating realm.
This commit makes the database changes while creating internal_realm
to be done in a single transaction.
This is needed for deferring the foreign key constraints
to the end of transaction.
2023-09-07 14:21:01 -07:00