Commit Graph

64005 Commits

Author SHA1 Message Date
Maneesh Shukla
4be0db08d9 notification_settings: Fix the misalignment of the topic notification header.
Co-authored-by: whilstsomebody <vishwakarmarambhawan572@gmail.comv>
2025-03-20 10:53:10 -07:00
Prakhar Pratyush
e95ee707a6 compose: Update topic input box when mandatory_topics setting changes.
Earlier, when `realm_mandatory_topics` setting was getting toggled,
the topic input box in composebox was not being live-updated to
align with the correspondning setting's UX.

This commit fixes that bug by making sure that placeholder and
other UI elements are updated accordingly.
2025-03-20 10:32:31 -07:00
Prakhar Pratyush
a54bd3cdfa compose_recipient: Avoid using .css() for visibility toggling.
This commit replaces direct `.css("visibility", "...")` calls
with `.addClass("visible")` and `.removeClass("visible")` to
manage the `$topic_not_mandatory_placeholder` visibility.

This improves maintainability by keeping styling in CSS.
2025-03-20 10:32:31 -07:00
Alya Abbott
2f263cac41 help: Add user list actions illustration. 2025-03-20 10:01:59 -07:00
Tim Abbott
bccc283554 Revert "compose: Fix buttons spilling from compose box."
This reverts commit 9243fa3d52.

This commit appears to have caused the same issue with the compose box
borders at other size/zoom configurations that may be more common.

We'll figure out a better fix and apply that.
2025-03-20 09:28:05 -07:00
Alya Abbott
18921ae79c portico: Add job posting for go-to-market leader. 2025-03-19 23:58:31 -07:00
Aman Agrawal
ec7252138c home: Fix compose box not visible on focus in Firefox Android.
Fixes #34010

From version 132, Firefox now defaults to not resize the viewport
content but only the visual viewport. While this works well in
Chrome Android, it creates a buggy experience in Firefox Android
where the compose box is hidden under keyboard.

To fix it, we rollback to resizing content when keyboard is shown
on Firefox Android.
2025-03-19 21:54:14 -07:00
Tim Abbott
299daa35bd mailmap: Add various entries for 10.0 release. 2025-03-19 18:14:56 -07:00
Tim Abbott
cad594c5ef docs: Move TODO/compatibility step in release checklist. 2025-03-19 18:11:20 -07:00
Tim Abbott
a4f128f609 models: Change default for can_resolve_topic_group.
It's not obvious why this should be different from the permission for
moving topics.
2025-03-19 17:51:46 -07:00
Anders Kaseorg
ce81d8498d provision: Ignore Python warnings while building requirements.
Build warnings are unfortunately very common in third-party packages.
They’re difficult to reliably detect since packages don’t always build
from source, and they can’t be whitelisted on a per-package basis
since they’re all attributed to setuptools or an anonymous code
string.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-19 17:15:09 -07:00
Lauryn Menard
edf787f87d help: Add article about moving to Zulip Cloud from self-hosting.
Adds a help center article that provides an overview and guide
for moving from a self-hosted Zulip organization to using Zulip
Cloud.

Updates the bullet points with the advantages of Zulip Cloud
that is also used in the help center article about choosing
between Zulip Cloud and self-hosting.

Fixes #24042.
2025-03-19 17:06:10 -07:00
Sayam Samal
25627bbb8a web: Replace deprecated apple-mobile-web-app-capable meta tag.
Avoid using deprecated meta tags like apple-mobile-web-app-capable,
as they can interfere with proper PWA installation. Safari may fall
back to these tags if it can’t load the manifest, leading to an
inconsistent and poor app experience.

Instead, this commit adds the mobile-web-app-capable meta tag as
suggested by the developer console.

Sources:
https://web.dev/learn/pwa/web-app-manifest#designing_your_pwa_experience
https://web.dev/learn/pwa/enhancements#installation_reliability
2025-03-19 16:50:07 -07:00
Prakhar Pratyush
80b772795c compose: Echo messages sent to "(no topic)"/"general chat" to topic="".
Server treats messages sent to "(no topic) or "general chat"
topic as being sent to empty string topic.

Messages sent in web client to "(no topic)" and "general chat"
were locally echoed to those respective topics, resulting in
being narrowed to those topics.

Ideally, the messages should be echoed in the empty string topic.

This commit fixes that bug.
2025-03-19 11:39:28 -07:00
Prakhar Pratyush
9a46104684 addressee: Rename "(no topic)" to empty string topic.
This commit renames "(no topic)" to "" when used as
topic name, while sending or scheduling messages.

This is particularly helpful for older clients where
sending messages with empty topic input box resulted
in messages being sent to "(no topic)" topic.

Now, it will be sent in empty string topic and will
appear in the "general chat" topic.

This helps older clients to somewhat align with the UX
of the clients supporting empty string topic.
2025-03-19 11:39:28 -07:00
Prakhar Pratyush
0774d80f8e migration: Rename "(no topic)" to empty string topic.
This commit adds migration to move messages from "(no topic)"
to the empty string topic.

It'll help in our plan to interpret messages sent to
"(no topic)" as being sent to "".

That interpretation will be particularly helpful for older
clients where sending messages with empty topic input box
currently results in messages being sent to "(no topic)" topic.

In 0680, we moved messages from the "general chat" topic
to the empty string topic. Therefore, we skip moving messages
from "(no topic)" if an empty string topic already exists.

Such cases—where both "(no topic)" and an empty string topic
coexist in a channel—should be rare. The solution is to either
manually rename the "(no topic)" topic or manually move its
messages to the empty string topic.
2025-03-19 11:39:26 -07:00
Prakhar Pratyush
ce7d07a498 populate_db: Fix is_channel_message incorrectly set to True for DMs.
We introduced `is_channel_message` flag in 90d76b692b.

While populating messages in dev environment, we were not setting
it to False for DMs / group DMs.

This commit fixes that bug.
2025-03-19 11:38:11 -07:00
Karl Stolley
7be9ac9883 stream_settings: Better handle word breaks. 2025-03-19 11:35:11 -07:00
harshbansal8705
8402323cb5 stream_settings: Improve handling of long stream titles in UI.
This commit makes the following changes to improve the display of long
stream titles in the stream creation and user group settings UI:

- Uses `display: -webkit-box` and `line-clamp` properties to show the
title upto two lines, and end with `...` if it exceeds.
- Updates icon `font-size` to align with text size.
- Updates `margin` and `line-height` to make it visually better.
2025-03-19 11:35:11 -07:00
harshbansal8705
9243fa3d52 compose: Fix buttons spilling from compose box. 2025-03-19 11:32:51 -07:00
Alex Vandiver
59fe17261e realm_export: Support up to 20GB of data via the UI.
We have not see noticeable impact due to export size.
2025-03-19 11:32:04 -07:00
apoorvapendse
11028d5244 copy: Use a global copy event listener.
This attempts to use a global copy event listener instead of
triggering the copy handler on Ctrl+C, as this is more robust way to
use browser APIs, including not intefering if end users choose to
remap copying keys on their keyboard.

This has various beneficial side effects, including copying from other
Markdown elements like the preview or drafts UI using the same code as
copying from the message feed.

Fixes: #33949.
2025-03-19 10:07:32 -07:00
apoorvapendse
353f57e518 copy: Style KaTeX annotations to be included in copy HTML.
We've for a while been finding that copy/paste of LaTeX only worked if
we had a more JS-heavy copy handler that directly copies the HTML/text
using events, rather than just allowing the browser's native copying
logic to do its thing.

We've discovered the bug was that the `<annotation>` tag in MathML is
not rendered in some browsers which results in default copy behavior
of the browser breaking KaTeX copy-pasting and quoting by omitting the
`<annotation>` in the copied HTML as Chrome and possibly other
browsers select only what is visible.

From https://www.w3.org/TR/selection-api/

> Chrome 16 dev behaves as you'd expect given its Selection
implementation. It refuses to select anything that's not visible, so
it's almost always wrong. Opera 11.50 just does nothing in all my
tests, as usual.

This can be observed in the `paste_html` fixtures present in
https://github.com/zulip/zulip/pull/33993#issuecomment-2725417637.

We fix this by simply overriding the `display:none` property from the
<annotation> tag in the user agent stylesheet, which lets the browser
select and ultimately copy it which results in the annotation being
present in the `paste_html` and restore the working of KaTeX
quoting/copy-pasting.

This appears to have no visible impact, since browsers don't actually
have a way to display the annotations.
2025-03-19 10:07:32 -07:00
Lauryn Menard
a4fff91e96 signup: Add "airsi.de" as an allowed email domain.
Renames WHITELISTED_EMAIL_DOMAINS to OVERRIDE_ALLOW_EMAIL_DOMAINS
as the set of email domains that are allowed even if they are in
the set of disposable email domains.
2025-03-19 10:04:11 -07:00
Alex Vandiver
aebc9081b8 migrations: Generate statistics for subject vs channel-messages.
These extended statistics allow the query planner to know that the
prevalence of empty topics is very different in DMs, as opposed to
channel messages.  The `ALTER STATISTICS` adjusts the size of the
"most common value" list -- it must be large enough to include the
empty-topic channel messages to be fully effective.  Having this list
be over-large does not carry much risk, however.

The `ANALYZE zerver_message` step may be quite slow.
2025-03-19 09:39:20 -07:00
Aman Agrawal
8858f03847 compose: Revert send button color to that in 9.x.
This reverts commits 9501082e99 and 
a8cfd2fb04.
2025-03-19 09:00:49 -07:00
Aman Agrawal
4dd11e7318 auth: Redirect the new subdomain for deactivate realms.
For realms whose subdomain has changed, we redirect the user to
the new realm with the same URL structure with just the subdomain
changed.
2025-03-19 08:59:52 -07:00
Alya Abbott
dcabac6cad docs: Describe how to configure navigation tour video. 2025-03-18 16:36:25 -07:00
Karl Stolley
7f8899bf99 message_edit: Preserve width of Save button when showing spinner. 2025-03-18 13:15:10 -07:00
Alex Vandiver
1eb4b65b5a queue: Round-trip events through orjson in tests.
This ensures that tests don't rely on non-JSON'able datatypes being
able to be put in an event.
2025-03-18 11:53:51 -07:00
Shubham Padia
b3862c5008 user_groups: Use UserGroupMembersDict in initial state data.
On the event side, orjson does the work of converting
UserGroupMembersData to json. But when fetching intial state data,
UserGroupMembersData was being returned which is not
json-serializable. This was causing a mismatch in the `verify_action`
workflow of test_events related to stream group settings where
apply_events resulted in a state with `direct_members` and
`direct_subgroups` as part of an ordinary dict, while fetching initial
state data was giving us a UserGroupMembersData class.
This commit uses UserGroupMembersDict where appropriate. It will
still be good to keep around the dataclass class since it has the added
benefit of storing the relevant value when needed.
2025-03-18 11:53:48 -07:00
Aman Agrawal
37d91d9759 message_fetch: Fix load_messages called unexpectedly.
Since we set a new timeout on every connection error, we can
unconditionally clear the timeout when load_messages is called.

This fixes the error when `load_messages` is called irrespective
of `delay_secs` timer.
2025-03-18 11:26:10 -07:00
Aman Agrawal
e5f4ba92f1 popup_banner: Fix retry attempt rolled back to 1 on button click.
Since we were using the same click handler callback as the first
time banner was displayed, `attempt` was stuck at `1` when
the click callback is called.

Fixed by removing the old event handler and reattaching the new one.
2025-03-18 11:22:58 -07:00
Aman Agrawal
b6480ec964 buttons: Fix loading spinner is visibly stuck.
Sometimes adding the loading indicator svg and making it spin were
happening in different rendering frames, making it look like the
loading spinner was stuck.

Fixed by making sure both happen in the same animation frame.
2025-03-18 11:22:58 -07:00
minhphung152
b4435ac4f3 message_history: Improve overlay header.
If users are only allowed to view move history, the header
is 'Message move history.' If users are allowed to view edit
and move history and the message is edited and moved, the header
is 'Message edit and move history.' Otherwise, it shows 'Message
edit history.' If the message is only moved (and not edited), it
shows 'Message move history.'

Fixes #34005.
2025-03-18 11:21:44 -07:00
Prakhar Pratyush
f8bedf3e3a compose_validate: Fix topic required error message not shown.
Earlier, with `realm_mandatory_topics=true` the topic required
error message was shown only when topic="".

The error message was missing for other topic names which are
also considered empty:
* "(no topic)"
* realm_empty_topic_display_name

This commit fixes the bug to show the error message for the
other two topic names too.
2025-03-18 11:18:37 -07:00
Prakhar Pratyush
0642c7a264 util: Fix is_topic_name_considered_empty function.
Earlier, the `is_topic_name_considered_empty` function
used to return true only if the topic_name is either:
* ""
* "(no topic)"
* `realm_empty_topic_display_name` value

The third condition is not precisely correct. This commit
replaces it with the displayed topic name for `""` topic.

The displayed topic name is not always the same as
`realm_empty_topic_display_name` value.
2025-03-18 11:18:37 -07:00
Shubham Padia
25f91a51ec streams: Do not send update event to users gaining metadata access. 2025-03-18 11:14:39 -07:00
Shubham Padia
0c7c13fc30 streams: Set include_all to True.
We set it to True when fetching streams in `fetch_initial_state_data`
and when trying to find newly accessible or inaccesible streams on role
update. We've added tests for role update, but since we don't test
`fetch_initial_state_data` directly, the role update tests changed in
this commit will fail if include_all is not set to True in
`fetch_inital_state_data`.
2025-03-18 11:14:39 -07:00
Shubham Padia
ec34f0b80f test_events: Use do_test_change_role to simplify role change tests.
All those if conditions and different number of events for each
condition was making the current test function unreadable. This commit
hopes to simplify that. All the setup work for the tests is still done
in the respective test functions and not `do_test_change_role`.
2025-03-18 11:14:39 -07:00
Alex Vandiver
fd127b4191 messages: Remove unconditional topic indexes. 2025-03-18 09:34:11 -07:00
Alex Vandiver
d978363a75 topic: Enforce is_channel_message=True on topic queries. 2025-03-18 09:34:11 -07:00
Alex Vandiver
33e1d583bf messages: Add new conditional versions of subject indexes.
Indexes on topic ("subject") are polluted by the existence of DMs,
which all have empty topics, and as such skew the statistics greatly.
This is particularly important given the new use of the empty topic
for the "general chat" function -- left as-is, the database makes bad
query plans because it believes the topic is vastly more common than
it actually is.

We move the old indexes to a new name with `_all`, and
recreate (concurrently) the same indexes but with a condition on
is_channel_message.  These new indexes are unused at current, until
the query-building logic adds limits on is_channel_message; see the
following commit.
2025-03-18 09:34:11 -07:00
Alex Vandiver
eba1c3afd4 messages: Mark is_channel_message as non-null. 2025-03-18 09:34:11 -07:00
Alex Vandiver
bca862e243 migrations: Backfill is_channel_message. 2025-03-18 09:34:11 -07:00
Alex Vandiver
47d55c4b6f messages: Add an is_channel_message flag. 2025-03-18 09:34:11 -07:00
Aman Agrawal
e365ac6d11 move_topic_to_stream: Tag text for translation. 2025-03-18 09:12:23 -07:00
Karl Stolley
e0aeb5cb52 recent_view: Enable avatars and overflow marker to scale. 2025-03-18 09:12:01 -07:00
Karl Stolley
0f17d6e7ef compose: Remove browser-default outline on Send button. 2025-03-18 09:10:54 -07:00
Karl Stolley
9b33a81351 compose: Remove focus-visible color from Send button. 2025-03-18 09:10:54 -07:00