Commit Graph

25 Commits

Author SHA1 Message Date
Karl Stolley
90054890f3 api_docs: Add section on transcoded images. 2025-10-14 15:37:17 -07:00
Karl Stolley
19e5c8b8c9 api_docs: Clean up intro text on image placeholders. 2025-10-14 15:35:27 -07:00
Karl Stolley
35aac76176 api_docs: Reference example images as example.png. 2025-10-14 15:35:27 -07:00
Karl Stolley
85e6cec1db api_docs: Better structure Image previews section. 2025-10-14 15:35:27 -07:00
Tim Abbott
c584478c76 api_docs: Fix malformed feature level typo. 2025-07-11 14:55:00 -07:00
Rohan Gudimetla
26abfc4d91 markdown: Render inline audio files using the ![title](url) syntax.
Previouly, there was no option to play the inline audio files
within the web app without downloading or leaving the browser.

This commit adds option to render inline audio files that use
the syntax `![title](url)`.

Fixes #27007
2025-07-11 13:11:56 -07:00
Rohan Gudimetla
8e0ba8cccf topics: Server generated permalinks now prefer latest message id.
Previously, when a topic is mentioned, the server generated a
permalink using the earliest accessible message of the topic.

This commit updates it to rather use the latest message of the
topic.
2025-07-03 11:06:39 -07:00
Shubham Padia
bace83ec5a markdown: Change URL structure for dropbox preview to be up-to-date.
The URL structure for a shared link has changed since this function was
returned and this commit makes sure our code is in compliance with that
structure.

The concept of an album doesn't exist anymore and folders exist in-lieu
of that.

For dropbox links that are folders on non-image files, we show previews
same as any other link previews. It is not possible to get information
about the shared link except whether it is a file or folder. So for
title and description for that linked preview, we use `Dropbox file` or
`Dropbox folder` respectively.

Earlier, we were just having raw=1 as the query param to get the image
file if required, but now for every dropbox sharing link, preserving
query params is important (otherwise we get a 404), this commit makes
changes to address that.

For /sc/ links, it is not possible to generate them anymore (afaik), but
it is possible to view those existing links, so we support that link but
treat it as a folder instead.

You can check
https://www.dropboxforum.com/discussions/101001012/shared-link--scl-to-s/689070/replies/695266
for URL structure info.

We have used inline ignore for codespell since fo can be a valid
misspell of `of` and we don't want to ignore that.

https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.93.82.20message_inline_ref.20dropbox.20links

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-06-24 13:48:01 -07:00
Rohan Gudimetla
acb12fa953 message-formatting: Document previews generated on uploading video.
This commit documents the HTML syntax generated for the previews when
a message is sent linking to an uploaded video.
2025-05-16 13:49:09 -07:00
Vector73
fba724fbb5 api_docs: Fix feature levels. 2025-05-12 16:00:29 -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
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
Prakhar Pratyush
3b279d38a0 api_docs: Improve topic-permalink docs in /api/message-formatting.
This commit updates the wording related to topic-permalink in
`/api/message-formatting` to clarify that the condition applies
when a topic has no messages, not when the topic name is empty.

Also, it reorders examples so that similar input formats are
grouped together, improving readability.
2025-02-05 05:56:46 -08:00
roanster007
410ae119d4 markdown: Convert topic links generated by "#-mentions" to permalinks.
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Fixes part of #21505
2025-02-03 18:48:24 -08:00
Prakhar Pratyush
0788942a68 message_link: Add support for empty string topic in syntax.
This commit adds support for empty string as a valid topic name
in syntax for linking to channel messages.

The server stores it after empty string is replaced with
`realm_empty_topic_display_name` and wrapped with an <em> tag.

The web client parses the rendered_content and updates
the topic_name part in the HTML with topic_name in user's language
+ wraps it in a <span> tag with 'empty-topic-display' css class.
2025-01-31 14:23:15 -08:00
Alex Vandiver
230bae17bb thumbnail: Generate a transcoded high-res version of HEIC/TIFF images.
If the content-type of the image is not in INLINE_MIME_TYPES, then we
do not expect browsers to be able to display it.  This behaviour is
particularly confusing because the thumbnail will render properly,
since that will be in the more widely-supported WebP format, but the
lightbox will show a broken image.

In these cases, generate a high-resolution (4032x3024) "thumbnail"
which clients can choose to use instead.  This thumbnail format is not
in the listed in the server's advertised thumbnail size list, because
it is not reliably generated for every image.

The transcoded thumbnail format is set on the `img` tag if it is
generated, and the original content-type is always passed to the
client, so it can decide how or if to render the original image.  This
content-type is as the _original uploader_ specified it, so may be
incorrect.

The transcoded image is not animated, even if the original was.  HEIC
files can nominally be animated, but in testing libvips was not able
to correctly recognize them as such.  TIFF files are parsed as being
"animated," with one page per frame; this is of dubious utility, so
we merely transcode the first page.  Always generating a static
transcoded image serves to also limit the computational time spent.

THUMBNAIL_OUTPUT_FORMATS is switched to be a tuple to ensure that it
is not accidentally mutated.
2025-01-09 09:10:28 -08:00
Tim Abbott
3aa2671679 api docs: Document mentions more completely. 2025-01-07 12:14:01 -08:00
Tim Abbott
77064a1726 api_docs: Document new message-link Markdown syntax. 2024-11-05 09:42:33 -08:00
Alex Vandiver
8bacdbc895 thumbnail: Put the original dimensions on spinner images.
This lets us reserve the right amount of space in the message feed
immediately.
2024-09-09 15:59:02 -07:00
Lauryn Menard
481fb8e518 help: Rename and redirect allow-image-link-previews article.
Note that the link in zulip_update_announcements.py is not updated
so that the content in the source code reflects what users actually
received in the update announcement message.
2024-08-12 11:22:37 -07:00
Alex Vandiver
e4a8304f57 thumbnail: Store the post-orientation-transformation dimensions.
Modern browsers respect the EXIF orientation information of images,
applying rotation and/or mirroring as specified in those tags.  The
the `width="..."` and `height="..."` tags are to size the image
_after_ applying those orientation transformations.

The `.width` and `.height` properties of libvips' images are _before_
any transformations are applied.  Since we intend to use these to hint
to rendering clients the size that the image should be _rendered at_,
change to storing (and providing to clients) the dimensions of the
rendered image, not the stored bytes.
2024-07-24 09:56:42 -07:00
Tim Abbott
391045ada0 thumbnail: Document thumbnailing API. 2024-07-22 22:41:10 -04:00
Lauryn Menard
388c6b2412 api-docs: Update descriptive uses of "stream" for channel rename.
Updates `.md` files in api_docs/ to use "stream" instead of "channel"
for descriptive text, with the exception of the API changelog file.

Part of stream to channel rename project.
2024-05-20 09:31:56 -07:00
Lauryn Menard
e700e818e5 mentions: Add "channel" as a wildcard mention.
Adds "channel" to the `stream_wildcards` frozenset for stream
wildcard notifications on the backend/server.

Updates frontend/web-app to handle "channel" as the other stream
wildcards are handled in the typeahead and composebox modules.

Updates the API version and documentation for the addition of
"channel" as a wildcard mention. But does not change any of the
functionailty of (or deprecate) the "stream" wildcard at this
point.

Part of project to rename "stream" to "channel".
2024-04-04 11:16:07 -07:00
Lauryn Menard
88fd9d947b api-docs: Add article about markup message formatting.
Adds a "Message formatting" article to the API documentation. To
start, the article is a changelog of updates to markup features for
messages, with the idea being that it can be expanded to further
describe and document Zulip's markup features in future iterations.
2024-04-04 11:16:07 -07:00