1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00

10 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
041d2474e6 Add pillification to the new timeline renderer (#7761)
* Add pillification to AnnotatedStrings too. Improve the regex matching too in `MatrixPatterns`

* Add a click action to mention pills
2026-10-21 17:12:14 +02:00
Jorge Martin Espinosa
241f8e67bd Fix side-effects when tapping on a link in the new renderer (#7906)
The case where we move the pointer once we've started the click on a link wasn't taken into account, so the click or long click gestures weren't canceled if the gesture ended up being a 'move' one.

Simplify the handler and make it more idiomatic too.
2026-10-14 11:13:59 +02:00
Jorge Martin Espinosa
a9d7e7e5ab Fix multi-line split inline code background drawing (#7875)
In the new timeline renderer, the line end position is sometimes incorrectly returned when you pass the offset of the last character in the line, returning `0.0f`.

This caused the shape to draw for the line to be reversed, where the start was `0.0f` and the end was the actual start.

When we detect a `0.0f` returned value for this,  just get the coordinates for the end of the line instead.
2026-10-07 15:10:19 +02:00
Benoit Marty
954eb731e7 Remove unused Gradle dependencies
Remove dependencies flagged as unused by the Dependency Analysis Gradle Plugin
(`./gradlew buildHealth`) and explicitly declared in module build files.

Removals were skipped when the dependency provides transitively something the
module (or a consumer of an `api` dependency) uses directly, as well as for
runtime-only dependencies (element-call-embedded, sentry-android,
rustls-platform-verifier). Dependencies added by the convention plugin helpers
(composeDependencies, testCommonDependencies) are left untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 15:47:48 +02:00
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