Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML-formatted Media Captions not supported by Element client #27927

Closed
RannerDesign opened this issue Aug 16, 2024 · 7 comments
Closed

HTML-formatted Media Captions not supported by Element client #27927

RannerDesign opened this issue Aug 16, 2024 · 7 comments
Labels
A-Media O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Defect

Comments

@RannerDesign
Copy link

Steps to reproduce

HTML-formatted Media Captions not supported by Element client

The Client-Server-API describes in chapter 10.2.2.7 how to set up captions for media
https://spec.matrix.org/unstable/client-server-api/#media-captions

Unfortunately the support for HTML-formatted captions could not be verified in the following tests.

The tests were performed in the following environments:

Element Desktop on Windows 10 pro 22H2 (Build 19045.4780)
Version von Element: 1.11.74
Krypto-Version: Rust SDK 0.7.1 (c8c9d15), Vodozemac 0.6.0

Element Web
Version von Element: 1.11.74
Krypto-Version: Rust SDK 0.7.1 (c8c9d15), Vodozemac 0.6.0
accessed with Chrome Version 127.0.6533.120 (Offizieller Build) (64-Bit)

Element IOS client
Element 1.11.16 (20240723142348)
Matrix SDK 0.27.11
Rust Crypto SDK 0.7.1 (Vodozemac 0.6.0)

The following server and user environment was used:

user_name:	Testuser1040
user_id:	@m1040a:matrix.org
room_name:	TH3
room_id:	!mNtkvlOYMJmlSPpMZt:matrix.org

The generation of events was performed with Python scripts using matrix-nio

Test 1: as recommended with filename != body

    "body": "Fotograf 7",
    "filename": "testbild7.jpg",
    "format": "org.matrix.custom.html",
    "formatted_body": "<p>myCaption - <strong>Fotograf 7: </strong>Bildtitel 7</p>",

Result for Desktop unexpected:

​ Fotograf 7 (22.71 KB)
​ with mouse-over thumbnail and title of large image

Result for Web unexpected:

<span class="mx_MImageBody_banner">Fotograf 7 (22.71 KB)</span>
<div class="mx_ImageView_title">Fotograf 7 (22.71 KB)</div>

Result for IOS unexpected:

​ No display of any caption

Test 2: with filename = body

    "body": "testbild1.jpg",
    "filename": "testbild1.jpg",
    "format": "org.matrix.custom.html",
    "formatted_body": "<p><strong>Fotograf 1:&nbsp;</strong>Bildtitel 1</p>",

Result for Desktop as expected:

​ testbild1.jpg (21.08 KB)
​ with mouse-over thumbnail and title of large image

Result for Web as expected:

<span class="mx_MImageBody_banner">testbild1.jpg (21.08 KB)</span>
<div class="mx_ImageView_title">testbild1.jpg (21.08 KB)</div>

Result for IOS unexpected:

​ No display of any caption

Test 3: without filename

    "body": "Fotograf 3",
    "format": "org.matrix.custom.html",
    "formatted_body": "<p><strong>Fotograf 3:&nbsp;</strong>Bildtitel 3</p>",

Result for Desktop as expected:

​ Fotograf 3 (22.14 KB)
​ with mouse-over thumbnail and title of large image

Result for Web as expected:

<span class="mx_MImageBody_banner">Fotograf 3 (22.14 KB)</span>
<div class="mx_ImageView_title">Fotograf 3 (22.14 KB)</div>

Result for IOS unexpected:

​ No display of any caption

Test4: with filename and empty body

    "body": "",
    "filename": "testbild6.jpg",
    "format": "org.matrix.custom.html",
    "formatted_body": "<strong>Fotograf 6: </strong>Bildtitel 6",

Result for Desktop suprisingly:

​ Bild (22.49 KB)
​ with mouse-over thumbnail and title of large image

Result for Web suprisingly:

<span class="mx_MImageBody_banner">Bild (22.49 KB)</span>
<div class="mx_ImageView_title">Bild (22.49 KB)</div>

Result for IOS unexpected:

​ No display of any caption

It could not be understood, that as caption there were 4 letters taken from inside the formatted_body

Outcome

What did you expect?

Display of caption like defined in formatted_body

What happened instead?

Display of caption taken from body with unexpected surprise, if body is empty
on IOS no caption is displayed at all

Operating system

Windows 10 pro 22H2 (Build 19045.4780)

Browser information

Chrome Version 127.0.6533.120

URL for webapp

https://app.element.io/#/room/!mNtkvlOYMJmlSPpMZt:matrix.org

Application version

Element: 1.11.74 Krypto-Version: Rust SDK 0.7.1 (c8c9d15), Vodozemac 0.6.0

Homeserver

matrix.org

Will you send logs?

No

@dosubot dosubot bot added A-Media O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience labels Aug 16, 2024
@dbkr dbkr added O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience labels Aug 16, 2024
@ajkessel
Copy link

I think this is resolved by element-hq/matrix-react-sdk#43 . But still no way to send captions from Element Web unless I'm missing something.

@t3chguy t3chguy closed this as completed Oct 30, 2024
@RannerDesign
Copy link
Author

Hi @t3chguy @ajkessel GREAT, thanks for that, works well for Element/Web and Element/Windows, also older events prepared in the test are now displayed correctly. Element/IOS (I assume also Element/Android) are not yet corrected.
Will that happen in the following rollout of this patch or do I need to open separate issues for these platforms?

@t3chguy
Copy link
Member

t3chguy commented Oct 31, 2024

@RannerDesign this repo is unrelated to any other platforms or projects, so an issue here does not affect iOS or Android.

@ajkessel
Copy link

For the record, I filed #28337 to request support for sending with captions as I did not see an existing issue on it. @t3chguy is that feature on your roadmap?

@t3chguy
Copy link
Member

t3chguy commented Oct 31, 2024

@ajkessel I doubt the product team has even seen an issue from yesterday never mind chose to include it in their quarterly roadmaps which are planned a quarter-3 in advance

@ajkessel
Copy link

@ajkessel I doubt the product team has even seen an issue from yesterday never mind chose to include it in their quarterly roadmaps which are planned a quarter-3 in advance

Sorry! I didn't mean to imply that my own new issue would be the trigger. The issue itself has been around for at least four years, and since the ability to render captions recently got some attention, I was wondering if anyone had thought at the same time about the ability to send captions in Element. Other clients support it but none that have thread support as of yet.

@t3chguy
Copy link
Member

t3chguy commented Oct 31, 2024

That roadmap repository hasn't been touched in 2 years, not sure where they keep track of the roadmap nowadays. The ability to render captions was a community contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Media O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Defect
Projects
None yet
Development

No branches or pull requests

4 participants