Commit Graph

161 Commits

Author SHA1 Message Date
Florian Renaud
04d4b6369a Update room properties from room details (#439)
-  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>
2023-06-01 15:10:29 +00:00
Chris Smith
36d372e1eb Display a notice if Matrix ID isn't resolved (#461)
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
2023-06-01 08:40:45 +00:00
Benoit Marty
0a50c51150 Record screenshots 2023-05-30 16:00:46 +02:00
Benoit Marty
b08021f1d9 Rework the set homeserver part: get the info, instead of hard-coded value, and implement retry in case of error. 2023-05-30 15:14:57 +02:00
Benoit Marty
b15abe0509 Reduce number of warnings 2023-05-30 11:43:38 +02:00
Benoit Marty
8fa0eaf4aa Record screenshots 2023-05-30 11:36:31 +02:00
Benoit Marty
463c54ea5c Record screenshots. 2023-05-30 11:09:38 +02:00
Benoit Marty
928e3f680b Fix setting y offset to -12.dp can overlap a state event displayed above. Rework how the vertical offset are applied. 2023-05-30 10:50:06 +02:00
Benoit Marty
b971f87ee3 Document [TimelineItemGroupPosition] and improve preview of [MessageEventBubble]. 2023-05-30 10:17:25 +02:00
Jorge Martín
64777beef1 Merge remote-tracking branch 'origin/develop' into feature/fga/image_loading 2023-05-29 18:11:53 +02:00
Jorge Martin Espinosa
5cafd68ebe Revert RenderingMode to NORMAL in ScreenshotTest (#475)
* Revert `RenderingMode` to `NORMAL` in `ScreenshotTest`

* Remove no longer needed code
2023-05-29 18:00:57 +02:00
ganfra
8b10a5d021 Media: generate again screenshots... 2023-05-26 19:13:51 +02:00
ganfra
c062d125ea Merge branch 'develop' into feature/fga/image_loading 2023-05-26 13:43:51 +02:00
Jorge Martin Espinosa
59b7507fed Display timestamps for text messages (#465) 2023-05-26 10:51:15 +00:00
ganfra
fd81d21091 Media: update screenshots again 2023-05-26 12:20:51 +02:00
ganfra
1ce0324570 Merge branch 'develop' into feature/fga/image_loading 2023-05-26 11:39:34 +02:00
Benoit Marty
3f1433f24c Merge pull request #443 from vector-im/feature/bma/timelineStateEventFormatting
Timeline state event formatting
2023-05-26 10:43:10 +02:00
Marco Romano
993fec1b74 Enable one last ignored test for LeaveRoomPresenterImpl (#462)
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`.
2023-05-26 07:51:41 +02:00
ganfra
bb3b441b6c Media: generate screenshots again 2023-05-25 23:02:55 +02:00
ganfra
8533cb53ca Media: update screenshots 2023-05-25 15:58:08 +02:00
Benoit Marty
02842d978f Record screenshot 2023-05-25 14:39:39 +02:00
Benoit Marty
4b2f0b1328 Better icon for this use case. 2023-05-25 14:17:09 +02:00
Benoit Marty
bab276f7e3 Record screenshots 2023-05-25 14:17:09 +02:00
Benoit Marty
14366e18e7 Use gradle logger to filter out when running with only warning logs. 2023-05-25 12:03:51 +02:00
Benoit Marty
a3d25f3096 Merge pull request #455 from vector-im/misc/cjs/preview-names
Fix bad preview name for invite list
2023-05-25 11:35:06 +02:00
Marco Romano
67a8802766 Room list contextual menu (#427)
- 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
2023-05-25 06:42:44 +00:00
Chris Smith
c74d0a5d6b Fix bad preview name for invite list 2023-05-24 11:12:14 +01:00
Chris Smith
463b9e0642 Invite users to existing rooms (#441)
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
2023-05-23 09:23:24 +00:00
Chris Smith
1eac67bf25 Refactor search related functionality (#436)
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.
2023-05-22 09:06:54 +00:00
Marco Romano
0f8b83d3ba New copy for members search results (#430)
* New copy for members search results

Context: https://matrix.to/#/!dypRwVXIkJaTAACHPd:element.io/$Obt7MbgGtHBqJHpZqcdd6OQ5XgxxNXSJofnFG1NyWWM?via=matrix.org&via=element.io&via=t2l.io

Related to: https://github.com/vector-im/element-x-android/issues/246
2023-05-17 13:21:23 +00:00
Florian Renaud
d9d3fc3fa7 change wording for DM creation dialog 2023-05-16 16:36:47 +02:00
Florian Renaud
1f9812aaf0 Rename preview 2023-05-16 16:36:47 +02:00
Florian Renaud
52f2a32bf8 Select private privacy by default 2023-05-16 16:36:47 +02:00
Florian Renaud
8c6bf1ba18 Make the configure room screen scrollable 2023-05-16 16:36:46 +02:00
Florian Renaud
723e0d561c Update screenshots 2023-05-16 14:32:23 +02:00
Florian Renaud
029eb876df Merge remote-tracking branch 'origin/develop' into
feature/fre/create_room_select_avatar
2023-05-16 14:18:29 +02:00
Benoit Marty
f62ea2096b Merge pull request #425 from vector-im/feature/bma/material3_update
Use default material3 version again and cleanup `@OptIn` annotations.
2023-05-16 09:51:17 +02:00
Marco Romano
1b84f02073 Show pending invitations in room members list (#385)
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
2023-05-15 14:39:27 +02:00
Benoit Marty
7e6aec173a Record screenshots. 2023-05-15 13:50:21 +02:00
Benoit Marty
3704564198 Use default material3 version again and cleanup @OptIn annotations.
Material3 is now 1.1.0
2023-05-15 12:28:31 +02:00
Florian Renaud
4fd3cb4c0e Add todo and screenshot tests 2023-05-11 16:30:37 +02:00
Benoit Marty
c8dc2a5e57 Merge pull request #394 from vector-im/feature/bma/moveShowkaseButton
Move showkase button
2023-05-05 16:40:01 +02:00
Chris Smith
1d041578f7 Make danger check view changes (#391)
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
2023-05-05 08:24:12 +00:00
Benoit Marty
6e9eb254ef Record screenshot tests. 2023-05-05 09:49:28 +02:00
Chris Smith
2171f1a8ab Show badges for new invites (#355)
Show badges for new invites

Closes #238
2023-05-04 15:30:55 +00:00
Jorge Martin Espinosa
31ac97d17a [Media upload] Add media pickers to the Room screen and the composer (#380)
* Add media pickers to the Room screen and the composer.

* Fix exclude rules for translations
2023-05-04 11:51:03 +02:00
Chris Smith
908bdcf6cd Fix screenshot tests for userlists (#382)
These were recorded before Paparazzi's rendering mode was changed
to SHRINK.
2023-05-03 18:00:08 +02:00
Chris Smith
63168d4656 Search for users to start a new DM. (#376)
Search for users to start a new DM.

Hooks up the create room UI to the matrix client to get
search results. Searches are debounced for 500ms and
only executed when 3 or more characters are entered.

Wrap the result state so we can distinguish between
"no results because we haven't searched yet" and
"no results because the API returned nothing", and
add a "No results found" message in the UI for the
latter case.

Closes #95
2023-05-03 13:26:31 +00:00
Jorge Martin Espinosa
921fb55220 Group design components in Showkase for the Compound team (#375)
* Screenshot tests changes:

    - Group components for Showkase.
    - Set special Paparazzi config for scrolling screens using non null `Preview.heightDp`.
    - Add merged theme preview with `ElementThemedPreview` component.
2023-05-02 16:13:35 +00:00
Jorge Martin Espinosa
e5a8548ab9 Design fixes for room detail, dm & room member detail screens (#363)
* Design fixes for room detail, dm & room member detail screens.

* Record new screenshots, improve RoomDetailsStateProvider.

* Move MainActionButton to its own component in the design system.
2023-05-02 14:02:51 +00:00