Commit Graph

330 Commits

Author SHA1 Message Date
Jorge Martín 07e90ff704 Fix MarkdownTextInputTest using the previous onSendMessage signature 2026-08-13 12:10:19 +02:00
Benoit Marty d017a84b2b Remove useless let statement. 2026-08-13 11:47:22 +02:00
Benoit Marty 8c8d232eac Make onSendMessage parameter not nullable 2026-08-13 09:21:31 +02:00
Benoit Marty fb82291f0a Merge pull request #7353 from hayaksi1/fix/860-enter-sends-message
Send a message with Enter on a physical keyboard, Shift+Enter for a new line
2026-08-13 09:19:07 +02:00
Benoit Marty ae5c4161c7 Remove redundant parenthesis 2026-08-12 18:14:36 +02:00
Benoit Marty 00e9a8ab71 Fix wrong TextComposer placeholder displayed when in a thread.
We cannot only use MessageComposerMode since use can edit a message in a thread, so this is becoming handly.
2026-08-12 17:05:08 +02:00
hayaksi1 4b5429395d Drop the comments from the Enter key handling
Review feedback: the callback name and the device-id check read on their
own, and the test names carry the soft versus physical keyboard rule.
2026-08-09 15:37:18 +03:00
hayaksi1 1024323661 Send a message with Enter on a physical keyboard, Shift+Enter for a new line
With a hardware keyboard attached, Enter inserted a newline and the only
way to send was to reach for the send button, which is the opposite of
what every desktop chat client does.

MarkdownEditText gains an optional Enter listener and consumes Enter when
it comes from a physical keyboard without Shift. Shift+Enter keeps
inserting a newline, and a key event from the on-screen keyboard is
identified by its VIRTUAL_KEYBOARD device id and left alone, so nothing
changes for touch users. The key release is consumed as well, so no
newline leaks out on key repeat.

TextComposer passes its existing send lambda through, guarded by the same
canSendTextMessage check the send button already uses, so Enter cannot
send an empty message.

Relates to https://github.com/element-hq/element-x-android/issues/860
2026-08-09 04:09:30 +03:00
Benoit Marty d1cf1aa09f Fix deprecation warning on androidx.compose.material3.ListItem 2026-08-06 18:35:17 +02:00
Jorge Martin Espinosa 0cd163a680 Import Compound tokens from v10.2.3 (#7272)
* Import Compound tokens from `v10.2.3`

* Remove manually added `bgSubtleTertiary` semantic color: it's in Compound now

* Bump enterprise module to a compatible commit
2026-07-28 09:07:24 +00:00
ganfra 9c3fe5ad23 Drop mutating setter for MentionSpan trailingText 2026-07-22 17:28:30 +02:00
ganfra 2a86c69b9d Sync user status strings with Localazy and tidy formatting
# Conflicts:
#	libraries/ui-strings/src/main/res/values/temporary.xml
2026-07-22 17:28:29 +02:00
ganfra 06a903718b Display user status next to display names across rooms and profiles 2026-07-22 17:27:21 +02:00
Benoit Marty 2ceff75e65 Merge pull request #7227 from unclejay80/a11y/formatting-option-state-description
Expose formatting toggle state to TalkBack
2026-07-17 10:00:31 +02:00
Jorge Martin Espinosa 0d03472c60 Content scanner (Element Pro): scan timeline events for unsafe content (#7159)
* Simplify how event content with captions are displayed

The caption component will now be added in `TimelineItemEventContentView` instead of separately in each `TimelineItem__View` component

* Make sure `CoilMediaFetcher` methods to fetch media throw errors

We need to catch them later to check if the content scanner marked some thumbnails or medias as invalid/unsafe in `AsyncImage` instances

* Add a `ContentScannerService` that allows us to manually scan a list of medias in an event and then update and store the results

The results take the form of `ContentValidationValue`, stored in a `ContentValidationState` instance tied to the event

* Create `EventContentValidationCache` to keep the `ContentValidationStates` for events in a room

* Expose `EventContentValidationCache` to Compose using `LocalEventContentValidationState`

Also add a couple of helper functions to avoid having to manually remember the states

* Use the new components to display invalid content in the timeline items

* Add `blurhash` to most media items so we can use it while validating the thumbnails/medias

* Fix custom layout issues with screenshot and UI tests

* Also check the validation state for replied-to events in the composer

* Fix and add tests

* Handle unrecoverable content validation errors too: display a 'not found' UI

* Improve the performance of `EqualWidthColumn` for the single item case

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-07-16 07:59:51 +00:00
Jürgen Wischer a6aa29f375 Expose formatting toggle state to accessibility services
FormattingOption used clearAndSetSemantics with only a contentDescription,
so the Bold/Italic/Underline toggle buttons never exposed whether they
were currently active to TalkBack. Add a stateDescription reflecting the
selected/unselected state alongside the existing contentDescription.

New a11y_active / a11y_inactive strings added to temporary.xml for
Localazy import.
2026-07-15 22:05:04 +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 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 123037a612 Fix broken preview of BottomSheet in Android Studio. 2026-06-19 14:04:46 +02:00
Benoit Marty c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
ElementBot d39b208099 Sync Strings from Localazy (#7021)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-16 12:59:45 +02:00
Jorge Martín 97de57fd79 More fixes 2026-05-28 09:54:01 +02:00
ElementBot 0aaa80cbdc Sync Strings from Localazy (#6856)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-26 08:05:07 +00:00
Benoit Marty 26fe5b6492 Merge pull request #6650 from element-hq/feature/bma/a11yFixes
[a11y] Fix a set of issues
2026-05-04 11:50:15 +02:00
bmarty 0d2f71643a Sync Strings from Localazy 2026-05-04 00:54:27 +00:00
Benoit Marty 11b9efa2c9 Migrate to v2 testing APIs 2026-04-30 16:04:07 +02:00
Benoit Marty f5737e9d2b a11y: add alternative text to the info icon.
Closes #6379
2026-04-30 12:07:05 +02:00
Benoit Marty 09ff3294d5 Ensure that all the ModalBottomSheet can scroll. 2026-04-27 10:23:56 +02:00
ElementBot 9a2ad3928a Merge pull request #6658 from element-hq/sync-localazy
Sync Strings
2026-04-27 09:17:54 +02:00
Kurban Sagitov 3379c61ad1 PR:Fix mention pill cut off (#6622)
* Fix mention pill cut off

* trigger CI after screenshots

* trigger CI after screenshots
2026-04-24 14:20:24 +02:00
Jorge Martin Espinosa 92ee479e91 Set max lines for 'in reply to' view conditionally (#6612)
* Set max lines for 'in reply to' view conditionally. When there is enough screen space, use 2 lines as before. If the screen space is limited, use a single one.

* Reduce vertical padding for reply-to view in compose

* Add screenshot test with single line in reply to view

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-04-23 15:15:52 +02:00
ElementBot e1b7171839 Sync Strings (#6626)
* Sync Strings from Localazy

* Use the previous plurals as plain strings

* Add extra case for 1 vs multiple users

* Update screenshots

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-04-20 17:09:10 +00:00
Benoit Marty 269d367130 Merge pull request #6464 from kalix127/feat/reply-with-voice-message
Support replying to messages with voice recordings
2026-04-17 14:49:04 +02:00
bmarty 23c1112dcf Sync Strings from Localazy 2026-04-13 00:48:40 +00:00
Benoit Marty e63a50b512 Merge pull request #6517 from element-hq/feature/bma/compound10
Sync compound tokens https://github.com/element-hq/compound-design-tokens/releases/tag/v10.0.0
2026-04-08 09:40:14 +02:00
Gianluca Iavicoli 4586ee31ea fix: re-focus text input after voice recording ends 2026-04-02 22:20:13 +02:00
Gianluca Iavicoli 9a81ec5569 refactor: remove keyboard dismissal logic during voice recording 2026-04-02 22:14:04 +02:00
Benoit Marty 4ad495d36c Add support for slash commands (under Feature Flag) (#6482)
* Add support for slash commands

* Update screenshots

* Rename module `slash` to `slashcommands`

* Rename `SlashCommand` to `SlashCommandService`

* Introduce MsgType in order to send text message with a different msgtype value.

* Format file and add parameter names, add default values and cleanup

* Add isSupported parameter to filter out unsupported yet commands.

* Slash commands: disable suggestions if the feature is disabled.

* Fix sending shrug command.

* Add missing test on SuggestionsProcessor

* Add tests on MessageComposerPresenter about slash command.

* Fix import ordering

* Add missing tests on CommandExecutor

* Add missing tests in MarkdownTextEditorStateTest

* Slash commands: Improve code when sending message with prefix.

* Slash commands: Add support for /unflip

---------

Co-authored-by: ElementBot <android@element.io>
2026-04-02 16:15:32 +02:00
Benoit Marty e401619017 Changer border color of InReplyTo to separatorPrimary 2026-04-02 09:37:15 +02:00
Benoit Marty cbb220f08d Merge pull request #6472 from element-hq/feature/bma/inReplyUi
Update replied message UI
2026-03-27 10:17:01 +01:00
Benoit Marty 1de3729792 Merge pull request #6446 from bxdxnn/misc/bullet-margin
Add margin after bullet points
2026-03-25 17:05:48 +01:00
Benoit Marty 7d28c52242 Cleanup 2026-03-25 16:51:41 +01:00
Benoit Marty 747f588fa7 Update UI of replies. 2026-03-25 15:27:36 +01:00
Gianluca Iavicoli d9a54fb716 fix: persist reply banner during voice recording and dismiss keyboard 2026-03-25 00:58:57 +01:00
Benoit Marty eef20f723b Update colors of permalinks. 2026-03-24 16:31:15 +01:00
Benoit Marty 54de64efd5 Update Mic icon in the composer bar. Closes #6443 2026-03-24 10:00:08 +01:00
bxdxnn a50b39fd89 Add margin after bullet points 2026-03-23 19:39:28 +00:00
Gianluca Iavicoli 800a9ab972 Fix keyboard not auto-opening when editing a message (#6412)
* fix: auto-open keyboard when editing a message

* fix: show keyboard on focused editor view instead of root view
2026-03-23 10:54:59 +01:00
Benoit Marty 13578aa09b Sync string again. 2026-03-16 14:54:06 +01:00
bmarty 299d5a9394 Sync Strings from Localazy 2026-03-16 00:42:32 +00:00