Commit Graph

2371 Commits

Author SHA1 Message Date
Jorge Martin Espinosa f9112cc583 Collapse runs of deleted messages in the timeline (#7195)
* Collapse runs of deleted messages in the timeline (#7111)

* Collapse runs of deleted messages in the timeline

Collapse a run of three or more consecutive deleted messages into a single
expandable group, reusing the existing state-change grouping (the same way
element-web does it) instead of showing one "Message removed" placeholder per
deletion. The header shows the count only ("N deleted messages"); the Rust SDK
does not expose who performed the redaction, so we don't attribute it.

On by default. Runs shorter than three are left as individual placeholders, and
day dividers and read receipts are preserved (a run is broken by any
non-redacted item, so a day is never emptied).

Run the collapse as the final step of TimelineItemGrouper.group() instead of
a separate pass in the presenter, as suggested in review. Kept as its own
finalization step rather than via canBeGrouped() so the group stays all
redacted and the count-only header is preserved.
The group id is resolved through the grouper's existing id registry, like the
other groups, so it stays stable however the run grows and the user's
expand/collapse state is kept across timeline updates.

* Replace temporary strings with final ones

* Update screenshots

---------

Co-authored-by: Hi Dude! <klarkmonty@tuta.io>
Co-authored-by: manfrommedan <manfrommedan@users.noreply.github.com>
Co-authored-by: ElementBot <android@element.io>
2026-07-13 15:57:55 +02:00
ElementBot 03304b3ece Sync Strings (#7192)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: jmartinesp <480955+jmartinesp@users.noreply.github.com>
2026-07-13 12:21:55 +02:00
Benoit Marty d7a2366a60 Merge pull request #7090 from manfrommedan/fix/keep-edit-when-attaching-media
Fix the message edit being lost when attaching media
2026-07-08 17:39:58 +02:00
manfrommedan 55f3a1acfb Keep the in-progress edit when attaching media
Picking an attachment reset the composer to Normal, which dropped an
in-progress edit: the attachment went out as a new message and the
leftover edit text then created another one instead of editing the
original.

Route every attach path through a single resetComposerModeAfterAttaching()
helper that clears Reply/Normal but keeps an edit pending, so the typed
text still edits the original on the next send. This also covers the
multi-item gallery picker added in #6519, which reset the mode
unconditionally.

Reply is still cleared (the attachment becomes the reply).

Fixes #7083.
2026-07-08 15:32:01 +03:00
Benoit Marty a5d8b6eb2a Merge branch 'develop' into feat/skin-tone-picker 2026-07-07 15:21:27 +02:00
Benoit Marty 243acf1ee0 Add more screenshots 2026-07-07 15:19:18 +02:00
Benoit Marty 3ec7aa2a55 Remove default parameter values and make them not nullable. 2026-07-07 14:34:14 +02:00
Benoit Marty 387022a9af Use color from theme and improve preview of EmojiItem 2026-07-07 14:24:52 +02:00
Benoit Marty 9672950512 Merge pull request #7138 from element-hq/fix/a11y-reading-order
Fix timeline reading order distorted when TalkBack is active
2026-07-07 09:42:00 +02:00
Benoit Marty 1ddb32645c Merge pull request #7007 from element-hq/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.5.0-alpha21
2026-07-06 18:31:45 +02:00
Benoit Marty 5c7bac58ce Merge branch 'develop' into feature/bma/scroll-to-unread-messages 2026-07-06 13:36:28 +02:00
Benoit Marty e346f68fc8 Merge pull request #7044 from bxdxnn/fix/thread-list-avatar
Fix wrong avatar shown in the thread list's top bar
2026-07-06 11:34:14 +02:00
Benoit Marty e3a2e98068 Fix compilation issue 2026-07-06 10:50:17 +02:00
Benoit Marty ac1be8c87a Merge branch 'develop' into feature/bma/scroll-to-unread-messages 2026-07-03 14:30:14 +02:00
Benoit Marty 8840e2f96b Merge pull request #7112 from element-hq/feature/bma/galleryMessages
Support gallery messages
2026-07-03 14:09:20 +02:00
Benoit Marty b6f79a883e Improve accessibility text on RR 2026-07-03 12:36:50 +02:00
Benoit Marty 762823ebd7 SampleMediaRenderer can be internal. 2026-07-03 09:52:12 +02:00
Benoit Marty 4566712ad3 Take user choice into consideration when pre-processing the media. 2026-07-03 09:49:06 +02:00
Benoit Marty 60837c0d7d Hide floating badge date from accessibility 2026-07-03 09:24:42 +02:00
Benoit Marty 2010620fbc Merge branch 'develop' into fix/a11y-reading-order 2026-07-02 16:13:55 +02:00
Benoit Marty 6181f60b5e Fix compilation issue 2026-07-02 16:12:54 +02:00
Benoit Marty 57ed76bd03 A11Y: Do not read the +x Text. 2026-07-02 12:26:49 +02:00
Benoit Marty 54d452c364 Fix accessibility: remove TalkBack reverseLayout workaround (#6392)
The LazyColumn was using reverseLayout=false when TalkBack was active to work
around a Compose accessibility traversal bug. This placed new messages at the
top of the screen, distorting the reading order for TalkBack users.

With Compose BOM 2026.06.00, reverseLayout=true now works correctly with
TalkBack traversal, so remove both workarounds:
- Always use reverseLayout=true in TimelineView
- Remove the .reversed() for expanded groups in TimelineItemGroupedEventsRow

Note: this change should be manually tested with TalkBack to verify correct
traversal order (oldest messages first, newest last).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:55:36 +02:00
Benoit Marty 79f1423a30 Fix accessibility: message composer label and 'Seen by' button (#6390, #6393)
- MarkdownTextInput: set contentDescription on MarkdownEditText so TalkBack
  announces a persistent label even when the field has content (fixes #6390)
- TimelineItemReadReceiptView: remove hideFromAccessibility() so the 'Seen by'
  button is exposed to TalkBack; use semantics (not clearAndSetSemantics) to
  preserve click action, and add Role.Button (fixes #6393)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:49:32 +02:00
Benoit Marty 6cce74db88 [Gallery] Set media optimation user choice per media 2026-07-01 09:45:08 +02:00
Benoit Marty 29743d3c89 Some renaming for clarity. 2026-06-30 12:16:04 +02:00
Benoit Marty 89b4722a58 Restore previous code. 2026-06-30 12:06:34 +02:00
Benoit Marty 99343926ff Extract SingleItemPreviewRenderer, make it a class and rename it to SampleMediaRenderer 2026-06-30 12:00:12 +02:00
Benoit Marty 96e1c93f38 Introduce derived state editedAttachments 2026-06-30 11:50:58 +02:00
Benoit Marty f91fd4b535 Rename method to sendMedia 2026-06-30 11:35:20 +02:00
Jorge Martin Espinosa 6068aeaf01 Detect RTL text in events and adjust the text rendering (#6994)
* Add `TextDirection.detect` to check the overall LTR or RTL direction of texts

* Calculate if the contents of events have a different direction than the layout to reverse the layout direction if needed.

LTR content, RTL text -> mismatched direction, reverse.
RTL content, LTR text -> also mismatched, reversed too.

* Measure text in `measureLastTextLine` based on its direction, not the layout's,
to avoid some issues with incorrectly calculated free space.

* Tweak the paddings in `TimelineEventTimestampView` a bit if the layout and text directions don't match

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-06-29 15:11:49 +02:00
ElementBot 46460e1c27 Sync Strings (#7115)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-29 14:09:36 +02:00
Benoit Marty c80eb12e2f Remove duplicated fixtures. 2026-06-29 11:36:20 +02:00
Benoit Marty 73ef038035 Preview: add video item in the list 2026-06-29 11:31:21 +02:00
Benoit Marty ad84122285 Revert change on TimelineItemVideoView, it was dead code. 2026-06-29 11:21:02 +02:00
Benoit Marty b2a7c6548a Add missing test on TimelineItemContentMessageFactory 2026-06-29 10:01:21 +02:00
Benoit Marty 95e656cc32 Fix regression on tests. 2026-06-29 09:11:51 +02:00
Benoit Marty b62242cdd2 Fix sharing gallery from pinned event timeline. 2026-06-26 17:36:27 +02:00
Benoit Marty a7e6d8af6e Better fix to render all items in the gallery. Should be able to render mixed items. 2026-06-26 16:24:57 +02:00
bxdxnn 87aff40b26 Support gallery messages (#6519)
* Support gallery messages

* Address review

* Remove unused function

* Fix indent

* Add "Gallery" message prefix

* Support galleries for image editing

* Fix tapping on a tile opens the last item

* Fix overflow count

* Add caption editing to gallery messages

* Use the new gallery string for prefix

* Lock sending galleries behind a feature flag

* Fix detekts

* Fix

* Ensure image edition is saved when navigating

* Fix sending media broken on edited gallery.

* Fix tests

* Order imports

* Remove unused parameters.

* Fix copyright header of new files.

* Fix Konsist test

* Extract new previews to a dedicated file.

* Sync strings

* Remove unused import

* Update screenshots

* Trigger CI

* Remove parameters with default value.

* More cleanup

* Restore sendAsFile behavior.

* Improve Preview.

* Improve Preview.

* Improve Preview.

* Fix gallery sending cancel and retry issue

* Ensure any previous job is cancelled.

* Fix issue in summary message

* Gallery feature is disabled by default.

* Kotlin convention

* Remove useless parenthesis

* Update screenshots

* Fix test

* List -> ImmutableList

* Remove useless code.

* Render formatted caption for attachment list.

* Replace set of Booleans by an enum

* Remove unused model for individual caption in a gallery Event.

* Fix tests

* Fix tests

* Rework MediaViewer entry point.

And ensure that the clicked image from the gallery is displayed first.

* Ensure gallery item can be click in the pinned message list
Improve the gallery item click handling code.

* Improve code and fix separator color
Closes #7101

* React on attachment item click
Improve code

* Improve code and support 0 items in gallery.

* Fix click on attachment item not rendering anything.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-26 16:00:56 +02:00
ganfra 0aea5f94ec Merge branch 'develop' into fix/thread-list-avatar 2026-06-26 11:07:31 +02:00
Jorge Martín 2902549a88 Fix wrong selection behaviour 2026-06-23 17:14:31 +02:00
ElementBot 932fdaeb2c Sync Strings (#7071)
* Sync Strings from Localazy

* Sync strings again.
Restore `screen_notification_settings_sound_system_default`

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2026-06-22 15:37:33 +02:00
Jorge Martín 0bda1cd0d0 Fix double selection of emoji when long-pressing one that doesn't have skin variants 2026-06-22 12:03:00 +02:00
Jorge Martín 35dce84c7f Fix lint issues 2026-06-22 09:17:15 +02:00
Benoit Marty 6ca04ef772 Rename Preview. 2026-06-19 15:10:45 +02:00
Benoit Marty 123037a612 Fix broken preview of BottomSheet in Android Studio. 2026-06-19 14:04:46 +02:00
Benoit Marty 82c6167441 Bottom sheet: initial state must be Hidden else there is no animation when opening the bottom sheet. 2026-06-19 10:38:20 +02:00
Benoit Marty 33e2f72792 Fix deprecation warning 2026-06-18 18:52:38 +02:00
Benoit Marty 3a2f19f26c Fix deprecation warning 2026-06-18 18:44:43 +02:00