Commit Graph

5766 Commits

Author SHA1 Message Date
Anders Kaseorg
4603472fe3 event_types: Combine typing_edit_message variants.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-24 22:33:49 -07:00
Shubham Padia
cb852b0fa6 help-beta: Add ZulipTip custom component that does not have a header.
We do not want to have a heading for every tip and thus we created a
custom component for our aside. We want to add a lightbulb icon and the
text `Tip:` is bold as a prefix for every tip as if it was already part
of the text. To do that, we cannot insert both of those as html seperate
from the slot html, we had to access the slot html and insert both of
them into the HTML tree.
2025-07-24 12:00:26 -07:00
Shubham Padia
41846b35ab help-beta: Convert indented admonitions to asides.
Fixes https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20broken.20tip
After indenting asides properly, they became part of lists, so we had to
change Flattenlist to allow asides inside it and ignore comments.
2025-07-24 11:59:48 -07:00
Vector73
6f8cb2b787 message_delete: Refactor message delete functions in a new file. 2025-07-24 11:53:34 -07:00
Shubham Padia
6b66449352 help: Disallow class in svg.
When copying svg from other places e.g. lucide, class names are also
copied over. These classes are not defined in our css and thus have no
effect whether they are present or not. But if the svg has the class
property, unplugin-icon will not override that class property and apply
the defaultClass we have defined in astro.config.mjs. We need that class
for our icons to look as desired.
2025-07-23 11:24:12 -07:00
Anders Kaseorg
63f6a97f0c install-shfmt: Upgrade shfmt from 3.11.0 to 3.12.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Shubham Padia
e2011fcd97 icons: Do not allow stroke property via the style tag in svgs.
We already had a lint rule for this, but we did not disallow setting it
from the style side. There is no existing violation of this rule, but
it's still better to have this rule in place.
2025-07-22 12:55:05 -07:00
Shubham Padia
22d8c725eb icons: Do not allow stroke property via the style tag in svgs.
We already had a lint rule for this, but we did not disallow setting it
from the style side. This was breaking the icons changed in this commit
in our new astro help center.
2025-07-22 12:55:05 -07:00
Shubham Padia
d24f2972d4 icons: Do not allow fill property via the style tag in svgs.
We already had a lint rule for this, but we did not disallow setting it
from the style side. This was breaking the icons changed in this commit
in our new astro help center.
2025-07-22 12:55:05 -07:00
Mateusz Mandera
4bd6fd6307 ldap: Use savepoint=True to avoid breaking ldap sync transaction.
Due to the atomic(savepoint=False) here, an LDAP sync exception while
syncing a single user breaks the whole sync_ldap_user_data transaction,
preventing it from successfully syncing other users.

Fixes a regression introduced in
1eecbad381

Closes #35291.
2025-07-21 13:10:04 -07:00
Shubham Padia
6d93465f3b help-beta: Remove header from Zulip note.
We don't want to have a title of note and the ⓘ  icon in the note aside.
The only way to do this is to have our custom component called
ZulipNote.
2025-07-21 12:56:52 -07:00
Shubham Padia
8f51b93223 help-beta: Convert file includes that don't occupy their own lines.
The regex we were using for file includes was searching for the syntax
at the start of a line but the file includes can be followed by a `- `
as part of a list item, due to which 15 occurences of includes were not
being converted. This commit fixes that.
2025-07-21 12:56:52 -07:00
Shubham Padia
81fbc93cd9 help-beta: Build step should accept --no-relative-links.
Partially fixes #35131.
2025-07-17 09:22:13 -07:00
Alex Vandiver
ec7e5dc8b6 docs: Update for switch from Transifex to Weblate. 2025-07-16 19:59:20 -07:00
Alex Vandiver
f22680da31 i18n: Update tooling from Transifex to Weblate. 2025-07-16 19:59:20 -07:00
Alex Vandiver
d1995687c9 i18n: Remove mobile.json-related codepaths. 2025-07-16 19:59:20 -07:00
Shubham Padia
de472a09f9 help-beta: Add footer to the new help center.
Fixes #35116.
We copied whatever logic we needed from documentation_main.html. We have
not added the policy footer case from that html file into our footer
since that case does not apply to the new help center yet.
We process and pass the support email in the build help center step.
2025-07-14 10:45:40 -07:00
Shubham Padia
37da139442 help-beta: Use CORPORATE_ENABLED instead of SHOW_BILLING_HELP_LINKS.
We should use the generic name of the env variable since we intend to
use it in places without the billing help links context.
2025-07-14 10:45:40 -07:00
Vector73
a77fc6aa79 stream_settings: Add new disable_topics option to topics_policy.
Adds new configuration option `disable_topics` in `topics_policy`
channel setting to support disabling topics in the channel.

Fixes #34553.
2025-07-09 14:25:53 -07:00
Vector73
f9d52189fc github_actions: Check if feature levels are updated in API docs.
In the past, some API documentation changes were merged with
unresolved placeholders like "ZF-..." instead of actual feature level numbers.
This commit introduces a GitHub Action that scans the API docs for
any occurrence of "ZF-". If found, it will fail the CI check and block the
commit from being merged into main.

This ensures that all feature level references are properly updated before merging.
2025-07-09 09:33:55 -07:00
Kislay Verma
e6dabb4ef4 compose_paste: Convert large pasted text into uploaded text file.
When pasting a long piece of text into the compose box (or
message edit textarea), we show a banner giving an option to
put the text into a file and upload it.

The banner is only shown if the text is larger than
`MINIMUM_PASTE_SIZE_FOR_FILE_TREATMENT`.

If the user chooses to "convert to file", the textarea content is
restored to its state before pasting and a file with the pasted
content is uploaded. The banner is hidden as soon as any change is
made to the textarea content to avoid inconsistent state and
confusion.

Fixes #33107.

Co-authored-by: Aditya Chaudhary <aditya.chaudhary1558@gmail.com>
2025-07-08 18:58:03 -07:00
Sayam Samal
71d75532fe inputs: Implement redesigned input component.
This commit serves as the base for the ongoing effort to standardize
redesigned input elements throughout the Zulip Web UI. It introduces a
new Handlebars partial block for inputs, located at
web/templates/components/input.hbs.

The partial can be used with the partial block syntax: {{#> input}},
allowing contributors to pass in the input element as a template. This
approach wraps the input with a consistent structure that includes
support for an icon and an action button. It also applies the necessary
styling to ensure visual and functional consistency across the web UI.

This commit also implements the filter input component at
/devtools/inputs/ showroom page for design discussions and prototyping.
2025-07-03 11:45:35 -07:00
Aman Agrawal
4a8d86f151 overlays: Add overlay to display scheduled reminders. 2025-07-02 13:02:45 -07:00
Vector73
459b4867f2 tools: Add support for viewing updated changelog for testing.
Adds support for showing unmerged changelogs in
"changelog.md" for testing purposes.
2025-07-02 11:34:34 -07:00
Tim Abbott
3593c5f4c7 run-dev: Disable Django runserver warning. 2025-07-02 11:25:30 -07:00
Shubham Padia
30ff98c2f6 help-beta: Function to insert flattened steps should run on includes.
We were not running this function on includes, for relative/settings
links and for nested includes, we need to flatten them in the includes
too.
2025-07-02 09:27:48 -07:00
Shubham Padia
aebbdee5b5 help-beta: Add eslint plugin for astro files. 2025-06-30 09:06:18 -07:00
Shubham Padia
f37ffd8937 help-beta: Add prettier plugin for astro files.
Even though we have separate packages for `help-beta`, we have opted to
put the prettier plugin and config for astro files in the main project
itself, so that linting needs to be configured only at one place.
2025-06-30 09:06:18 -07:00
Shubham Padia
7e359465cd help-beta: Do not use stderr=subprocess.STDOUT in build-help-center.
The default of using actual STDERR is fine.
2025-06-30 09:06:02 -07:00
Shubham Padia
b7fa1e6a3c help-beta: Only convert .md files.
Fixes https://chat.zulip.org/#narrow/channel/19-documentation/topic/build-help-center.20exceptions

We were getting an error during the conversion step if there was somehow
a non utf-8 file in /help. In the case that we encountered, it was most
likely .DS_Store created by MacOS.
2025-06-29 23:32:25 -07:00
Anders Kaseorg
a113a42e11 semgrep: Strengthen HTML and SQL injection checks.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-29 23:14:11 -07:00
Tim Abbott
ed2e9777c9 build-help-center: Don't fail the first time. 2025-06-26 11:24:31 -07:00
Tim Abbott
48c2b19066 tools: Fix linter error in build-help-center.
I'm not sure how I missed this when moving the django import.
2025-06-26 11:19:40 -07:00
Shubham Padia
8d4c2b7847 help-beta: Add support for relative links.
Fixes #31253.
We've added another env variable called `SHOW_BILLING_HELP_LINKS`.
This env variable is set to `settings.CORPORATE_ENABLED` if the
`build-help-center` tool is used.
2025-06-26 10:53:53 -07:00
Shubham Padia
a90856864a help-beta: Convert build-help-center to a Python script.
We need to fetch some values from settings in the future and use it in
the build process, we need our script to be in Python for that.
2025-06-26 10:53:51 -07:00
Shubham Padia
224b98b455 help-beta: Fix relative path during initial stages of conversion.
When we were doing it later, the issue we encountered was that when we
add support for relative links in the future, relative path fixing was
happening after `relative/help` had been added to the modified markdown
file, replacing it with `relative/help-beta` which wasn't the
replacement we intended.
2025-06-26 10:46:37 -07:00
Shubham Padia
a0deeae80e help-beta: Introduce NavigationSteps component for settings links.
Fixes #31254.
We are using `SHOW_RELATIVE_LINKS` as the env variable to set if we
want to show relative settings link or non-linked markdown instructions.
We are not trying to determine `SHOW_SETTINGS_LINK` by ourselves. See
https://chat.zulip.org/#narrow/channel/49-development-help/topic/Passing.20sitename.20for.20astro.20project.20in.20production.2E
for more details.
Until the cutover happens, we would need to manually update the mapping
in both the astro component and the python file, but since that mapping
is not frequently changed, that is a tradeoff we can make.
We had to add margin-bottom: 0 to icon styling since starlight was
inserting a margin-bottom of 1.25 em for list items.
2025-06-26 10:46:37 -07:00
Aman Agrawal
b5f7e24669 message_reminder: Add UI to schedule message reminder.
This adds an option in message actions popover menu to schedule
a message reminder.
2025-06-25 12:05:28 -07:00
Anders Kaseorg
f990a1400f ruff: Fix FURB122 Use of f.write in a for loop.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-25 11:49:02 -07:00
Anders Kaseorg
e8fdae8f7b ruff: Fix PLR1733 Unnecessary lookup of dictionary value by key.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-25 11:49:02 -07:00
Kislay Verma
9507b7b36f organization settings: Clean up labels for custom time limits.
We make the text "minutes" agree with the number
in the input field.
In the future, we could make the units configurable
as in the invitation modal.

Fixes #34692.
2025-06-24 10:12:15 -07:00
Shubham Padia
1e50a98b01 help-beta: Add TODO list to keep track of items before cutover. 2025-06-23 09:48:43 -07:00
Shubham Padia
2977bf364e help-beta: Use FlattenList component instead of hacky middleware.
We want to follow the Astro way of doing things and the middleware was
adding more magic + it was violating commonmark spec:
https://spec.commonmark.org/0.31.2/#example-301.

We insert FlattenList component where include files are being
treated as part of ordered lists. Astro renders included files as it's
own component, which would result in multiple ordered lists instead of
a single list if we did not use this component. See the astro component
file itself to know more how FlattenedSteps works.

We are not inserting FlattenList component for files with !!! tip
components, since we need to do it inside the include file. There are 4
such files at the time of writing this comment.
`is_include_only_ordered_list` makes sure of that. We can do the
conversion for it manually during cutover or in a followup PR.

All unordered lists at the time of writing this comment are standalone
components and we do not need to do any transformation for them.

We also changed the order of conversion of include and main files.
Include files are now being converted first to calculate
include_files_info.

Relevant topic:
https://chat.zulip.org/#narrow/channel/19-documentation/topic/Stage.202.3A.20New.20syntax.20for.20imports
2025-06-20 16:18:16 -07:00
Niloth P
6a1d231689 integrations: Use directory name to get HTTP headers from fixtures.
Previously, the integration's name was directly being used.
Due to this, the GitHub Sponsors integration which is in the same module
as the GitHub integration could not be used with the
`generate-integration-docs-screenshot` script, as it would be unable to
locate the fixtures.
2025-06-09 15:59:39 -07:00
Anders Kaseorg
5a090c47ad requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-06 11:35:32 -07:00
Anders Kaseorg
b6f111cc0c test-documentation: Remove unneeded HTML validation exemptions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-06-04 16:52:08 -07:00
Niloth P
dac9e476f8 generate-integration-docs-screenshot: Add batch options.
Adds
- `--all-webhook` to batch process all webhook integrations,
- `--all-fixtureless` to batch process all fixtureless integrations.
2025-06-01 11:38:02 -07:00
Niloth P
866785784a generate-integration-docs-screenshot: Add fixtureless arguments.
Add a `fixtureless_group` of arguments to allow passing in the message,
topic and channel via the commandline.
By default, the script uses the screenshot config from
`integrations.py`.
2025-06-01 11:38:02 -07:00
Niloth P
287e1f8fac generate-integration-docs-screenshot: Support fixtureless integrations.
Example screenshots can now be generated for fixtureless integrations,
by sending mock messages using the topic and message text included in
the screenshot config added in the previous commit.
2025-06-01 11:38:02 -07:00
Niloth P
0b8e042627 integrations: Split the getters for fixture_path and image_path.
This is in preparation of adding support for generating screenshots of
fixtureless integrations, which would need to get image_path, without
involving fixture_path.
2025-06-01 11:38:02 -07:00