Commit Graph

64602 Commits

Author SHA1 Message Date
Shubham Padia
68ec074a84 help-beta: Add support for displaying zulip icons.
We're using unplugin-icons to do so.
2025-05-12 18:13:26 -07:00
Shubham Padia
c97cd1c5dd help-beta: Add support for displaying font-awesome icons.
In our app, we use the font-awesome stylesheet, add it to our webpack
bundle and use the appropriate class with the <i> tag.
Here. although for font-awesome, we can use the stylesheet to do the
same, we would need to use `webfonts-loader` for our custom icons.
In this astro project, we want to follow the Astro way, and
unplugin-icons fits better with the Astro way of doing things.
See this topic on the discussion on how we chose unplugin-icons:
https://chat.zulip.org/#narrow/channel/19-documentation/topic/Stage.202.3A.20Icons/near/2168842
2025-05-12 18:13:26 -07:00
Shubham Padia
b378e33136 help-beta: Make it easier to keep track of imports in conversion.
Before this, every function itself was responsible for adding it's own
imports. That is extra string manipulation which we had to think about
everytime we were adding new conversion function.
Now, we have an import statement set that the functions can modify, and
we have a function responsible for adding those imports. This makes it
easier in the future to add more conversion functions which might be
introducing imports.
2025-05-12 18:13:26 -07:00
Karl Stolley
a82921f32c markdown: Experiment with custom bullets, counters. 2025-05-12 18:08:28 -07:00
Karl Stolley
a576ae9fb8 markdown: Restyle block quotes to spec. 2025-05-12 18:08:28 -07:00
Karl Stolley
8419bc3fb8 markdown: Offset list items from markers to spec. 2025-05-12 18:08:28 -07:00
Karl Stolley
054f34a2b5 markdown: Align bullets left, centered with counters. 2025-05-12 18:08:28 -07:00
Karl Stolley
ebb5383fc9 markdown: Align counters flush left. 2025-05-12 18:08:28 -07:00
Vector73
8e400eb283 tools: Update files in api_docs folder along with zulip.yaml. 2025-05-12 16:00:29 -07:00
Vector73
fba724fbb5 api_docs: Fix feature levels. 2025-05-12 16:00:29 -07:00
Vector73
42439b8f09 tools: Update version along with feature level.
Fixed merge-api-changelogs tool to update version too along
with feature level in API docs.
2025-05-12 16:00:29 -07:00
Tim Abbott
97ffd0fd5d users: Use mandatory kwargs in get_user_data. 2025-05-12 15:49:43 -07:00
Aman Agrawal
45d2c8acf5 users: Add parameter to fetch user data for a list of user ids.
This will help us defer loading user data from initial app load
to later when the user data is required.
2025-05-12 15:49:43 -07:00
Aman Agrawal
b459f6f3d2 users: Separate view function to get singer user data.
This will avoid overloading a function with similar parameters when
we add `user_ids` parameter to `get_members_backend`.
2025-05-12 15:13:49 -07:00
Evy Kassirer
25c0b279f7 invite: Fetch full user set for get_unique_subscriber_count_for_streams.
Work towards #34244.
2025-05-12 15:11:50 -07:00
Karl Stolley
3e9d3a8ff4 compose_typeahead: Add gap between topic, New indicator. 2025-05-12 12:12:00 -07:00
Alex Vandiver
1c8cfff0bd postgres: Add knobs for min_wal_size / max_wal_size. 2025-05-12 11:12:45 -07:00
Alex Vandiver
b4c8d2e6f5 postgres: Add knobs for parallelism control. 2025-05-12 11:12:45 -07:00
Alex Vandiver
933871e825 postgres: Double maintenance_work_mem to 1/8th, but cap at 2GiB.
This is based on annotated.conf[^1].

[^1]: c4ebbf1420/postgresql.10.simple.conf (L122-L133)
2025-05-12 11:12:45 -07:00
Alex Vandiver
8850c3f85c postgres: Tune effective_cache_size upwards, to 75%.
The previous 10/16ths is an odd value; various suggestions are around
75% of RAM, and in practice this is closer to what is observed.
2025-05-12 11:12:45 -07:00
Alex Vandiver
49c307e136 postgres: Remove explicit wal_buffers setting.
The value, if unset, defaults to[^1]:

> a size equal to 1/32nd (about 3%) of shared_buffers, but not less
> than 64kB nor more than the size of one WAL segment, typically 16MB

Letting it choose this, by default, but allowing an override via
`zulip.conf`, seems preferable to hard-coding an arbitrary value.

[^1]: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-WAL-BUFFERS
2025-05-12 11:12:45 -07:00
Alex Vandiver
45b6c5931a puppet: Remove unnecessary use of scope[...]. 2025-05-12 11:12:45 -07:00
Alex Vandiver
a4ddc0a2d5 postgres: Remove lower-than-suggested checkpoint_completion_target.
This defaults to 0.9, and lowering it is not generally suggested[^1].

[^1]: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-CHECKPOINT-COMPLETION-TARGET
2025-05-12 11:12:45 -07:00
Alex Vandiver
f47d150fb5 puppet: Allow overrides of computed PostgreSQL config settings.
The four precomputed memory values gain overrides in `zulip.conf` with
the same names, for more precise manual tuning.
2025-05-12 11:12:45 -07:00
Alex Vandiver
5bc75a94be puppet: Base PostgreSQL tuning on if the frontend is on the same host.
The previous thresholds were set based on the assumption that 50% of
the memory on the host was taken up by Django and friends, leaving
only 50% for the database host.

On separate database hosts, this leads to a too-small default value
for shared_buffers, which is generally suggested to be 25% of your
database-dedicated memory.

Check if there is a `zulip::app_frontend_base` as part of the deploy,
and use that to adjust if we halve `$zulip::common::total_memory_mb`
or not for purposes of calculating PostgreSQL memory settings.  We
also provide a `postgresql.memory` override, if necessary.
2025-05-12 11:12:45 -07:00
Anders Kaseorg
61c04078cc server_events: Extract interface for compose, transmit to new module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-12 11:07:12 -07:00
Aman Agrawal
eaeed0e0f8 inbox_ui: Store channel navigation state separately from inbox view.
We store last visited channel navigation state and restore it if
possible. This is store separately from inbox view state.
2025-05-09 15:13:56 -07:00
Aman Agrawal
1ace8b80f5 hash_util: Set channel URL based on user setting.
We now render channel feed URL or channel topics list URL in
all elements based on user setting.
2025-05-09 15:13:56 -07:00
Aman Agrawal
97c69e3038 inbox: Show inbox channel view based on user setting.
Fixes: #29574
2025-05-09 15:13:56 -07:00
Aman Agrawal
cc4b4f5670 users: Add new option in web_channel_default_view.
Added "list of topics" option which will allow users to indicate
that they want to view an inbox style list of topics on visiting
a channel link.
2025-05-09 15:13:56 -07:00
Aman Agrawal
6aca4c8509 topic_link_util: Use hash_util functions to get channel link.
This brings uniformity in code since we don't use `internal_url`
functions unless absolutely necessary.
2025-05-09 15:13:56 -07:00
Aman Agrawal
0ad2f8fc85 inbox_ui: Directly import inbox_util to code clarity. 2025-05-09 15:13:56 -07:00
Aman Agrawal
903e65aba8 util: Fix spelling mistake. 2025-05-09 15:13:56 -07:00
Anders Kaseorg
b8923128c9 compose_send_menu_popover: Fix check for closed popover.
An empty jQuery object is still truthy.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-09 14:51:01 -07:00
Alex Vandiver
1b9a8dbc52 kandra: Allow PostgreSQL primary ssh access for PostgreSQL upgrade.
This allows scripting of the whole upgrade process; these grants are
temporary.
2025-05-09 10:05:19 -07:00
Alex Vandiver
a959f71208 kandra: Support installing multiple ssh keys from multiple secrets. 2025-05-09 10:05:19 -07:00
apoorvapendse
5a21f42000 message_row: Remove cursor:pointer for messagebox.
Related article: https://adamsilver.io/blog/buttons-shouldnt-have-a-hand-cursor/

Fixes: https://chat.zulip.org/#narrow/channel/137-feedback/topic/.60cursor.3A.20pointer.60.20applied.20to.20whole.20message.20content/with/2167059
2025-05-09 09:05:32 -07:00
Lauryn Menard
c2007ebf30 support: Fix unit for file upload usage information. 2025-05-09 09:04:57 -07:00
Anders Kaseorg
5bdb734cde support: Avoid $(callback) to reduce zjquery complexity.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-09 09:04:39 -07:00
Anders Kaseorg
1a41a13ea3 upload: Avoid unnecessary .one() usage to simplify test.
Both of these handlers immediately hide the banner, so the difference
between .on() and .one() doesn’t matter.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 18:21:57 -07:00
Anders Kaseorg
15e04b1d8a server_events_dispatch: Use two-argument toggleClass.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 18:06:50 -07:00
Anders Kaseorg
147a2c40b2 reactions: Correctly convert template output to a jQuery object.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 17:13:25 -07:00
kash2104
2320a8917e channels: Include unsubscribed channels in move selectors.
For channel dropdowns in move messages and move topic modals
only subscribed channels are included.

To fix it, a new function is made to include subscribed
and unsubscribed channels to which the acting user has
content access. Each group is sorted respectively with
subscribed channels followed by unsubscribed channels.

To avoid unsubscribed channels from getting included in the
compose box dropdown and saved snippets UI, a separate function
get_stream_for_move_messages_widget is made. This function
is used to include unsubscribed channels in move selector
dropdown only.

Fixes #33670.
2025-05-08 12:20:54 -07:00
userAdityaa
354a16fb0a migration: Rename 'populate_db' Client to 'ZulipDataImport'.
This commit:

* Creates a migration to rename any existing Client with
name="populate_db" to "ZulipDataImport".
* Updates populate_db.py to use ZulipDataImport for new
message creation

These changes should make code to identify imported messages
considerably more readable.

Fixes #33909.
2025-05-08 12:18:34 -07:00
Evy Kassirer
9577dc9da7 typeahead_helper: Fetch full subscriber list while sorting.
Work towards #34244.
2025-05-08 10:10:36 -07:00
Maneesh Shukla
5b1ddf35ba buttons: Modify the styles of buttons in stream settings. 2025-05-08 09:40:51 -07:00
Shubham Padia
05542d6cb4 help-beta: Pass allowedHosts when running dev server.
Vite introduced allowedHosts config at
https://vite.dev/config/server-options#server-allowedhosts. This caused
our help beta dev server to break in case of dev droplets since it's
hostname is not specified in the allowed lists. Since we have a way to
know our hostname, we do not pass a blanket true for all hostnames in
this case.
2025-05-08 09:40:12 -07:00
Lauryn Menard
7fc9d29c1e support: Show file upload usage compared to realm upload quota.
Implemented on Zulip Cloud support view only since this information
isn't relevant for self-hosted support actions.

Looking up the realm's currently used upload space adds 3 database
queries to the support view test as there is no RealmCount data for
the upload quota used in the test. And therefore installation_epoch
is called for the realm.

With RealmCount upload quota used data, only 2 additional database
queries would be made for the realm's support view data.
2025-05-08 09:38:02 -07:00
Evy Kassirer
798f59a01b drafts: Remove noop setting of private_message_recipient in tests.
If we stub out `set_from_emails` as a noop, then setting the private
recipient is a noop and doesn't need to happen.
2025-05-08 09:36:36 -07:00
Evy Kassirer
497ba6bd25 compose_action: Move missed PM recipient into compose_defaults. 2025-05-08 09:35:53 -07:00