Commit Graph

116 Commits

Author SHA1 Message Date
Benoit Marty
fce5234c7f Fix compilation issue 2023-07-20 20:01:35 +02:00
Benoit Marty
c72f1a09a7 Enable detekt rules UnnecessaryParentheses and cleanup the code. 2023-07-20 18:08:08 +02:00
ganfra
888ca1c86b Merge branch 'develop' into feature/fga/power_level 2023-07-18 22:54:33 +02:00
ganfra
e00462900e PowerLevel: use new api exposed from rust which doesn't need to load members. 2023-07-18 15:10:44 +02:00
ganfra
7e5d339922 Media: render audio content 2023-07-13 18:09:58 +02:00
Benoit Marty
8893a8bfdc Fix crash at first startup. Inject NotLoggedInImageLoaderFactory directly to NotLoggedInFlowNode 2023-07-12 15:32:00 +02:00
Benoit Marty
e8ba2b2e06 Cleanup import. 2023-07-11 11:29:56 +02:00
Benoit Marty
d60a590cb5 Fix regression on some colors. Introduce a temporary color, since the color values are not in Compound. temporaryColorBgSpecial 2023-07-11 10:29:06 +02:00
Benoit Marty
5f3ba74f30 Remove fontSize parameter. Must use style only. 2023-07-10 17:33:42 +02:00
Benoit Marty
277595412f Remove lineHeight parameter. Must use style only. 2023-07-10 17:33:42 +02:00
Benoit Marty
f0d3b9da53 Remove fontWeight parameter. Must use style only. 2023-07-10 17:33:42 +02:00
Benoit Marty
9b042cf056 Remove ElementColors. We should use semantics and material colors now. 2023-07-10 17:33:42 +02:00
ganfra
8667784271 AwaitRoom : create loading state with placeholders 2023-07-05 12:42:01 +02:00
Benoit Marty
8e36776c5f Add todo to explain why code is commented out. 2023-07-03 17:09:04 +02:00
Benoit Marty
7f79cba40d Fix modifier issue. 2023-07-03 17:09:04 +02:00
Benoit Marty
002ddf4f3f Show current user in the settings and extract code in CurrentUserProvider. 2023-07-03 17:09:04 +02:00
Benoit Marty
0c29852d62 Update preference header (still have to be displayed) 2023-07-03 17:09:04 +02:00
Chris Smith
330e786d0d Move pin graphic/component to design system 2023-07-03 11:51:50 +01:00
Chris Smith
bd0e24598a Show location replies per the designs 2023-06-30 16:14:44 +01:00
Jorge Martin Espinosa
c5a5810c05 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
c7ec8bc9e9 Fix compilation issue after rebase 2023-06-27 19:49:14 +02:00
Benoit Marty
8cdcaba9e3 Move all density unit calculation to the same place. 2023-06-27 19:43:03 +02:00
Benoit Marty
192d32061d Improve preview by adding Divider, and improve rendering. 2023-06-27 19:43:03 +02:00
Benoit Marty
f1ef67e736 Improve rendering when only one line is displayed. 2023-06-27 19:43:03 +02:00
Benoit Marty
d6f2d7a5d3 Rework AvatarSize.
Remove default value for AvatarSize, it has to be explicitely provided.
2023-06-27 19:23:37 +02:00
Jorge Martin Espinosa
02dc447624 [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
287328f7df More cleanup 2023-06-27 09:51:33 +02:00
Benoit Marty
4a8c49fa28 Use CommonStrings everywhere 2023-06-27 09:45:00 +02:00
Benoit Marty
12e54ac080 Lazy usage of OkHttpClient 2023-06-26 11:07:53 +02:00
Jorge Martin Espinosa
de7bbbd5cf [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
b3e11d184a CanSendEvent default to true and branch refresh mechanism... 2023-06-21 17:43:08 +02:00
Benoit Marty
02c56df991 Extract getCanSendEvent to the matrixui module, rename to canSendEventAsState and use produceState. 2023-06-21 10:57:55 +02:00
ganfra
022e4645b4 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
25c32cb1e8 [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
b6e45c976f 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
e3fb510af4 Typo and minor formatting 2023-06-05 10:23:39 +01:00
Chris Smith
ecf7e291b7 SelectedUsers: Remember the layout calculations 2023-06-02 15:19:43 +01:00
Chris Smith
8c3b01e9f2 Add a handle to the avatar bottom sheet 2023-06-02 14:24:16 +01:00
Chris Smith
83add736c5 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
3e2612dd9c Avatar actions: larger font 2023-06-01 16:55:23 +01:00
Chris Smith
6f7200c59a Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-01 16:50:34 +01:00
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
fb147f78b0 Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-01 13:26:27 +01:00
Jorge Martin Espinosa
72fcd1e946 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
b50350aaa0 [Room details] Open room member details when clicking on user data in timeline (#482) 2023-06-01 12:03:27 +02:00
Chris Smith
f0a3981df5 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
9515435102 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
e8c4387bef Matrix user row: typography and alignment 2023-06-01 10:15:27 +01:00
Chris Smith
d6d273992d Checkable user row: fix uneven padding 2023-06-01 10:15:09 +01: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