Commit Graph

57 Commits

Author SHA1 Message Date
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
Chris Smith
5c935818c6 Move and refactor MatrixUser (#381)
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").
2023-05-03 16:30:19 +00:00
ganfra
e73d92124e Update tests and avoid useless recomposition 2023-05-02 13:04:00 +02:00
ganfra
d7cd8a2915 RoomMembers: change the API again.. 2023-04-28 15:04:33 +02:00
ganfra
c9370315ad Some clean up 2023-04-25 11:17:05 +02:00
Jorge Martin Espinosa
afd58f1634 Update Gradle to 8.1 and AGP to v8.0 (#329)
* 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>
2023-04-17 08:49:52 +00:00
Florian Renaud
5364bbd2cb Update screenshots 2023-04-13 16:19:55 +02:00
Florian Renaud
97ade693f5 Add fake list of matrix users 2023-04-13 15:44:45 +02:00
Florian Renaud
0a926bd05a Navigate from people view to configuration view 2023-04-13 15:44:44 +02:00
Florian Renaud
546a795c21 Remove default onClick from MatrixUserRow 2023-03-23 11:46:56 +01:00
Maxime NATUREL
87e96d7ac9 Reuse fillMaxWidth on MatrixUserRow 2023-03-22 12:26:01 +01:00
Maxime NATUREL
080f3dc266 Using nullable onClick to avoid passing a new parameter 2023-03-22 12:26:01 +01:00
Maxime NATUREL
875b0f8f1f Present the last added user first 2023-03-22 12:25:59 +01:00
Maxime NATUREL
bc47691733 Adding checkbox in result when multi selection of users is enabled 2023-03-22 12:25:59 +01:00
Florian Renaud
02f2ace1e4 Merge pull request #211 from vector-im/feature/fre/start_chat_search_matrixid
[Start chat] Show a single result when searching for a matrixId
2023-03-21 13:58:24 +01:00
Benoit Marty
d651678718 Let coil use our OkHttpClient. 2023-03-16 15:31:57 +01:00
Florian Renaud
63aa5edf89 Merge remote-tracking branch 'origin/develop' into feature/fre/start_chat_search_matrixid 2023-03-15 11:23:46 +01:00
Florian Renaud
199dbcc126 Improve MatrixUserRow paddings 2023-03-14 17:07:38 +01:00
Florian Renaud
d04aae9475 Set avatar size value to dp 2023-03-14 15:23:29 +01:00
Florian Renaud
33890aca70 Show result when searching for matrix id 2023-03-13 15:29:28 +01:00
ganfra
8ccd21d856 [MatrixSDK] start mapping all the timeline objects 2023-03-10 18:32:46 +01:00
Benoit Marty
8faca4fdac Move class of matrix.api module to api sub package. 2023-03-02 17:32:47 +01:00
Benoit Marty
fbdc1a477a Split module matrix to matrix.api with interfaces and data classes and matrix.impl with Rust implementation. 2023-03-02 17:12:13 +01:00
Jorge Martin Espinosa
c20013243b Store session data in a secure way (#98)
* Replace SessionData DataStore with an encrypted SQLite DB.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-03-02 16:48:54 +01:00
Benoit Marty
0959f652a8 Add some previews. 2023-02-14 17:03:02 +01:00
Benoit Marty
35c7d4c132 Add Preview for timeline items. 2023-02-14 17:03:02 +01:00
Benoit Marty
ec687edc2d Extract Provider (and rename them) to their own file and move fixture(s) there. 2023-02-14 17:03:02 +01:00
Benoit Marty
f04f2dad9e Give the id to AvatarData to be able to compute initial properly. 2023-02-14 17:03:02 +01:00
Benoit Marty
d82e0e5d9e Enable Showkase for matrixui 2023-02-14 17:03:02 +01:00
Benoit Marty
e1b9d1da02 PreviewParameterProvider FTW 2023-02-14 17:03:02 +01:00
Benoit Marty
decd3a9585 ElementTheme + MaterialTheme3 2023-02-03 12:57:42 +01:00
Benoit Marty
fb4c5138ee Material3 only in designsystem. 2023-02-03 12:56:53 +01:00
Benoit Marty
2cfa921a70 Rework Preview for a better rendering in the IDE. 2023-02-03 12:56:53 +01:00
Benoit Marty
6e4edc8289 First draft of full custom theme.
ElementTheme everywhere

Create ElementButton
2023-02-03 12:55:36 +01:00
ganfra
c3dc122d27 Clean up 2023-02-01 16:02:54 +01:00
ganfra
085e5bebe4 Simplify AvatarData and avoid carrying ByteArray 2023-02-01 15:57:00 +01:00
ganfra
46e58fe64d enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") 2023-01-20 19:13:44 +01:00
ganfra
0a3697bfe8 Rename matrix modules 2023-01-20 17:27:47 +01:00
ganfra
c6cfe2b5e2 Rename di module 2023-01-20 17:12:40 +01:00
ganfra
7903e855ec Rename designsystem module 2023-01-20 17:09:12 +01:00
Benoit Marty
4732630d57 Do not use theme in the Preview, it breaks the screenshots building. 2023-01-18 15:29:07 +01:00
Benoit Marty
66a389c4c5 Rename folders java to kotlin 2023-01-18 13:51:30 +01:00
ganfra
1919058aac Apply ktlint format 2023-01-13 18:37:28 +01:00
ganfra
b286b8bf9d Add copyright on new files 2023-01-13 18:36:16 +01:00
ganfra
3abba8e88f Remove viewmodel/fragment references 2023-01-13 18:20:10 +01:00
ganfra
7b197e6e8b Finish migration of Messages screen 2023-01-13 18:05:14 +01:00
ganfra
c3ec363e77 Refactor where Dagger Components belongs (in node) 2023-01-12 21:14:48 +01:00
ganfra
f470f2a6af Make some data class @Immutable when needed 2023-01-11 17:08:56 +01:00
ganfra
7d65a4a1e7 Merge branch 'develop' into feature/fga/navigation First step: makes it compile by disabling the new screens (need to migrate to nodes) 2023-01-06 19:22:52 +01:00
Benoit Marty
243ee07bfc Fix warning 2022-12-23 15:19:24 +01:00