Commit Graph

63435 Commits

Author SHA1 Message Date
Prakhar Pratyush
c777fede07 compose_state: Remove empty_topic_placeholder function.
This commit removes `empty_topic_placeholder` function as
it is no longer used.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
7cfe3b7828 message_list_view: Remove always_visible_topic_edit.
We no longer have "(no topic)" placeholder for empty string topic,
so there's no need to push for configuring a topic.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
995724225f recent_view_ui: Use last_visited_topic=undefined when no topic is set.
This commit updates `last_visited_topic` to be explicitly `undefined`
instead of an empty string when no topic is set.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
6e568d686a stream_list: Fix not being narrowed to stream feed on click.
When narrowed to an empty string topic, clicking on the stream
name in the left sidebar should narrow to stream feed.

Earlier, it was not working. This commit fixes the bug.
2025-02-20 10:09:41 -08:00
Prakhar Pratyush
1beb9ec10c stream_list: Fix missing 'go to channel feed' tooltip for topic="".
Earlier, the 'go_to_channel_feed_tooltip' was missing when
hovering over the stream name in left sidebar while being
narrowed to an empty string topic.

This commit fixes the bug.
2025-02-20 10:09:41 -08:00
evykassirer
3fccbdd369 saved snippets: Use em for width, font-size, padding. 2025-02-20 10:06:55 -08:00
Lauryn Menard
7a315b7b0e help: Add create a to-do list via compose box button tip.
Adds a tip for creating a collaborative to-do list via the new
compose box button in the markdown formatting article.

Edits the include examples for to-do lists so that the note about
marking a task as complete/incomplete is text before the example
screenshot.

Revises the collaborative to-do list article for a missing comma,
and adjusts some line wrapping.

Fixes #33522.
2025-02-20 10:01:39 -08:00
Vector73
e9d31d63a7 tools: Add tools to manage API feature level changes.
This commit adds two new tools to avoid API feature level rebases:

`create-api-changelog`: Generates an empty changelog file for temporarily
recording API changes.

`merge-api-changelogs`: Merges temporary changelog files and increments
the API feature level.
2025-02-19 17:16:10 -08:00
Mateusz Mandera
517538a296 management: Don't silence send_server_data_to_push_bouncer exceptions.
When these exceptions are thrown from the request-to-bouncer functions
inside of manage.py register_server/update_analytics_counts, they
shouldn't be silenced, merely calling maybe_mark_pushes_disabled in the
background.
This results in the occurrence of the error not being shown to the
user. Failure to upload analytics data when running these commands
should result in a loud, obvious error.

Failure of running register_server before this change:
```
./manage.py register_server
This command registers your server for the Mobile Push Notifications Service.
Doing so will share basic metadata with the service's maintainers:

* This server's configured hostname: zulipdev.com:9991
* This server's configured contact email address: desdemona+admin@zulip.com
* Metadata about each organization hosted by the server; see:

    <https://zulip.com/doc-permalinks/basic-metadata>

Use of this service is governed by the Zulip Terms of Service:

    <https://zulip.com/policies/terms>

Do you want to agree to the Zulip Terms of Service and proceed? [Y/n]

Mobile Push Notification Service registration successfully updated!
```

The occurrence of the error is not revealed to the user. Same concern
applies to the update_analytics_counts command.

After this change:
```
./manage.py register_server
This command registers your server for the Mobile Push Notifications Service.
Doing so will share basic metadata with the service's maintainers:
    <...>
Do you want to agree to the Zulip Terms of Service and proceed? [Y/n]

Traceback (most recent call last):
  File "/srv/zulip/./manage.py", line 150, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/zulip/./manage.py", line 115, in execute_from_command_line
    utility.execute()
  File "/srv/zulip-venv-cache/bb36fc1fcb6d8c70a9a0bcb7bac45d78623a9ff4/zulip-py3-venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/zulip-venv-cache/bb36fc1fcb6d8c70a9a0bcb7bac45d78623a9ff4/zulip-py3-venv/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/zulip/zerver/lib/management.py", line 97, in execute
    super().execute(*args, **options)
  File "/srv/zulip-venv-cache/bb36fc1fcb6d8c70a9a0bcb7bac45d78623a9ff4/zulip-py3-venv/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
  File "/srv/zulip/zerver/management/commands/register_server.py", line 137, in handle
    send_server_data_to_push_bouncer(consider_usage_statistics=False, raise_on_error=True)
  File "/srv/zulip/zerver/lib/remote_server.py", line 453, in send_server_data_to_push_bouncer
    response = send_to_push_bouncer(
  File "/srv/zulip/zerver/lib/remote_server.py", line 233, in send_to_push_bouncer
    raise JsonableError(msg)
zerver.lib.exceptions.JsonableError: Duplicate registration detected.
```
2025-02-19 17:11:35 -08:00
Mateusz Mandera
1532b87910 zilencer: Log bouncer-side info when RemoteRealm creation fails.
This should also be logged on the bouncer side, to give us better
debugging information when self-hosters run into this error.
2025-02-19 17:11:35 -08:00
Sahil Batra
8a76da5953 typeahead: Fix left margin for groups icon in typeahead.
This commit fixes the left margin for groups icon in the
typeahead so that icon is aligned correctly with the
avatar in user item in typeahead.
2025-02-19 17:02:51 -08:00
Sahil Batra
434a145e31 typeahead: Handle matching for "role:members" system group.
The name displayed for "role:members" group is
"Everyone, except guests" and "role:members" group should
be shown in the typeahead when searching for "Members" as
well, i.e. while matching the query in the input "Members"
and "Everyone, except guests" both should be considered as
display names for "role:members" group.
2025-02-19 17:02:51 -08:00
Sahil Batra
ff05fd558c groups: Change display names of everyone and members system groups.
"role:members" group name is displayed as "Everyone except guests"
in the UI and "role:everyone" group name is displayed as
"Everyone including guests".
2025-02-19 17:02:51 -08:00
Sahil Batra
04ec16a172 typeahead: Consider display name for system groups when sorting.
When sorting items for typeahead in sort_recipients, display
names should be considered for system groups and not their
original names.
2025-02-19 17:02:51 -08:00
Anders Kaseorg
3823697e6c clean_node_cache: Remove.
The old /srv/zulip-npm-cache system has been unused for two
years (Zulip Server ≥ 7.0).  We can just delete this directory.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-19 16:44:02 -08:00
Alya Abbott
6db76c8fa8 help: Note that other users can see who's deactivated. 2025-02-19 16:43:37 -08:00
Anders Kaseorg
541fa87d51 pyre: Remove unmaintained configuration for Pyre and Pysa.
This doesn’t run at all right now, doesn’t look simple to get working,
and doesn’t seem to have anyone interested in it at this time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-19 16:43:20 -08:00
Alex Vandiver
ce34ebdfed kandra: Add a hook to notify of local schema drift from merge-base. 2025-02-19 12:43:00 -08:00
Anders Kaseorg
3ead4c06f0 app_variables: Rename “color” variables that are actually gradients.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-19 11:01:48 -08:00
Anders Kaseorg
320c7a04ba app_variables: Fix light-dark() conversion of gradients.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-19 11:01:48 -08:00
apoorvapendse
9eb2f0a7d5 typeahead: Add comment for no left margin in status emoji.
Fixes: https://chat.zulip.org/#narrow/channel/6-frontend/topic/Removing.20extra.20space.20for.20status.20emoji.20in.20typeahead.2E/near/2095823
2025-02-19 10:51:44 -08:00
apoorvapendse
058347ce59 typeahead: Use null check for user comma insertion.
As per https://github.com/zulip/zulip/pull/33536#discussion_r1960991985
which seems like a better fix than the current
implementation to include/exclude comma after
pronouns.
2025-02-19 10:51:44 -08:00
Maneesh Shukla
a98135649f deactivated_user: Show deactivated status for deactivated users.
Fixes: #26833.
2025-02-18 22:20:05 -08:00
Abel Abate
2e95012c90 postprocess: Fix animated images automatically playing on Firefox.
This commit fixes a bug where animated images automatically play on
Firefox because the image source didn't output the same URL across
different browsers. Currently, the image source is normalized to
ensure consistent URLs across different browsers.

Fixes #33248

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2025-02-18 22:08:00 -08:00
Anders Kaseorg
df7ad517c5 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
a1983d9052 python: Replace deprecated BeautifulSoup.findAll.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
949e5004cb codespell: Fix typos caught by codespell.
“Brunch” wasn’t a typo, but, whatever.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
0aef42cbed decorator: Work around internal_api_view typing problem.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
778a45d41e slack_incoming: Fix slack_error_handler typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
ec3d187659 backends: Fix type errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
302b961ec1 backends: Add missing @override declarations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Anders Kaseorg
4703aed86f backends: Rename SAMLAuthBackend.process_logout override.
Our method has an incompatible signature and cannot be validly typed
as an override.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 22:04:43 -08:00
Maneesh Shukla
f8b1487fbe user_groups_settings: Add styles to hide the email table data on small screens. 2025-02-18 22:03:19 -08:00
Maneesh Shukla
40303fc4ba user_group_settings: Fix the alignment of remove button. 2025-02-18 22:03:19 -08:00
Prakhar Pratyush
f63902939f desktop_notification: Add support for empty string topic.
This commit adds support to display `realm_empty_topic_display_name`
value for empty string topic in the desktop notification.
2025-02-18 21:56:04 -08:00
evykassirer
2eccb8b46e compose: Remove stale classname: compose_draft_button.
This was removed in 609106e2d0
but the CSS was still there, unused.
2025-02-18 21:55:45 -08:00
Apoorva Pendse
f942b85c6d composebox_typeahead: Remove extra comma in user mentions.
This makes sense because we only insert comma
if the email address is shown next to the
pronouns as of now.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20extraneous.20comma.20after.20pronouns/with/2088251.
2025-02-18 21:48:32 -08:00
Anders Kaseorg
4e04eed745 typos: Fix typos caught by typos and mwic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 19:44:02 -08:00
apoorvapendse
2204863aa2 composebox_typeahead: Update order of user typeahead elements.
Also fixes the extra comma issue
linked below.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20extraneous.20comma.20after.20pronouns/with/2088251.
2025-02-18 17:22:37 -08:00
Anders Kaseorg
b5b2d1e364 app_variables: Use CSS light-dark().
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark
https://www.npmjs.com/package/@csstools/postcss-light-dark-function

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 16:23:03 -08:00
Anders Kaseorg
4cbcc891db app_variables: Remove dead variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-02-18 16:23:03 -08:00
opmkumar
2e19d0c025 todo_modal: Remove side scrolling in the todo modal. 2025-02-18 14:53:48 -08:00
evykassirer
f72dbad5e6 compose: Fix em calculation errors.
Followup to  #33523.
2025-02-18 14:53:23 -08:00
evykassirer
b2c5eed70d emoji: Scale emoji popover with em. 2025-02-18 14:49:52 -08:00
evykassirer
67ba364d67 popovers: Scale font-size consistently (15px at 14px em). 2025-02-18 14:49:52 -08:00
Mateusz Mandera
ceca2d1e26 migrations: Add migration fixing realm of Attachments.
Old messages with attachments, sent by cross-realm bots, didn't have
the realm set correctly to the target realm, this migration fixes it
by looking at the messages linking to the attachment and setting the realm
based on the recipient.

This is the migration follow-up to
4102816240
2025-02-18 14:46:30 -08:00
evykassirer
65e77d8fd4 typeahead: Use em for image placement.
This is a quicker fix before we convert these styles to grid.
2025-02-18 14:04:01 -08:00
Apoorva Pendse
dece35d066 search: Fix Ctrl+Backspace whitespace removal on typing.
Fixes: #33443.
Co-authored-by: Harsh Bansal <harshbansal8705@gmail.com>
2025-02-18 13:31:17 -08:00
Shubham Padia
89ea21f7f0 stream_data: Use user_has_permission_for_group_setting.
Before this, we were using `is_user_in_setting_group` which does not do
the extra checks around a guest user's permissions (and in future, some
other checks).
We introduced `initialize_and_override_current_user` in stream_data test
to make it easier to set current_user.user_id.
2025-02-18 12:49:05 -08:00
Alex Vandiver
a20f2a9735 import_realm: Skip lock=true when enqueuing thumbnailing.
The `lock=true` parameter fails, since it is not being run inside of a
transaction.  We swap to not using locking, since there is no
correctness requirement for a lock here.
2025-02-18 12:18:23 -08:00