element-hq / element-hq/element-meta
Simplified rendering of content types and formatting in root messages and thread summaries
- Dominant language
- No language data
- Stars
- 112
- Forks
- 25
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 4
Description
**Purpose and constraints**
The purpose of this issue is to document how the preferred rendering for content and styles should be in root messages (only in the thread list) and thread summaries (both in the main timeline and thread list) for the Threads MVP.
We're trying to set a baseline for every client, on which we'll improve later on. While some of these in their current form are far from ideal (e.g., spoilers being spoiled), we can't address all the current issues within the scope of Threads MVP.
For this first iteration we have taken the current implementation for Web as the reference implementation.
The next step, after the Threads MVP, will be figuring out how to improve the spec, and make it more usable, which includes revisiting how we render the different content types and formatting styles in the context of threads (root messages, thread summaries).
**Platform issues**
- https://github.com/vector-im/element-web/issues/20870
- https://github.com/vector-im/element-web/issues/20869
- https://github.com/vector-im/element-android/issues/5139
- https://github.com/vector-im/element-ios/issues/5488
**Legend**
- โ
Rendered as expected for the Threads MVP.
- โ Fails to render as expected for the Threads MVP.
- ๐ Deviation from the expected rendering but we don't plan to change this for the Threads MVP.
- ๐ฎ The test case couldn't be performed.
| Case | Web | Android | iOS |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| **Mentions**: render as plain text (e.g. `@Name` is rendered as `Name`) | โ
| โ
| โ
|
| **URLs**: render as plain text (e.g. `https://element.io` gets rendered as non-clickable plain text `https://element.io`) | โ
| โ
| โ
|
| **Text links**: render as plain text (e.g. `[Element](https://element.io) ` gets rendered as non-clickable plain text `Element`) | โ
| โ
| โ
|
| **Link previews**: do not render | โ
| โ
| โ
|
| **Markdown**: strip tags, linearize (render it as a single line, without new lines), and render it as plain text (e.g. `## Heading` is rendered as `Heading`) | โ
| โ
| โ root message (renders Markdown) |
| **Horizontal ruler**: render as plain text (e.g. a message containing only this sequence of characters `---` is rendered as `---`) | โ root message (blank)
โ thread summary (blank) | โ root message (blank)
โ thread summary (blank) | โ root message (blank)
โ thread summary (blank)
โ main timeline (not rendered) |
| **HTML**: strip tags, linearize (render it as a single line, without new lines), and render it as plain text (e.g. `
Heading
` is rendered as `Heading`) | โ | ๐ preamature text truncation | โ root message (renders HTML) || **Inline formatting (bold, italics, strikethrough)**: rendered as undecorated plain text (e.g. `**bold**` is rendered as `bold`) | โ | โ | โ root message (renders formatting) |
| **Code blocks**: linearize (don't render new lines) and render it as undecorated plain text without backticks (e.g. multiline text that is wrapped with `backticks`) | โ | โ root message (empty first line, and ellipsis in second line)
๐ preamature text truncation | โ root message (renders formatted blocks)
โ thread summary (plain text but renders new lines) |
| **Inline code snippets**: render as plain text without backticks (e.g. ` timeline { display: none; }` is rendered as non-monospaced plain text, without backticks) | โ | โ | โ root message (renders formatting) |
| **Quoted text**: render as plain text (e.g. `> quoted text` is rendered as `quoted text`) | โ | ๐ preamature text truncation | โ root message (indented)
โ thread summary (renders new line after quote) |
| **"(edited)" flag**: do not render | โ | โ | โ root message (it shows the `(edited)` label)
โ thread summary (it shows the `(edited)` label) |
| **Images**: render the filename as plain text | โ | ๐ root message `Image.`
๐ thread summary `Image.` | โ |
| **GIFs**: render the filename as plain text | โ | ๐ root message `Image.`
๐ thread summary `Image.` | โ |
| **Sticker**: render the image alt text as plain text | โ | ๐ root message `Sticker`
๐ thread summary `Sticker` | โ |
| **Video**: render the video filename as plain text | โ | ๐ root message `Video.`
๐ thread summary `Video.` | โ |
| **File**: render the filename as plaint text | โ | ๐ root message `File`
๐ thread summary `File` | โ |
| **Message highlight for mentions**: do not decorate/highlight the message | โ | โ | โ |
| **Reply chain**: do not render | โ | โ root message(`In reply to @name:example.com` rendered as plain text)
โ thread summary (`In reply to @name:example.com` rendered as plain text) | โ |
| **Big emoji**: render it as a regular size emoji | โ | โ | โ |
| **Voice message**: render it as plain text label that reads `Voice message` | โ thread summary (`Voice message.ogg` ) | โ root message (`Voice`)
โ thread summary (`Voice`) | โ thread summary (`Voice message.ogg` ) |
| **Polls**: render the poll title as plain text | ๐ฎ thread summary (not supported in threads yet) | ๐ root message `Poll`
๐ฎ thread summary (not supported in threads yet) | ๐ฎ thread summary (not supported in threads yet) |
| **Locations**: location rendered as plain text (e.g. `User Location geo:23.3371955,-2.7875839;u=30 at 2022-01-14T08:13:31.314Z`, actual text depends on the platform that created the event, on iOS starts with `Location was shared at geo:`) | โ | ๐ root message `Shared their location`
๐ thread summary `Shared their location` | โ |
| **Emote**: render as plain text without the `* Name` part | โ root message (shows `* name` part)
โ thread summary (shows `* name` part) | โ | โ root message (shows `* name` part)
โ thread summary (shows `* name` part) |
| **Rainbow emote**: rendered as plain text without color and the `* Name` part | โ (same issues as in regular emotes) | โ thread summary in thread list (shows `/rainbowme` command if emote content is edited) | โ (same issues as in regular emotes) |
| **Spoilers**: rendered as plain text | โ | โ root message (rendered as block chars)
โ thread summary (rendered as block chars) | โ |
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.