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

107 Commits

Author SHA1 Message Date
bmarty
bfde1cc8a6 Sync Strings from Localazy 2026-10-20 09:46:25 +00:00
ganfra
c08074f632 Add room suggestions when forwarding content 2026-10-16 16:01:32 +02:00
Benoit Marty
23a79ad987 Merge pull request #7896 from element-hq/sync-localazy
Sync Strings
2026-10-12 13:56:43 +02:00
bmarty
8100fa6555 Sync Strings from Localazy 2026-10-12 00:37:35 +00:00
Benoit Marty
d29e4e5f0c Merge remote-tracking branch 'origin/develop' into feature/bma/multiAccountShareAtRoot
# Conflicts:
#	libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTest.kt
2026-10-09 17:11:58 +02:00
Benoit Marty
00dab131dd Ask for session verification before sharing with an unverified account
The incoming share is now displayed on top of the root, so the FTUE, and the session verification in particular, could be bypassed.

- When the current account is not verified, wait for the FTUE to be complete before displaying the incoming share, as before.
- When the user selects another account which is not verified in the room select screen, display the session verification flow of
  the FTUE for this account on top of the share. As in the FTUE, the user has to verify the session or to sign out.
- Expose the FTUE session verification flow with a new SessionVerificationEntryPoint, displayed by OtherSessionVerificationNode
  which sets up the session graph of the account to verify.
- Introduce RoomSelectNavigator so that RoomSelectPresenter can request the verification of the selected session.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 17:00:48 +02:00
Benoit Marty
85224988af Room select: address review remarks
- Scroll the list to the top using a LaunchedEffect instead of recreating the LazyListState on each search query change.
- Use isBlank to check the search query, to match the logic of RoomSelectSearchDataSource.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 14:34:45 +02:00
Benoit Marty
9429bd9420 Clean up 2026-10-09 09:04:41 +02:00
Benoit Marty
0c6da39acb Room select: update empty search UI and behavior. 2026-10-09 09:00:47 +02:00
Benoit Marty
59bc387c7d Replace the SearchBar by a SearchField in the room select screen
The room select screen was using a SearchBar, with an active mode displaying the search results instead of the room
list. Use a SearchField instead, displayed above the room list, which filters the rooms directly. The account switch
section and the selected rooms are now also displayed while searching.

- Remove isSearchActive from the state, and the ToggleSearchActive event.
- The "No results" message is displayed when the query is not blank and no room matches it.
- The back button now always closes the screen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 09:00:46 +02:00
ganfra
512bab05a6 Merge branch 'develop' into feature/fga/timeline-multi-forward 2026-10-08 17:38:14 +02:00
Benoit Marty
9bc7e751c4 Keep the incoming share displayed when the current account is signed out
The incoming share was displayed in the logged in flow of the current
session, so it was destroyed when the current session was signed out, for
instance from another device. When another session was signed out, the room
select screen was kept and displayed an error if this session was selected.

To make the behavior consistent:
- The incoming share is now displayed by the RootFlowNode, on top of the
  logged in flow, and does not depend on a session anymore. The latest used
  session is passed from the RootFlowNode to the room select screen, through the
  share flow, and is used as its initial session.
- When the root of the RootFlowNode backstack changes while an incoming share
  is displayed, the new root is set below the incoming share, using the new
  replaceRoot backstack operation, instead of removing all the elements.
- The room select screen handles the invalidation of the current session like
  for any other session.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 09:45:57 +02:00
Benoit Marty
920e37d097 Scroll the rooms header with the search results in room select screen
Move the "Rooms" section header inside the LazyColumn of the search results, so that it scrolls with the list
instead of staying fixed above it, as it is done for the room list when the search is not active.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 09:41:05 +02:00
Benoit Marty
7ad1277faf Fix room list not scrollable in room select screen when the account switch is hidden
The nested scroll connection of the account switch section was always attached. When the section is not displayed
(single account, Forward mode, or search active), its height offset limit is never set and stays at -Float.MAX_VALUE,
so the connection consumed all the scroll events and the room list could not be scrolled.

Only attach the connection when the account switch section is displayed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 09:32:39 +02:00
Benoit Marty
54b1a909bc Display an error in the room select screen if the selected account has an invalid token
All the accounts are proposed in the account switch, even the ones with an
invalid token, so that the user can still see them. If the selected account
has an invalid token, or is invalidated while the screen is displayed (for
instance signed out from another device), the error is displayed instead of
the room list, the selected rooms are cleared, and the client of this account
is not used anymore.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 16:01:14 +02:00
Benoit Marty
3c4632ee9d Render an error in the room select screen if the rooms cannot be loaded
If the client of the selected account cannot be restored, the room list was
never loaded and there was no feedback to the user.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 15:50:11 +02:00
Benoit Marty
6f1033ee67 RoomSelectView: improve scroll behavior
Ref: https://www.figma.com/design/kEAcfun9iSpszeUDvdKZ6b/ER-351--Multi-account-in-EX?node-id=195-40292
2026-10-07 15:50:10 +02:00
Benoit Marty
30b71cf90b Use derivedStateOf for selectedAccount too 2026-10-07 15:50:09 +02:00
Benoit Marty
ed2a553736 Fix flaky test. 2026-10-07 15:50:07 +02:00
Benoit Marty
792e0adde3 Let the user switch account from the room select screen when sharing
When several accounts are signed in, sharing into the app no longer goes through the account selection screen. The room select screen (Share mode) now displays the selected account and an account switch on top of the room list, with a design similar to the multi account section of the settings.

Selecting another account displays the rooms of this account in place, scrolled to the top, without recreating the screen. The content is then shared from the room select screen using the selected account, with the same progress and error dialogs as when sharing with the current account. The current account is switched only once the share has succeeded, then the room is opened if the content has been shared to a single room.

Implementation:
- RoomSelectNode is now in the AppScope and uses MatrixClientProvider to get the room list of the selected session.
- ShareNode gets the SharePresenter of the selected session from its session graph, using the new ShareBindings.
- SessionGraphFactory is moved to the matrix api module so that it can be used by features.

The account selection screen is still used for permalinks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 15:50:06 +02:00
ganfra
2d30dc6cf0 Merge branch 'develop' into feature/fga/timeline-multi-forward 2026-10-01 15:23:42 +02:00
ganfra
62f9b7f0b4 Use "Forward to" as forward screen title 2026-09-29 20:53:51 +02:00
Benoit Marty
4c4389b29a Remove unnecessary Material3 experimental opt-ins
Many Material3 APIs are now stable, so the `ExperimentalMaterial3Api` and `ExperimentalMaterial3ExpressiveApi`
opt-ins are not required anymore at those places. Also remove the propagating `@ExperimentalMaterial3Api`
marker from `TopAppBarScrollBehaviorLayout`, which does not use experimental API anymore.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 18:45:30 +02:00
hayaksi1
03c330ee07 Rename PreviewParameterProvider subclasses to the PreviewParam suffix
The `Provider` suffix reads as a dependency provider rather than as preview
data, and it collides with the real providers in the codebase — `StringProvider`,
`PickerProvider`, the login feature's `AccountProvider` — so the name says
nothing about which of the two a class is. `PreviewParam` says it.

195 classes are renamed, along with the 185 files named after them, the konsist
rule that enforces the convention, the presentation-class file templates and the
onboarding documentation.

This cannot be split. `Konsist.scopeFromProduction()` scans the whole project, so
flipping the assertion before every class has moved leaves the rule red, and a
rule that accepted either suffix during a transition would be exactly the kind of
compatibility layer this convention change is meant to remove.

Two judgement calls in the rule itself. The `name.endsWith("PreviewProvider")`
exclusion is dropped: its only job was to reject a redundant `Preview` before
`Provider`, and the new suffix already contains it; no class currently ends with
`PreviewProvider`, so removing it changes nothing today. And
`EditableAvatarViewUriProvider` is renamed rather than deleted from the exclusion
list even though no such class exists in this repository, since it presumably
comes from the modules overlaid for the enterprise build.

Nothing keyed off the old suffix: no snapshot filename contains a provider class
name, so no Paparazzi image changes, and the Kover variants match on `*Presenter`,
`*State` and `*ViewKt`, so coverage bounds are unaffected.
2026-08-17 17:40:33 +03:00
Benoit Marty
7b0745c5f1 Fix layout issues. 2026-08-12 11:00:55 +02:00
hayaksi1
629dc15a86 Only show a Matrix ID in the room picker for a direct message
heroes is populated for any room whose name is derived from its members,
not only for direct messages, so a two person room that is not a DM
showed a member's Matrix ID as its subtitle.

Carry isDm on SelectRoomInfo and read the hero only when it is set. The
canonical alias still takes precedence, so nothing changes for a room
that has one.
2026-08-10 16:46:58 +03:00
hayaksi1
ed82505946 Show the alias or the direct message user's Matrix ID in the room picker
The forward and share room picker showed only a display name, so several
direct messages or rooms sharing a name were indistinguishable.

Render a secondary line: the canonical alias when the room has one, otherwise
the other person's Matrix ID for a direct message. No model change was needed,
because heroes is populated only for a direct message with exactly one hero,
so heroes.singleOrNull() is the peer.
2026-08-09 15:09:59 +03:00
Jorge Martin Espinosa
77edfec61a Use the right insets in the home screen UI (#7271)
* Use the right insets in the home screen UI

That's `WindowInsets.statusBar` for the `Scaffold` component, then `WindowInsets.navigationBar` for the `LazyColum.contentPadding`

* Apply it to other screens with long lists of items too

* Apply the insets to `PreferencePage` too

* Apply inset changes to other screens with scrollable content

* Add helper insets/padding values based on review suggestions.

* Use the newly added insets/padding values in several scaffold and scrollable columns

---------

Co-authored-by: ElementBot <android@element.io>
2026-07-27 18:17:14 +02:00
ganfra
9d427077f0 Refactor SearchBarResultState.Initial and NoResultsFound to data objects 2026-07-23 16:15:02 +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
Benoit Marty
d0f48a8e56 Fix deprecation warning
https://github.com/Kotlin/kotlinx.collections.immutable/blob/master/docs/0.5.0-MIGRATION.md
2026-06-17 15:33:57 +02:00
Benoit Marty
f7182127a9 RadioButton -> Checkbox 2026-06-17 10:42:22 +02:00
Benoit Marty
a819cf6862 Fix padding issue 2026-06-12 12:30:19 +02:00
Benoit Marty
d33852d32f Room selection: add a limitation of 10 rooms for Share and Forward actions. 2026-06-12 09:22:29 +02:00
Benoit Marty
c0c2f59822 Use test extension on presenter. 2026-06-11 16:50:53 +02:00
Benoit Marty
9739f58901 RoomSelectEvents -> RoomSelectEvent 2026-06-11 16:49:57 +02:00
Benoit Marty
bda24a1175 Forward message to multiple rooms 2026-06-11 16:36:52 +02:00
ganfra
babaa7351f Add tests and clean code after RoomList Filter rework 2026-01-30 15:33:51 +01:00
ganfra
5c3fc13052 Refactor room list filtering to use Rust SDK 2026-01-29 22:08:12 +01:00
ganfra
5b700f7b98 Let SearchBar/SearchField use TextFieldState 2026-01-23 10:32:58 +01:00
ganfra
e6d8b07538 sdk : allow passing coroutineScope to RoomList 2026-01-21 16:48:22 +01:00
Jorge Martin Espinosa
dcfe025dd2 Fix navigation stack overflow when sharing media (#5724)
* Fix navigation stack overflow when sharing media

* Improve the handling of back navigation in the navigation button too
2025-11-14 13:50:13 +01:00
Benoit Marty
eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty
7ad9c8f687 Rename handleEvents to handleEvent 2025-11-07 12:21:43 +01:00
Benoit Marty
fdd4e2115c Always use the handleEvent(s) function the same way. 2025-11-03 18:49:00 +01:00
Benoit Marty
07b6148035 Remove context(parentNode: Node) and provide the parent Node as a parameter. 2025-10-31 12:04:57 +01:00
Benoit Marty
6298209ad9 Create Fake classes in test modules 2025-10-30 18:32:31 +01:00
Benoit Marty
f174084942 Use context parameter for the parentNode 2025-10-30 16:32:53 +01:00