Link previews #41

Closed
opened 2026-10-22 00:01:36 +00:00 by bmt · 1 comment
Member

A link in a message is shown as plain text, without a preview

request:

  1. show a preview card under a link with its title, description, site name and picture
  2. a setting to turn previews on or off
A link in a message is shown as plain text, without a preview request: 1. show a preview card under a link with its title, description, site name and picture 2. a setting to turn previews on or off
ann referenced this issue from a commit 2026-10-27 06:45:09 +00:00
Link previews, optional (Fixes #41; the user, 2026-10-27: "fix the #41 while making it optional"): a message's XEP-0511 previews (Message.link_metadata, libtacky 1.1.6) are drawn as a card under its words inside the bubble (views/rows/link-card.ts, aim-link-card): the site's name (the host when none), the title and the description two lines each, and the thumbnail, the whole card one link marked data-ask so a tap asks before it leaves the app, as a body's address does. Only what the sender attached is drawn and nothing is fetched to draw it: the picture only as a data: PNG, JPEG, GIF or WebP of 64 KiB at most, the texts cut and cleaned of controls and bidi overrides, a preview whose address is not in the body or is not http(s) left out, three at most, none on a retracted, sticker or card row; logical properties and dir=auto keep it right in RTL, the thumbnail 44 px under 400 px. The setting is libtacky's installation key link_previews (state/preferences.ts LINK_PREVIEWS, linkPreviewMode): never (no card drawn, none sent), sender, the default (received previews shown, ours carry none) or always (a link we send gets one too), a list in Settings, Privacy and security, beside typing and last active, "Link previews" with Never, Show received and Send and show and the line "Send and show: the site sees your address when you send a link. Received previews are never fetched."; the page's subtitle names link previews. The chat view and the thread pane follow the key and hand the rows noLinkPreviews at never. The composer's chip is the next commit's. The mock answers linkmeta preview from three invented pages under always (mock/link-previews.ts, thumbnails drawn as 64 px PNGs), attaches one on a send under always or what a send hands it, and the showcase world has two rows with previews (Lena's trail link, the book club's book). ui/src/protocol/generated/api.ts is generated from libtacky 1.1.6 (the next commit pins it); model.ts types Message.link_metadata. en.json and the catalogues follow; CHANGELOG's Unreleased says it. Tests: link-previews.test.ts, 13 cases (the card's parts, link and data-ask; the host for no site; none at Never, retracted or without previews; a remote picture not drawn and no fetch; only the body's http(s) addresses, once, three at most; text cleaning; the picture's forms and size; the default and unknown values; the Privacy row's three choices, its line and the write; the mock's preview and send under always and sender), preferences-views (the Privacy subtitle). make check STRICT=1 clean; make test-ui 363 files, 3919 passed, 8 skipped; make test-shell ok; WebKitGTK shots of the chat, the room and the settings at 1200 and 360 px, Day and Night, and the chat at Never, in /data/another-im/screens-2026-10-27/link-previews/.
ann closed this issue 2026-10-27 06:45:09 +00:00
Owner

Fixed in 0.7.6; reopen if you still see it.

Fixed in 0.7.6; reopen if you still see it.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
another-im/anotherim-js#41
No description provided.