- Adds `ModalBottomSheet` to our design components (it wraps the homonimous Material3 one).
- Adds a bottom sheet to the Room list using the aforementioned design component.
- Adds navigation from the room list to a room detail (context menu "Settings" action).
- Consolidates the "leave room flow" into a new `leaveroom` module used by both the room list and the room details.
- Adds progress indicator to the leave room flow
- Uses new `leaveroom` module in `roomdetails` module too.
Parent issue:
- https://github.com/vector-im/element-x-android/issues/261
Refactor search related functionality
This is a prelude to adding the feature of inviting users to
a room, getting everything in the right place and reusable.
What this does:
## User search refactor
Moves the (global) user search logic (dealing with MXIDs,
minimum lengths, debounces) into a `UserRepository`.
This now sits in a `usersearch` library, which will be
used by the create room flow and the new invite flow.
## SearchBar logic pull-up
Every place we use SearchBar, we're doing the same things
to style placeholders, show back/cancel buttons, etc.
We also have a results type that is duplicated for
basically every feature that uses the search bar.
I've pushed all this common functionality into the
SearchBar itself. This makes the component a bit less
general purpose, but saves a lot of repetition.
## Remove the userlist feature
Almost all the functionality of the userlist feature
is now exclusively used by the create room feature.
Room details uses its own version because the
requirements are different.
Components useful elsewhere (SelectedUsers and
SelectedUser) have gone to matrixui, everything else
has gone to createroom.
## Other bits and pieces
I've fixed everywhere that uses Scaffold to correctly
consume the WindowInsets if the contentPadding is
applied to the contents (which it universally is).
This was a change in the last version of Material3
(I guess previously Scaffold handled the consumption
for us). This fixes weird gaps above search bars.
Added overloads for the MatrixUserRow and
CheckedMatrixUserRow that take the name/subtitle/avatar
separately, so the invites list can pass arbitrary
text like "User has already been invited".
The `blockuser` package was for some reason not
under `impl` but alongside it, I've bumped it into
the right place.
Move and refactor MatrixUser
Instead of living in matrixui and having an AvatarData, this can
reside in the matrix module and just have the URL. An extension
method in matrixui can then provide the AvatarData when required.
This removes some small duplication, and pushes the UI-specific
information (i.e., what size of avatar is going to be rendered)
further down the stack. It also aligns the field names with those
used by the rust SDK (e.g. "displayName" instead of "userName").
Adds a CTA on the room list to view invites if there are any.
The invite list presents each invite with accept/decline buttons
and (for room invites) the sender details.
Fixes#102
* Validate ids in constructors.
* Remove redundant `.value` usage in string interpolation.
* Make a distinction between `SessionId` and `UserId` in `TestData`.
* Update AGP to 8.0.0.
* Set JAVA_HOME to JDK17
* Update lint version.
* Use right JDK for dependency analysis, replace deprecated env var.
* Upgrade to Gradle 8.1.
* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Design fixes.
* Make text in emoji items secondary color and the snackbar duration short again
* Try to make margins smaller on smaller displays
---------
Co-authored-by: Florian Renaud <florianr@element.io>
* Create `RoomLastMessageFormatter` to produce readable room summaries.
* Add unit tests using Robolectric, fix bugs
* Add changelog
* Move `RoomLastMessageFormatter` back to `impl` module, allow it to receive an `EventTimelineItem` instead of `MessageContent`.