Commit Graph

6 Commits

Author SHA1 Message Date
Jorge Martín c7af5b2209 Remove the hardcoded text style in TextBlock
This should fix the text size (again) in the new timeline renderer.

Looks like this happened when a cherry-pick operation went wrong.
2026-09-30 09:14:27 +02:00
Jorge Martin Espinosa 4bf2a094c7 Fix some issues in the new timeline renderer (#7751)
* Don't show fading edge if the code block can't scroll. Use `canScrollForward || canScrollBackwards` for displaying the fading edges in the code blocks

* Don't add extra vertical padding to the mention pills. This should make them look like they did in the previous renderer

* Allow passing through touch events in `Modifier.linkTapHandler` if no url annotation is clicked or long clicked

`detectTapGestures` always consumes the touch events, no matter if they are handled or not, blocking these events from reaching parent components. Should fix the issue of `ParagraphView` blocking the long press action in the message bubbles

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-09-26 13:02:56 +02:00
Jorge Martin Espinosa b6cf293e2a Add headers (h1-h6) tag support for the new timeline renderer (#7754)
* Add headers (`h1-h6`) tag support for the new timeline renderer

* Make H1 and H2 use the same (smaller) style

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-09-23 12:35:05 +00:00
Jorge Martin Espinosa 51fe66cd88 Add linkification to the new timeline renderer (#7731)
* Add linkification to the new timeline renderer

Reuse `AnnotatedString.linkify` for now, even though it creates `Spannable` instances for that: it's the closest one to what we already had.

Also, make sure we use the same URL annotation identifier in the renderer and the linkificator.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-09-22 15:29:20 +02:00
Jorge Martin Espinosa 4e47c6170e Integrate the new timeline renderer behind a feature flag (#7722)
* Integrate the new renderer with the timeline UI

* Composable functions are now in `:libraries:htmlrenderer:api` so we don't need to add `impl` to other modules.

* Improve inline code span

* Return both the text and URL in `onLinkClick` and `onLinkLongClick` so we can check the URL is not misleading

* Remove `SelectionContainer` for now - it creates issues when long pressing

* Make `LocalComposeTimelineEventRenderer` contain a `ComposeLocalTimelineEventRendererData` instance. This checks if the new rendering is enabled and what is the current user id so it can be used for styling mention pills

* Add fading edges to code block to indicate scrolling is possible

* Long pressing in a code block copies its contents to the clipboard

* Fix alignment of ordered list item prefixes

* Don't use default values in State data classes

---------

Co-authored-by: ElementBot <android@element.io>
2026-09-22 10:26:35 +02:00
Jorge Martin Espinosa c0bb68c872 New timeline event renderer: add new modules (#7721)
* Added HTML parser to abstract tree nodes

* Add HTML renderer using `HtmlMessageContent`

* Add custom rendering for inline code nodes besides the monospace font

* Support `<s>` and `<strike>` too

* Add `ContentAvoidingLayoutData` support

* Improve the last block node behaviour and its integration with `ContentAvoidingLayout`

* Move `ContentAvoidingLayout` to `:libraries:ui-common` so it can be shared

* Add missing `:libraries:htmlrenderer:impl` entry in `DependencyHandlerScope.allLibrariesImpl`

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-09-17 19:08:32 +02:00