Commit Graph

810 Commits

Author SHA1 Message Date
Benoit Marty 57ffa2615c Improve preview of AvatarCluster to show all types. 2025-06-23 22:16:06 +02:00
Benoit Marty abd92d05d4 Avoid potential infinite loop. 2025-06-23 21:56:20 +02:00
Benoit Marty 14bb7d3bd1 Provide avatarShape: Shape instead of AvatarType to sub composable functions 2025-06-23 21:51:56 +02:00
Benoit Marty 9e65b7fa63 Extract subcomposable InitialOrImageAvatar 2025-06-23 21:45:59 +02:00
Benoit Marty 52ad634504 Remove default param for Avatar.avatarType 2025-06-23 21:36:53 +02:00
Benoit Marty 63d8d9b09e Remove default param for AvatarCluster.avatarType 2025-06-23 21:27:40 +02:00
Benoit Marty b36f68b8c4 SpaceAvatar can be internal 2025-06-23 21:25:23 +02:00
Benoit Marty 0cc11ba626 Cleanup code rework by IDE. 2025-06-23 21:24:40 +02:00
Benoit Marty a676d5fae1 Extract UserAvatar to its own file. 2025-06-23 21:24:03 +02:00
Benoit Marty 2bcffe80de Let AvatarType be the receiver of avatarShape() 2025-06-23 18:34:52 +02:00
Benoit Marty 59aec12906 Move isTombstoned to AvatarType.Space 2025-06-23 18:33:42 +02:00
Benoit Marty e202fbfbd9 AvatarType is Immutable. 2025-06-23 18:03:53 +02:00
Benoit Marty dddf046b43 Extract ImageAvatar and InitialLetterAvatar to their own files. 2025-06-23 18:02:34 +02:00
Benoit Marty 2ac94f2827 Cleanup 2025-06-23 17:57:44 +02:00
Benoit Marty 3669128e60 Introduce AvatarType to be able to render space avatars 2025-06-23 17:08:14 +02:00
ganfra 2a865e6f4b change (room avatar) : replace modifier.requiredSize by modifier.size 2025-06-18 13:39:46 +02:00
ganfra 68e7406ba6 change (room avatar) : fix AvatarClusterPreview 2025-06-18 12:53:27 +02:00
ganfra 780339c584 change (room avatar) : add preview for TombstonedRoomAvatar 2025-06-18 12:29:47 +02:00
ganfra 3cf236907b change (room avatar) : clean code related to room name/avatar 2025-06-17 20:37:41 +02:00
ganfra f11a023b87 change (room avatar) : delete CompositeAvatar 2025-06-17 10:37:07 +02:00
ganfra 451579594e change (room avatar) : introduce RoomAvatar and AvatarCluster to replace CompositeAvatar 2025-06-17 10:37:07 +02:00
ganfra 6c034b4fb7 change (room avatar) : use TextAvatar from TombstonedRoomAvatar 2025-06-17 10:37:06 +02:00
ganfra 700c839c7e change (room avatar) : use TextAvatar from InitialLetterAvatar 2025-06-17 10:37:06 +02:00
ganfra a8cc2d22bd change (room avatar) : introduce TextAvatar component 2025-06-17 10:37:06 +02:00
ganfra e2b1ab2632 Merge branch 'develop' into feature/fga/room-version-upgrade 2025-06-16 20:46:28 +02:00
ganfra ad6e405718 feature (room upgrade) : revert ComposerAlertMolecule preview 2025-06-12 11:09:17 +02:00
Benoit Marty f28df4389f Remove ExperimentalComposeUiApi. Not necessary anymore. 2025-06-11 17:49:11 +02:00
ganfra 88573fd2ae Merge branch 'develop' into feature/fga/room-version-upgrade 2025-06-11 16:30:21 +02:00
Benoit Marty f68b411659 Annotate Composable function with ReadOnlyComposable where it's possible. (#4859) 2025-06-11 14:12:54 +02:00
ganfra e8bc54cf9e feature (room upgrade) : manage navigation and clean code. 2025-06-11 13:32:12 +02:00
ganfra 7b75a52ca2 feature (room upgrade) : start rendering SuccessorRoom and PredecessorRoom banners in timeline 2025-06-11 10:46:39 +02:00
renovate[bot] 03b801094b fix(deps): update coil to v3.2.0 (#4712)
* fix(deps): update coil to v3.2.0

* Fix compilation issue. Need to provide an image for preview.

https://coil-kt.github.io/coil/compose/#previews

* Improve preview for images.

* Update screenshots

* More cleanup

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2025-06-05 09:49:27 +02:00
renovate[bot] 7bb1e24ff5 fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01 (#4631)
* fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01

* Fix autofill deprecations

* Adapt our custom BottomSheetState and scaffold to the new APIs

* Get rid of all the custom bottom sheet implementation

It doesn't seem to be needed anymore 🎉

* Replace `semantics { invisibleToUser() }`  with `hideFromAccessibility()`

* Update screenshots

* Add commit and cancel callbacks for autofill on the login view

* Fix broken tests caused mainly by https://issuetracker.google.com/issues/366255137

Add `LocalUiTestMode` composition local and helper functions.

* Remove dependency that caused a new license to need to be approved

* Let setSafeContent handle setting the value for LocalUiTestMode

* Fix broken test

* Apply fix to RoomMemberModerationViewTest and RoomListDeclineInviteMenuTest

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-06-03 21:05:43 +00:00
Jorge Martin Espinosa e02053d85e Make sure HeaderFooterPage can contents be scrolled (#4704)
Co-authored-by: ElementBot <android@element.io>
2025-06-02 14:28:46 +02:00
renovate[bot] 5ed2e92801 fix(deps): update lifecycle to v2.9.0 (#4693)
* fix(deps): update lifecycle to v2.9.0

* Remove unused code.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-09 09:55:35 +00:00
renovate[bot] 5fb0fc0d50 fix(deps): update android.gradle.plugin to v8.10.0 (#4687)
* fix(deps): update android.gradle.plugin to v8.10.0

* Update lint version to 8.11.0-alpha09

* Fix lint false positive.

Error: Modifier factory functions must use the receiver Modifier instance [ModifierFactoryUnreferencedReceiver from androidx.compose.ui]

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-07 11:07:20 +02:00
Benoit Marty f6fe5fda35 Cleanup element call and UI (#4641)
* Use ElementTheme.colors.bgCanvasDefault instead of MaterialTheme.colorScheme.background

Even if the value is the same, we should use color from ElementTheme.

* Remove background management of ElementCallActivity. It does not work as expected and also changing theme during a call would require to load the url again with the new theme.

* Do not use isSystemInDarkTheme() directly.

* Use bgSubtleSecondary for background color of Preview.

* Use default colors for Preview.

* Fix copy paste issue.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-25 17:30:54 +02:00
Benoit Marty add03ab33a Render caller avatar on Incoming call screen (#4635)
* Ensure that the image loader is set, else the IncomingCallActivity will not be able to render the avatar.

Fixes #4633

* Add background color to OnboardingBackground

Fixes #4629

* Trigger CI
2025-04-24 21:32:46 +00:00
Benoit Marty 2ca541936f Accessibility: improve behavior of list items (#4626)
* a11y: add Modifier to improve accessibility of ListItems.

Remove duplication of onChange. As per the documentation, it has to be used only if the behavior is different than the onClick listener of the list item.
It also has the effect to read twice the action when the screen reader is one. See https://github.com/element-hq/element-x-android/pull/4047#discussion_r1888136571 for more details

a11y: remove contentDescription on List item icon, else the text is read twice.

* Ensure that if the ListItem is not enabled, the trailing/leading content is also not enabled.

* Update screenshots

* Fix lint crash.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-24 21:53:21 +02:00
Benoit Marty bacfa09916 [a11y] Make more items focusable (#4605)
* Fix settings entry point not available when there is no avatar on the account. Fixes #4599.

* Use Ktx extension `String.toUri()`

* Allow screen reader to focus on the user avatar to allow editing it.

* Fix import order
2025-04-22 08:50:50 +02:00
Jorge Martin Espinosa 740c28eda9 Improve accessibility of the timeline (#4579)
* Make whole messages selectable and readable as a single unit when possible.
* Make most UI components not clickable when talkback is enabled.
* Make voice messages work with talkback too.
* Read grouped state events even if the events are collapsed.
* Move image and video item actions to the timeline item.
* Improve accessibility in the message context menu too
* Fix a11y issue on add attachment button.
* Add `contentDescription` to file icon so it's read aloud

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-04-15 15:28:29 +00:00
ganfra a4fcc476d1 change (preferences) : use PreferenceDropdown for appearance (and add some tests) 2025-04-11 17:09:31 +02:00
ganfra 322dd9a945 Merge branch 'develop' into feature/fga/advanced_settings_moderation_and_safety 2025-04-10 18:32:04 +02:00
ganfra 58fc1f9a0e change (preferences) : hide invite avatars (room and sender) 2025-04-09 21:26:24 +02:00
Benoit Marty ad9997b8ba Click on userId / room alias to copy value to clipboard. (#4549) 2025-04-08 09:23:02 +02:00
Benoit Marty b0beb0dfc9 Use colors from compound for badges (#4545)
* Use badge color from Compound and remove temporary aliases

* Use color instead of a copy of it.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-07 11:32:35 +02:00
Jorge Martin Espinosa 977268b876 Fix bullet points not having leading margin on timeline items (#4536)
* Fix bullet points not having leading margin on timeline items

* Remove other usages of `SpannableString` constructor, use either `valueOf` to reuse the existing value or `SpannedString` instead if the spans don't have to change
2025-04-07 10:50:45 +02:00
Benoit Marty 670af86e8b Replace OutlinedTextField by our TextField (#4521)
* Let TextFieldListItem take the entire width.

* Add unit test to detect usage of OutlinedTextField.

* Use TextField instead of OutlinedTextField

* Remove unnecessary opt in to ExperimentalFoundationApi

* Use TextField instead of OutlinedTextField

* Fix compilation issue.

* Update screenshots

* ListDialog: add space between items.

* Update screenshots

* Set applyPaddingToContents to true by default.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-02 14:04:07 +00:00
Benoit Marty 1fdb590ece Improve TextFieldDialog (#4512)
* Extract TextFieldDialog to its own file (no other change).

* Add TextFieldDialogPreview

Enhance TextFieldDialog

* Let RoomMembersModerationView use TextFieldDialog

* Update screenshots

* Konsist.

* Add modifier parameter.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-02 10:05:56 +02:00
Benoit Marty 3bff64b92a Add kick (remove) confirmation and reason (#4507)
* Add confirmation dialog when kicking someone, ith ability to provide a reason.

Also add the reason for banning people.

* Fix padding issue in dialogs.

* Improve TextField in dialog.

* Update screenshots

* Fix tests

* Format and import

* Add missing UI tests.

* Use `needsConfirmation` as it's already used in the code base.

---------

Co-authored-by: ElementBot <android@element.io>
2025-04-01 11:38:46 +02:00