Commit Graph

11 Commits

Author SHA1 Message Date
Lauryn Menard
63c087dc84 help: Update links and examples to use zulip-flutter repo.
The one remaining link is for the instructions to download the
legacy app APK file for Android.

Part of #35643.
2025-08-08 13:06:31 -07:00
Alya Abbott
631db46f92 help: Consistently document linkifier and profile field actions. 2025-08-08 07:19:57 -07:00
Shubham Padia
7ce87c66ac help: Make loose lists tight for help center files.
In our current implementation, loose lists and tight lists look the same
visually. Loose lists are lists with blank lines between list items, and
the contents of a list item should be enclosed in a paragraph tag in
that case. For unordered lists, paragraph tags have a bottom margin in
starlight and thus looses lists look much more spaced out than tight
lists.

That is not the behaviour we had in mind while writing the
documentation, the reason we had all these loose lists is to make the
documentation easy to write and read. So we attempt to remove all the
blank lines and fix the problem at source. Since paragraph tags are used
for other purposes in a list in starlight, it won't be a wise decision
to let the source be as is and just change things in css, other expected
behaviours might break in that case. See this topic for more details:
https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20regressions/near/2226084

All the changes were made by a one-off script which has not been
commited to the repo. The script wasn't perfect and could not decide
between blank lines that make a list loose vs blank lines necessary for
a sub-list or a code block inside a list item. A manual review of all
the changes was done before making this commit to ensure that no
unintended changes were made to the help center files.
2025-07-22 14:36:25 -07:00
Lauryn Menard
3bfa4afff9 help: Update docs for message header bar button changes.
These icons were updated in #34777.
2025-07-14 10:41:17 -07:00
Shubham Padia
35e4cf6bf6 help: Ordered list item should always be followed by an indented line.
Our help-beta conversion script expects text to be indented if the text
is part of the same list item. If it is not part of the same list item,
then it expects an empty line just after the list item. This commit
fixes existing instances for the same by searching for regex: `^1\.
.*\n(?!\n)(?!1\.)( {0,1}\S.*)`.

We do not want to add a lint rule for this, since not indenting is not
technically wrong. We will add a TODO list item in the conversion script
for help-beta in future commits.
2025-06-23 09:48:43 -07:00
Alya Abbott
6b92e71453 help: Tweak wording in help/add-a-custom-linkifier. 2023-09-27 11:32:32 -07:00
Zixuan James Li
5301060954 linkifiers: Support dragging and reordering linkifiers.
This also removes sorting on the pattern and the URL template, because
it does not make sense anymore as we make linkifiers draggable.

Fixes #23716
2023-08-14 15:21:48 -07:00
Tim Abbott
7ae7b753da help: Improve /help/add-a-custom-linkifier page.
- Structure page around linkifier use cases.
- Add documentation (with examples) for advanced lnkifier types.
- Put examples in to tabs blocks.
2023-04-27 15:39:54 -07:00
Zixuan James Li
268f858f39 linkifier: Support URL templates for linkifiers.
This swaps out url_format_string from all of our APIs and replaces it
with url_template. Note that the documentation changes in the following
commits  will be squashed with this commit.

We change the "url_format" key to "url_template" for the
realm_linkifiers events in event_schema, along with updating
LinkifierDict. "url_template" is the name chosen to normalize
mixed usages of "url_format_string" and "url_format" throughout
the backend.

The markdown processor is updated to stop handling the format string
interpolation and delegate the task template expansion to the uri_template
library instead.

This change affects many test cases. We mostly just replace "%(name)s"
with "{name}", "url_format_string" with "url_template" to make sure that
they still pass. There are some test cases dedicated for testing "%"
escaping, which aren't relevant anymore and are subject to removal.
But for now we keep most of them as-is, and make sure that "%" is always
escaped since we do not use it for variable substitution any more.

Since url_format_string is not populated anymore, a migration is created
to remove this field entirely, and make url_template non-nullable since
we will always populate it. Note that it is possible to have
url_template being null after migration 0422 and before 0424, but
in practice, url_template will not be None after backfilling and the
backend now is always setting url_template.

With the removal of url_format_string, RealmFilter model will now be cleaned
with URL template checks, and the old checks for escapes are removed.

We also modified RealmFilter.clean to skip the validation when the
url_template is invalid. This avoids raising mulitple ValidationError's
when calling full_clean on a linkifier. But we might eventually want to
have a more centric approach to data validation instead of having
the same validation in both the clean method and the validator.

Fixes #23124.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-04-19 12:20:49 -07:00
David Rosa
140e62d024 help: Add open link icon in "Add a custom linkifier". 2023-03-03 14:19:20 -08:00
Lauryn Menard
dedea23745 help-docs: Move help center documentation to top level directory.
These files are not Jinja2 templates, so there's no reason that they needed
to be inside `templates/zerver`. Moving them to the top level reflects their
importance and also makes it feel nicer to work on editing the help center content, 
without it being unnecessary buried deep in the codebase.
2023-01-25 14:08:29 -08:00