* Replace bottom sheets in timeline with M3 ones.
* Add missing options to menu with the right icons
* Add message summary and reaction emoji row.
* Use the same icon in the message summary and file timeline item
- Add the edit action in the room details
- Add "Add topic" button in room details
- Add the screen behind that action to edit some room properties: avatar, name, topic
- Handle the save button action
- enable the button only if changes are detected
- display a loader "updating room"
- display an error dialog if any request has failed
- Check user has the right power level to change various attributes
- "Add topic" is only shown if there's no topic and they are able to set on
- Edit menu is only shown if they can change topic, name or avatar
- On the edit page, any fields they can't change are uneditable
Co-authored-by: Chris Smith <csmith@lunarian.uk>
Display a notice if Matrix ID isn't resolved
If we can't get the profile of a user after an mxid was
searched for, show a warning under their ID to say the
invite probably won't be delivered.
Closes#424
Most of the tests in `LeaveRoomPresenterImplTest.kt` where using `UnconfinedTestDispatcher` which was conflating some of the state returned by the presenter. This prevented to test one specific case which had been left with an `@Ignore` annotation.
This PR switches to `StandardTestDispatcher` so that the ignored test case can work and also fixes some other test cases whose behavior is now more correct under the `StandardTestDispatcher`.
Also updates our test factory method for `CoroutineDispatchers` to more easily obtain a `CoroutineDispatchers` which uses `StandardTestDispatcher`.
- 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
Invite users to existing rooms
Scope:
- Allow inviting from the room detail screen and the member list
- Invite option is only shown if the user has the correct power level
- Search flow the same as creating a new room, allowing multi-select
- Existing room members/invitees are disabled with a custom caption
- Sending is asynchronous, an error dialog will appear wherever the
user is if necessary
Closes#245
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.
Splits a Room's member list in 2 showing pending invitees first and then the actual room member.
This simple user facing change entails a host of under the hood changes:
- It copies the logic from the `userlist` module and merges it into the `roomdetails` module removing all details not related to the member list (e.g. gets rid of multiple selection, debouncing etc.).
- Uncouples the `roomdetails` module from the `userlist` one. Now leaving only the `createroom` module to depend on the `userlist` module. Therefore the `userlist` module could be in the future completely removed and merged into the `createroom` module.
- Changes the room members count in the room details screen to only show the members who have joined (i.e. don't count those still in the invited state).
Missed ACs:
- This change does not make the member list live update. Discussion is ongoing on how to make this technically feasible.
Parent issue:
- https://github.com/vector-im/element-x-android/issues/246
Make danger check view changes
Add a check that if a file with @Preview or @LargeHeightPreview
in it is changed, then the corresponding build file includes
the showkase processor.
Also change the check that prompts about screenshots to use
the same @Preview logic instead of checking for "/layout" in
the path which doesn't work with compose.
Also add missing showkase processors