Commit Graph

66579 Commits

Author SHA1 Message Date
Aman Agrawal
478ea89506 left_sidebar: Avoid selecting header as first row when searching. 2025-09-03 16:13:38 -07:00
Aman Agrawal
a4c2327fa9 sidebar_ui: Extract selectors for left sidebar headers. 2025-09-03 16:13:38 -07:00
Alex Vandiver
fc962b8b0e run-hooks: Handle hooks after OS upgrade on fresh install. 2025-09-03 15:20:53 -07:00
Shubham Padia
012115a2bc documentation: Make sure article is secure to use.
The `article` variable being passed to `get_path` can also be a relative
path, which has it's security implications. By using `secure_filename`,
we mitigate that risk. We don't need to check if `/` exists in article
anymore since `secure_filename` will do so on it's own.
2025-09-03 09:28:15 -07:00
Shubham Padia
f9881b0182 help: Remove sidebar index from includes.
The sidebar index was an includes file in our previous help center since
we were using it to programmatically in documentation.py. Since that is
no longer the case, there is no reason for this file to be in includes.

A side-effect of us doing this is that now the overview section on the
right for the index page will be generated correctly with us avoiding
the issue in #35127.
2025-09-03 09:28:15 -07:00
Shubham Padia
4aac75e75e help: Tighten loose lists with tables or tips.
Fixes #35533.

We could not convert them in the source markdown files since removing
the preceding line for tips and tables was breaking our custom markdown
implementation.
2025-09-03 09:28:15 -07:00
Shubham Padia
7db29f29de help: Serve help center build without relative links for zulip.com.
We have a copy of help center with relative links disabled which is
reserved for root domains without an organisation on the root domain.
Ideally, we should have some logic to determine whether we are on such
a root domain or not. For practical short term purposes, since this
type of documentation is mainly useful for zulip.com, we add an
exception for zulip.com.
2025-09-03 09:28:15 -07:00
Shubham Padia
246fbf6d29 help: Add production config for the new help center.
Fixes #35131.

Most of the nginx config is copied from
https://docs.astro.build/en/recipes/docker/#nginx.

We ideally should be generating two builds for Zulip cloud and serve a
different one depending on whether the subdomain is same as the root
domain or not. We can look into this as an immediate followup while this
commit helps things get ready for a test deploy on CZO.
2025-09-03 09:28:15 -07:00
Shubham Padia
a766c092fc help: Restore broken link checks for help center documentation.
We add a step to build help center and then test the broken links as we
used to before removing the test temporarily.

This commit focuses on just adding back the broken link checks for the
help center. We skip the fragment check since that is in-built in
starlight and starlight tests account for that already. For the image
check we can add it back in a followup issue.
2025-09-03 09:28:15 -07:00
Shubham Padia
d333ddb961 help: Remove current help center.
This commit removes the current help center markdown files and any logic
that was used to host those files at help/.

We also remove a bunch of tests, we should the equivalent of those tests
for the new help center. Issues to track: #35649, #35647. These issues
track adding back tests for redirects and broken links.

We had a symlink from templates/zerver/integrations/email.md pointing to
help/using-zulip-via-email.md. We can no longer have that symlink since
the latter has been converted to an MDX file. We have deleted the
symlink and put a markdown file in it's place. Both the files have
comments to edit the other in case of changes.

This commit also makes changes in astro config, astro component paths
and other places to move the starlight help center docs base path from
/starlight_help to /help.

The change to rename /starlight_help/ to /help/ in MDX files is done in
the next commit. If we squash these commits, this line should be
removed.

`./tools/build-help-center` no longer does the conversion step.

We also remove some dead code related to the old help center in
documentation.py.
2025-09-03 09:28:15 -07:00
Shubham Padia
40f723c75a help-beta: Add MDX files to git.
We have not yet removed the help files. We can use this commit as a
conversion commit since a lot more help changes will be merged before
this PR gets merged. We will need to rebase on top of main, run
conversion step in this commit, push those changes and then merge the
PR.

NOTE: This commit temporarily breaks the astro build since we have
renamed the path in the MDX files from starlight_help/ to help/ early.
That should be fine since astro build will not break any tests right
now.
We should squash this commit with the next commit removing help center
files when merging into main and remove this NOTE.
2025-09-03 09:28:15 -07:00
Shubham Padia
8f16f1139e help: Move URL redirects from Django to Astro.
Fixes #35649.

We do not serve the astro build via Django and thus we have to move the
help center redirects. We get a warning by pagefind on all these
redirects that they will be ignored in the search results as they don't
have an HTML body. We can ignore this warning till the cutover and
create a followup issue to solve that warning if this commit goes
through main.
2025-09-03 09:28:15 -07:00
Shubham Padia
37ae73fa86 starlight_help: Do not use double curly braces for email address.
When we copied over the logic for the footer from the previous help
center, I forgot to remove the double curly braces which were getting
rendered as is in astro.
2025-09-02 10:02:10 -07:00
Pratik Chanda
62093ee37d search_suggestion: Fix empty topic suggestion topic display name.
Earlier, we removed topic display name for empty topic operand when
query was for topic autocomplete. But we should make sure that we
only do this for the last search term in the suggestion which
corresponds to the typed query and not any previously selected
entered search term. Also recently we removed subset suggestions,
so can safely check it for last search term for all suggestions.

This commit fixes this by checking if the topic suggestion is the
last search_term in the suggestion/search_terms.

Co-authored-by: Evy Kassirer <evy@zulip.com>
2025-08-29 14:30:49 -07:00
Mateusz Mandera
6ab30fcced import: Set Stream.subscriber_count for imported channels.
The import code wasn't setting subscriber_count at all, resulting in a
value of 0 when dealing with imports from 3rd party apps.
We run this unconditionally, also for imports from Zulip, since this
ensures we won't inherit incorrect values, if the data we're import has
them - e.g. due to some bugs that affected the server the data came from.
2025-08-29 11:58:17 -07:00
PieterCK
e9be0c54bd settings_export: Fix plural strings in export confirmation modal. 2025-08-29 11:33:17 -07:00
Karl Stolley
f5d3834dbf recents: Match filter dropdown states with filter input. 2025-08-29 11:32:24 -07:00
Karl Stolley
d90a1d8a2e recents: Match filters to filter-topic input. 2025-08-29 11:32:24 -07:00
Karl Stolley
0980919876 resize: Remove dead recent_view code.
While this value is set to a legacy px value in
app_variables.css, nothing ever reads from or uses
this height value.
2025-08-29 11:32:24 -07:00
Aman Agrawal
77d8140eb2 left_sidebar: Fix muted channel visible in collapsed folder on search.
While searching in left sidebar, if you collapse a folder, muted
or inactive channels are still visible.

This is due specificity of hiding the channel when folder is
collapsed was lower than that of showing it when a search
is active.

Fixed by increasing the specificity of hiding it when folder
is collapsed.
2025-08-29 10:27:09 -07:00
Pratik Chanda
acc5cffae4 filter: Use encoding for channel/topic narrow for url redirect.
Earlier, when generating redirect url for search exit, we did not
encode the url in case of topic narrows. We expect some characters
to be replaced when generating hash.

This commit encodes the url for channels and topic narrows and
prevents redirecting to broken hashes.
2025-08-29 10:24:34 -07:00
Karl Stolley
41e8d79e00 api_docs: Update get-file-temporary-url endpoint and add to sidebar.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-08-29 10:21:42 -07:00
Sahil Batra
6e17b05156 openapi: Mark server_supported_permission_settings field as stable.
We have mostly decided on the structure of the group permission
setting object in server_supported_permission_settings field of
register response, so this commit removes the comment mentioning
it as unstable and adds the corresponding "Changes" entry.
2025-08-29 10:20:28 -07:00
Sahil Batra
aae639a8a0 api-docs: Fix incorrect field names for group-setting value objects.
Documentation for group setting values at /api/group-setting-values
incorrectly mentioned obejct fields as 'direct_member_ids' and
'direct_subgroup_ids' when they actually are 'direct_members' and
'direct_subgroups' from the start.
2025-08-29 10:20:28 -07:00
Alya Abbott
b4edfb4a19 help: Clean up intro wording and add a note about subdomain reuse. 2025-08-29 10:19:50 -07:00
Lauryn Menard
f5587e9ffe api-docs: Revise update_message changes notes for feature level 114. 2025-08-29 10:00:44 -07:00
Lauryn Menard
87f0bea0fc api-changelog: Use backticks for null consistently in changelog. 2025-08-29 10:00:44 -07:00
Alex Vandiver
662c946635 puppet: Stop using an unnecessary concat.
This was added in 6975417acf, to support `zmirror` deployments,
which are no longer necessary.
2025-08-29 09:45:28 -07:00
apoorvapendse
3188d9db31 tools: Enforce '_html' suffix for unescaped hbs vars.
This adds a check to enforce the new convention of
raw HTML variables having a `_html` suffix for
better clarity.

Discussion: https://chat.zulip.org/#narrow/channel/92-learning/topic/Marking.20commits.20to.20be.20squashed.20in.20PRs
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-08-28 17:33:20 -07:00
apoorvapendse
a935866601 tools: Fix out-of-bounds error for get_handlebars_tag.
This might lead to errors in case we don't always have
a newline as the last character of a template.

Discussion: https://chat.zulip.org/#narrow/channel/6-frontend/topic/Add.20linter.20rule.20to.20denote.20HTML.20string.20in.20template/near/2240213
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-08-28 17:33:20 -07:00
Pratik Chanda
85e7d2f5f7 search_suggestion: Remove subset suggestions from search suggestion.
Earlier, we would show subset suggestions for current search pills
in the suggestion list. Like if `is:dm`, `is:mentioned` and `has:link`
are already selected in the searchbox, we would show
`is:dm, is:mentioned` and `is:dm` again in the suggestion.

This commit removes subset suggestions for current search pills
from the suggestion line.
2025-08-28 17:28:39 -07:00
Prakhar Pratyush
e8c9f4a811 api_docs: Deprecate the non-E2EE register push device endpoints.
Endpoints marked deprecated:
* /users/me/apns_device_token
* /users/me/android_gcm_reg_id

The older endpoints were for non-E2EE push notification case.

Fixes part of #35213.
2025-08-28 16:45:51 -07:00
Prakhar Pratyush
b157b14d76 api_docs: Mark /mobile_push/test_notification as deprecated.
The older endpoint was for non-E2EE push notification case.

Fixes part of #35213.
2025-08-28 16:45:51 -07:00
Saubhagya Patel
d0e45b99ef tippy: Remove redundant tippy instance destruction.
When `onShow()` returns `false`, the tippy instance is
automatically destroyed. This commit removes manual
destruction calls in such cases.
2025-08-28 16:40:36 -07:00
apoorvapendse
7a52313f85 composebox: Fix composebox closing on clicking links.
Previously, clicking on links with the composebox open
didn't close it.

7391a2983f introduced a bug
where the composebox focus logic wasn't triggered at all
if drag evidence wasn't present on the target.

We now do a `e.target.closest("a").length > 0` check
like before and only prevent the default click behavior if
dragging on the target link is detected.
This allows normal link clicks to trigger the
previous composebox focus trigger logic.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/composebox.20closes.20when.20going.20to.20recent.20conversations
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-08-28 16:35:04 -07:00
Evy Kassirer
c52174a0a2 channel_folders: Don't label section OTHER if there are no folders above it.
Fixes #35878.
2025-08-28 15:33:12 -07:00
Karl Stolley
71fcee5093 me_messages: Don't apply an ellipsis to me messages. 2025-08-28 15:20:11 -07:00
Karl Stolley
165c47cb14 compose: Ensure textarea is hidden in compose preview.
This corrects a subtle bug where being zoomed in in
a narrow window causes textarea bleedthrough behind
elements like the audio player.
2025-08-28 15:20:11 -07:00
Karl Stolley
8a40b0699a audio: Present download button with tooltip.
Fixes #35636.
2025-08-28 15:20:11 -07:00
Karl Stolley
548c690f83 audio: Register player as clickable message element.
This matters most for Safari of at least v. 18.6, which
allows clicks on the player to bubble up the DOM.
2025-08-28 15:20:11 -07:00
Karl Stolley
cacd73fd8b audio: Present audio player in wrapped element. 2025-08-28 15:20:11 -07:00
Karl Stolley
3787fb3b02 message_list: Process me-messages as having message content. 2025-08-28 15:20:11 -07:00
Karl Stolley
1bcc52c860 cleanup: Remove comments from abandoned approach. 2025-08-28 15:20:11 -07:00
Sayam Samal
a0441b5bcb topic_popover: Update topic URL to permalink for message header popover.
This commit updates the topic URL in the message header topic menu
popover, introduced in feedb6ea2d to a
permalink having a `with` operator attached to it.
2025-08-28 15:08:47 -07:00
Alya Abbott
1e49b01d80 help: Document that current defaults are used when invite is accepted. 2025-08-28 15:07:28 -07:00
Prakhar Pratyush
f52533795b api_docs: Document /remotes/push/e2ee/register endpoint.
This commit documents the `/remotes/push/e2ee/register` endpoint.

We use auth_email="ZULIP_ORG_ID" and auth_api_key="ZULIP_ORG_KEY"
instead of "BOT_EMAIL_ADDRESS" and "BOT_API_KEY".
2025-08-28 11:46:09 -07:00
Prakhar Pratyush
062a736097 api_docs: Prep work to document zilencer endpoints.
Until now we were not documenting bouncer's REST API endpoints.

We plan to document the newly introduced "remotes/push/e2ee/register"
and "remotes/push/e2ee/notify" endpoints.

This commit does the prep work for documenting bouncer endpoints:
* mark the older endpoints related to sending non-E2EE push
  notifications as "intentionally_undocumented" - we'll remove
  them in future.
* the remaining endpoints are marked pending-to-document with
  helpful comments.
2025-08-28 11:46:09 -07:00
Prakhar Pratyush
9785cb4a09 render_curl_example: Remove unused 'auth_email' & 'auth_api_key'.
The 'function' variable in 'APICodeExamplesPreprocessor.generate_text'
matches the pattern of API_ENDPOINT_NAME = r"/[a-z_\-/-{}]+:[a-z]+"

It is always of the form 'endpoint_path:endpoint_method'.

There's no possibility of multiple ':'.

This commit removes the unused code block in `render_curl_example`,
which was trying to get 'auth_email' & 'auth_api_key' from 'function'.
2025-08-28 11:46:09 -07:00
Kislay Verma
67ca49488f tests: Use make_realm to create type-correct realm objects.
Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
2025-08-28 11:35:07 -07:00
Prakhar Pratyush
c604ecb902 push_notifications: Log roundtrip time since worker decided to send.
Adds a log for the end-to-end latency from when the worker decided
to send push notifications & received a success response from bouncer.

Fixes part of #35368.
2025-08-28 11:08:02 -07:00