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.
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.
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>
* 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>
* 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>
* 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>
* 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>
* 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>