element-hq / element-hq/element-x-android

Captioned images can't contain mentions or rich-text

Open
#4,124 0 comments 1 reaction 0 assignees View on GitHub
T-Enhancement
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

### Your use case

#### What would you like to do?
Have the full composer functionality when sending an image caption, for parity with sending a regular text message. This includes both the rich-text editor view as well as user/room mentions.

Amusingly, since https://github.com/matrix-org/matrix-rust-sdk/commit/8205da898e11c34b77b13fe4794d0b2e1bcdd2a8 and some very minor code edits in EXA, this can already be done when _editing_ a caption; just not when sending it to begin with.

#### Why would you like to do it?
Mainly for functionality parity, but also because it's a pretty common thing to want to do

#### How would you like to achieve it?
Add a button to the AttachmentPreviewView to enable the rich-text composer and also implement the mention insert view too. There's a huge amount of crossover with the composer in the regular timeline screen, so ideally much of that logic would be deduplicated and reused.

https://github.com/matrix-org/matrix-rust-sdk/pull/4475 should be all that's required on the SDK side. Most of what is missing is UI functionality in EXA.

### Have you considered any alternatives?

Sending two separate messages?

### Additional context

_No response_

### Are you willing to provide a PR?

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.