Commit graph

97 commits

Author SHA1 Message Date
Benoit Marty
e1b528e861 Show current user in the settings and extract code in CurrentUserProvider. 2023-07-03 17:09:04 +02:00
Benoit Marty
b4a5128a05 Update preference header (still have to be displayed) 2023-07-03 17:09:04 +02:00
Chris Smith
11c7dc7db0 Move pin graphic/component to design system 2023-07-03 11:51:50 +01:00
Chris Smith
f5e57f1645 Show location replies per the designs 2023-06-30 16:14:44 +01:00
Jorge Martin Espinosa
683b0b3594 Link Compound's TypographyTokens to ElementTheme. (#700)
* Link Compound's `TypographyTokens` to `ElementTheme`.

Also add some docs about when we should use each set of tokens.

* Renamed `LocalColors` to `LocalLegacyColors`.

Made both `LocalLegacyColors` and `LocalCompoundColors` internal. This means it will need to always be used through `ElementTheme.`

Also, removed any usages of `LocalColors.current` accross the project, they're now used through `ElementTheme.legacyColors`.
2023-06-28 08:53:20 +00:00
Benoit Marty
5e455eccb6 Fix compilation issue after rebase 2023-06-27 19:49:14 +02:00
Benoit Marty
ee3e2108a0 Move all density unit calculation to the same place. 2023-06-27 19:43:03 +02:00
Benoit Marty
ddaf862764 Improve preview by adding Divider, and improve rendering. 2023-06-27 19:43:03 +02:00
Benoit Marty
e7072c2c4a Improve rendering when only one line is displayed. 2023-06-27 19:43:03 +02:00
Benoit Marty
92bd16832d Rework AvatarSize.
Remove default value for AvatarSize, it has to be explicitely provided.
2023-06-27 19:23:37 +02:00
Jorge Martin Espinosa
a16335b4b7 [Compound] Integrate compound tokens (#586)
* Added tokens.

* Apply color to MaterialTheme, also add typography.

* Map colors to the right ones in the themes.

* Create and improve previews of some components

* More preview improvements

* Add `tertiary` and `onTertiary` colors, remove some unused ones.

* Fix usage of deleted color token

* Fix bug in Switch previews

* Create a separate `:libraries:theme` module to keep everything related to colors, typography and Compound in general.

* Fix `DatePickerPreview`

* Add missing Compound generated files by fixing their package name

* Move `ElementTheme` to the `:libraries:theme` module, make some variables internal.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-27 16:15:40 +00:00
Benoit Marty
dfa1adb9c1 More cleanup 2023-06-27 09:51:33 +02:00
Benoit Marty
798da50454 Use CommonStrings everywhere 2023-06-27 09:45:00 +02:00
Benoit Marty
3652059a52 Lazy usage of OkHttpClient 2023-06-26 11:07:53 +02:00
Jorge Martin Espinosa
42827206b3 [Message Actions] Forward messages (#635)
* Add forwarding messages base

* Make forwarding single-selection

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-22 13:27:59 +02:00
ganfra
8e617b427d CanSendEvent default to true and branch refresh mechanism... 2023-06-21 17:43:08 +02:00
Benoit Marty
da110bd2c4 Extract getCanSendEvent to the matrixui module, rename to canSendEventAsState and use produceState. 2023-06-21 10:57:55 +02:00
ganfra
e817afef84 Media: introduce a Kind.File so we don't use In-memory bytearray in timeline 2023-06-15 12:06:58 +02:00
Jorge Martin Espinosa
c176eab4a3 [Message actions] New UI for replies (#545)
* Add 'reply to' UI to the message composer.

* Move the `BlurHashAsyncImage` to `:libraries:designsystem` as it is now used in several modules.

*  Create reusable `AttachmentThumbnail` and associated data classes and enums, it's now added to `:libraries:matrixui`.

* Re-use `AttachmentThumbnail` in a `ActionListView` and `TextComposer`.

* Add 'inReplyTo' models and UI.

* Add min size for images

* Create a separate layout for media items with no reply to info. Also, separate `Timeline__Row` components from `TimelineView`, as it was getting too large.

* Added `EqualWidthColumn` to use inside message bubbles. Also fixed some modifiers for media items replying to other messages.

* Disable `inReplyToClicked`.

* Remove unused resources and libraries.

* Remove any traces of `BlurHashAsyncImage` in `:features:messages`, since it was moved to the design system.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-08 12:15:13 +02:00
Chris Smith
7308428596 Use member count instead of counting members (#530)
Use member count instead of counting members

For the room details screen, use the member count as supplied by
matrix instead of waiting for the entire member list to be
retrieved and then manually adding up all the relevant users.

This removes the loading state of the member count, relying on
a spinner on the member list itself if the user actually wants
to see the members. (The performance of that will be improved
separately on the rust side in the future)

Closes #505
2023-06-06 10:40:17 +00:00
Chris Smith
354c943d0b Typo and minor formatting 2023-06-05 10:23:39 +01:00
Chris Smith
65ee568ccb SelectedUsers: Remember the layout calculations 2023-06-02 15:19:43 +01:00
Chris Smith
688be8568c Add a handle to the avatar bottom sheet 2023-06-02 14:24:16 +01:00
Chris Smith
aa6db5eeaf User row tweaks
- Make the checkbox non-clickable (the parent handles the clicks,
  and this stops the m3 lib padding it out to be a sensible touch
  target)
- Align and spread the text properly
- Change the default avatar size to match designs
2023-06-02 11:57:43 +01:00
Chris Smith
0c339846e1 Avatar actions: larger font 2023-06-01 16:55:23 +01:00
Chris Smith
c1eba96124 Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-01 16:50:34 +01:00
Florian Renaud
5d0fb45ff6 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
9827c30fc0 Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-01 13:26:27 +01:00
Jorge Martin Espinosa
664fcf782d Merge pull request #497 from vector-im/feature/jme/enable-gif-support
Enable gif support for Coil
2023-06-01 12:07:16 +02:00
Jorge Martin Espinosa
a36f4b7947 [Room details] Open room member details when clicking on user data in timeline (#482) 2023-06-01 12:03:27 +02:00
Chris Smith
a5849ca0bc Selected users: if scrollable, make last one peek
If there are enough selected users that they can't all be displayed,
add extra padding in between the users to ensure that the last
visible one is half visible to provide some scroll affordance.
2023-06-01 10:17:28 +01:00
Chris Smith
37d1a3b394 Selected user: scale and align cross properly
IconButton makes assumptions about the size of icons, which
we're not abiding by here. That makes it semeingly impossible
to properly center our icon. Instead, rewrite it as a surface
to ensure it's laid out properly
2023-06-01 10:15:56 +01:00
Chris Smith
b5ee444f78 Matrix user row: typography and alignment 2023-06-01 10:15:27 +01:00
Chris Smith
9f05802022 Checkable user row: fix uneven padding 2023-06-01 10:15:09 +01:00
Chris Smith
473bfd1e23 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
Jorge Martín
c749788677 Enable gif support for Coil 2023-05-31 16:46:58 +02:00
ganfra
b2a66ddafe Media: handle PR review remarks 2023-05-26 19:09:51 +02:00
ganfra
63513ae2da Merge branch 'develop' into feature/fga/image_loading 2023-05-22 20:59:37 +02:00
Chris Smith
848f1cb988 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
ganfra
5176499195 Media: fix encrypted media 2023-05-16 11:51:11 +02:00
ganfra
4236b69705 Introduce MatrixMediaSource 2023-05-05 19:47:10 +02:00
ganfra
c3a1297c18 Merge develop into feature/fga/image_loading 2023-05-05 12:51:00 +02:00
Chris Smith
581c5ab2d2 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
4b60b14550 Merge branch 'develop' into feature/fga/image_loading 2023-05-02 16:23:47 +02:00
ganfra
58e2c93018 Update tests and avoid useless recomposition 2023-05-02 13:04:00 +02:00
ganfra
23a7b871f7 RoomMembers: change the API again.. 2023-04-28 15:04:33 +02:00
ganfra
4b5ca3acdd Media: change the API 2023-04-27 12:06:01 +02:00
ganfra
c920dfb97a MediaResolver: exposes Result instead of Nullable 2023-04-26 16:13:09 +02:00
ganfra
1ab96e2f34 Some clean up 2023-04-25 11:17:05 +02:00
Florian Renaud
97a40b35df Update screenshots 2023-04-13 16:19:55 +02:00