Commit Graph

55433 Commits

Author SHA1 Message Date
Sayam Samal def4cf7f93 uploads: Extend drag and drop upload area to blank areas after sidebars.
To extend the drag and drop upload area to blank areas after sidebars,
we now detect the drag/drop event on the entire ".app" division.

We also change replace `width` and `height` css properties with
`min-width` and `min-height` properties respectively, to make sure
that the ".app" div spans the entire width and height of the viewport.

Fixes: #27550.
2023-11-29 10:35:18 -08:00
Sayam Samal db6246fcc7 logout: Move logout form from the ".app" div to the body.
The hidden logout form facilitates logging out from the app by providing
a form with the CSRF token required for the csrf_token protection in
Jinja2.

This commit moves this form from the ".app" div to the body,
where it is more appropriately placed in the DOM.

This is a prep commit for #27550.
2023-11-29 10:35:18 -08:00
Sayam Samal 929d34ccd7 modals: Move "About Zulip" modal from ".app" div to body.
The "About Zulip" modal should be appended to the body, like the other
modals and not inside the ".app" div.

This is a prep commit for #27550.
2023-11-29 10:35:18 -08:00
David Rosa 4416f2002b help: Document "(guest)" indicator setting.
- Adds instructions to block to document new setting.
- Adds links to guest users page from relevant docs.
- Cross-links related articles.
2023-11-29 09:58:01 -08:00
Anders Kaseorg 07bd1f28d1 time_zone_util: Avoid relying on timeZoneName: "longOffset".
Safari doesn’t support it yet.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-29 09:57:10 -08:00
Alex Vandiver 3eb5b20c41 register_server: Redact the key when printing it. 2023-11-29 09:56:14 -08:00
evykassirer 32c730e530 emoji: Fallback to Google Modern for unsupported new Twitter emoji.
The Twitter emoji team was laid off in 2022, so new emoji aren't supported.
https://github.com/twitter/twemoji/issues/570#issuecomment-1303422143.
The "twitter" sprite sheet we’re using does have images in those locations,
but they’re fallback images that emoji-datasource fills in from the Apple
sprite sheet, which has unclear licensing implications.

To be able to support newer emoji, we fallback to Google Modern for any emoji
not covered by Twemoji.

CZO conversation:
https://chat.zulip.org/#narrow/stream/107-kandra/topic/emoji.20changes.20in.208.2E0/near/1689918
2023-11-28 23:46:49 -08:00
Alex Vandiver 737de6d4cd user_settings: Re-verify email addresses when enacting them. 2023-11-28 22:11:41 -08:00
Alex Vandiver 037eaa07e2 user_settings: Revoke previous email changes on new one. 2023-11-28 22:11:41 -08:00
Alex Vandiver f7990ad175 user_settings: Lock user row before changing email address. 2023-11-28 22:11:41 -08:00
Alex Vandiver 6ecfbd2ae8 create_realm: Fix copy/paste error in assertion message. 2023-11-28 18:15:30 -08:00
evykassirer b68cb5b049 navbar: Show shorter navbar for short screens not narrow screens.
Fixes #27366.
2023-11-28 18:11:56 -08:00
evykassirer e158877365 spectator sign in buttons: Use media queries instead of hide-xl. 2023-11-28 18:11:56 -08:00
N-Shar-ma 9d3a606bfb compose: Add banner to go to conversation when replying in search view.
When a user is replying to a message while in a search view, we now warn
them that the full conversation is not visible and urge them to go to
the conversation they are composing to, so they can see the complete
conversation. On narrowing to that conversation, the banner is removed.

Fixes: #25893.
2023-11-28 16:55:05 -08:00
Tim Abbott 6cdf3d638b timerender: Reuse Intl.DateTimeFormat objects.
This improves performance of code paths that process larger numbers of
date/time objects, such as the main message feed, dramatically

build_message_groups is about 4x faster following this change, with
timestamp rendering now a negligible portion of the overall work.
2023-11-28 16:54:00 -08:00
Anders Kaseorg 06c2b89525 timerender: Use an explicit time zone for all rendering.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-28 16:54:00 -08:00
Anders Kaseorg 33e335dbd1 time_zone_util: Add zoned date/time utility functions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-28 16:54:00 -08:00
Sayam Samal ff9c15ea83 gear_menu_popover: Fix extra space when no invite permission.
This commit fixes the extra space and additional border that was being
added to the gear menu popover when the user did not have permission to
invite users.
2023-11-28 16:50:39 -08:00
Alex Vandiver 61fc838179 python: Switch mocking of timezone_now to time_machine. 2023-11-28 15:10:39 -08:00
Alex Vandiver 82c08dd153 python: Prevent bare timedelta(), which defaults to days. 2023-11-28 15:10:39 -08:00
Alex Vandiver 0f132cef4d test_presence: Fix test which moved days, not seconds. 2023-11-28 15:10:39 -08:00
Tim Abbott 39fb1a0f70 message_fetch: Fix get_frontfill_anchor fallback.
This fixes a very rare exception seen in production, which the
previous assertion allowed us to understand was possible in a rare
race, now documented in comments.
2023-11-28 15:08:00 -08:00
Alex Vandiver 8c8dbb3d66 markdown: Stop attempting to expand/collapse re2 regex.
549dd8a4c4 changed the regex that we build to contain whitespace for
readability, and strip that back out before returning it.
Unfortunately, this also serves to strip out whitespace in the source
linkifier, causing it to not match expected strings.

Revert 549dd8a4c4.

Fixes: #27854.
2023-11-28 15:07:23 -08:00
Karl Stolley 319cfc7d7f left_sidebar: Establish better-centered DM row height.
Despite the existing comment in the CSS, the previous DM row was
22.5px tall. Adjusting the padding makes for 22px tall box, which
greatly improves the centering of the unread count within its
bounding box.
2023-11-28 15:04:38 -08:00
Alex Vandiver 98b68d7034 zilencer: Remove duplicates before adding unique indexes.
The recent #27818 naïvely added unique indexes, despite there being a
large number of existing violations.  This makes the migration
impossible to deploy.

Update the migration to de-duplicate rows, dropping all but the
first-by-id of each unique set.  This is equivalent to what
dd954749be does with `ignore_conflicts`.  We update the migration,
rather than making a new one, as any server which has somehow
successfully applied the migration apparently did not need to
de-duplicate anything.
2023-11-28 15:01:10 -08:00
Mateusz Mandera 02d5740f0f remote_realm: Add syncing of org_type. 2023-11-28 14:41:16 -08:00
Mateusz Mandera e276812e42 models: Create OrgTypeDict for Realm.ORG_TYPES typing. 2023-11-28 14:41:16 -08:00
Mateusz Mandera 6f2d4f1af2 zilencer: Use proper typing for update_remote_realm_data_for_server.
This is an obvious improvement to the typing and more natural than the
forced dict() conversion.
2023-11-28 14:41:16 -08:00
Lauryn Menard 2f91179c1e api-docs: Add tip for finding a stream or user ID.
Adds a tip to the section on webhook URLs in the incoming webhook
overview and to the section on stream and user IDs in the construct
a narrow documentation. The tip links to relevant articles in the
help center.

Part of work on #19067.
2023-11-28 10:05:16 -08:00
Lauryn Menard 276ceb46e2 emails: Add organization details to confirm registration for new org.
Adds details about the requested organization URL and type to the
registration confirmation email that's sent when creating a new
Zulip organization.

Fixes #25899.
2023-11-28 09:52:31 -08:00
Alex Vandiver 150c64ddd0 zilencer: Enforce uniqueness of server_id + remote_id.
This was previously just an index (not a unique one).  Enforce this
data constraint.
2023-11-28 09:46:48 -08:00
Alex Vandiver f4cbb494ac test_remote_counts: Insert in date order.
Inserting these in order means that they have dates which ascend with
their ids and remote_ids, for a more accurate simulation.
2023-11-28 09:46:48 -08:00
Alex Vandiver 82960d9bc2 upload: Redirect unauthorized anonymous requests to login.
Note that this also redirects rate-limited anonymous requests to the
login page, as we do not currently differentiate the cases.
2023-11-28 09:44:55 -08:00
Alex Vandiver f9884af114 upload: Return images for 404/403 responses with image Accept: headers.
If the request's `Accept:` header signals a preference for serving
images over text, return an image representing the 404/403 instead of
serving a `text/html` response.

Fixes: #23739.
2023-11-28 09:44:55 -08:00
Prakhar Pratyush 451ddf4c84 typeahead: Show @-topic typeahead whenever it might be possible to use.
Earlier, when a topic had less than 15 participants,
the @-topic typeahead was not visible. It should be visible
irrespective of the 'realm_wildcard_mention_policy' setting
when the participant count is not greater than 15.

The participant count for a topic can't always be calculated
accurately in the client as some of the messages might still
be loading.

We show @-topic in the typeahead whenever it might be possible
to use it.

We will give an error later if you aren't allowed to use it.

Fixes #27852.
2023-11-28 09:24:18 -08:00
Prakhar Pratyush 590d43f475 mentions: Rename 'stream_wildcard_mention_allowed_in_large_stream'.
This prep commit renames:
* 'stream_wildcard_mention_allowed_in_large_stream' to
'wildcard_mention_policy_authorizes_user' because the function
checks if the sender is allowed to use wildcard mentions based
on the 'wildcard_mention_policy' setting, and we plan to use that
for topic wildcard mentions too.

* 'stream_wildcard_mention_large_stream_threshold' to
'wildcard_mention_threshold' because this value is going to be
used as a threshold value for the max number of subscribers and
participant count allowed for stream and topic wildcard mention
respectively.
2023-11-28 09:24:18 -08:00
Lauryn Menard b86654d10f analytics: Add column for Zulip version in remote installations page. 2023-11-28 09:20:45 -08:00
Lauryn Menard 5f48abd57a analytics: Add support link to remote installations page.
Refactors get_page helper function so that the updates to the
query data for each row is done in the function that processes
the request.

Adds columns to the remote installation page for both the support
and analytics links.

Adds `analytics/views/remote_activity.py` to the files without
100% backend test coverage.
2023-11-28 09:20:45 -08:00
Lauryn Menard 4fc639cead analytics: Add remote installation suport link function. 2023-11-28 09:20:45 -08:00
Lauryn Menard 4e577119b4 analytics: Use gear icon as realm support link on installation activity. 2023-11-28 09:20:45 -08:00
Aman Agrawal e8fed998ce test_stripe: Add method to better mock stripe invoice creation. 2023-11-28 08:58:19 -08:00
Aman Agrawal 28a49be161 get_initial_upgrade_context: Use tier passed as part of request. 2023-11-28 08:58:19 -08:00
Alya Abbott fcd0783202 upgrade: Simplify free trial upgrade page. 2023-11-28 08:57:27 -08:00
David Rosa de95c0eb42 help: Document voice calls option.
Documents the new audio call option (video call with video muted by
default) to the compose box.

Fixes #26895.
2023-11-28 08:56:46 -08:00
s-bose7 cf038eeba1
docs: Fix outdated number of backend tests.
The current number is about 4500, but the precise value isn't important
at this point.
2023-11-28 08:55:17 -08:00
Sahil Batra 78440033dc invite: Fix label for new user's role dropdown.
This commit updates label for new user's role dropdown to use
"Users" instead of "User(s)" because that caused some problems
in translating the text.

We should ideally be using the ICU plural syntax for such cases,
but since it is used as label, we cannot use the plural syntax
there. So we instead just change it to always have "Users"
plural like we do at some other places in that modal.
2023-11-27 22:18:04 -08:00
Tim Abbott 06ebc39e04 docs: Clarify the sync_ldap_user_data semantics.
The other option would be to run the cron job ourselves, but I feel
like different organizations with different policies might prefer very
different frequencies; daily/hourly, and it's not easy to make that
configurable with a cron file declared in puppet.

Fixes #27866.
2023-11-27 16:34:31 -08:00
roanster007 8bd92fe801 bots: Fix muting of cross realm bots.
Previously, we weren't able to mute the cross realm bots. This was
because, for muting the users, we access only those profiles which are
in realm, excluding the cross realm system bots.

This is fixed by replacing the access_user_by_id method with a new
method access_user_by_id_including_cross_realm for this specific test.

Fixes #27823
2023-11-27 16:16:23 -08:00
Alya Abbott a3f5332844 help: Add more permissions info to Guest users help page. 2023-11-27 15:40:42 -08:00
Aman Agrawal cc6ab527b4 upgrade: Match width of license count input with billing page input. 2023-11-27 14:17:18 -08:00