Commit Graph

91 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
02fa8aaf46 Fix actions for redacted, not sent and media messages (#771)
* Fix actions for redacted, not sent and media messages

* Make `EventDebugInfoView` sections fill max width

* Don't display action list if there are no actions to display

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-07-05 14:08:17 +00:00
Marco Romano
f33561c25d Revert "Auto generate dark mode previews and screenshots (#776)" (#784)
This reverts commit 79b529193c.
2023-07-05 15:47:53 +02:00
Marco Romano
79b529193c Auto generate dark mode previews and screenshots (#776)
With this change, composable previews and screenshots should be created with just:
```
@ElementPreviews
@Composable
fun MyViewPreview() {
    ElementPreview { 
        MyView()
    }
}
```

- Adds `@ElementPreviews` which is a shorthand for:
```
@Preview(name = "D")
@Preview(name = "N", uiMode = Configuration.UI_MODE_NIGHT_YES)
```
Should be used in connection with the now public `fun ElementPreview()` composable.

- Adds ElementPreviews to previewAnnotations in dangerfile
- Screenshots of night mode previews are now rendered with night mode
- Replaces `ElementPreviewLight` and `ElementThemedPreview` with `ElementPreview`
- Deprecates `ElementPreviewDark` which should be removed.
- Remaining usages of `ElementPreviewDark` are now ignored during screenshot tests
2023-07-05 13:58:24 +02:00
Benoit Marty
12f50926de Merge pull request #755 from vector-im/feature/bma/scrollToBottom
Scroll to bottom
2023-07-03 18:20:32 +02:00
Benoit Marty
f3ea7ccbd4 TextComposer: change caret color to iconAccentTertiary 2023-07-03 14:25:43 +02:00
Chris Smith
5b35bb4277 Merge pull request #740 from vector-im/feature/cjs/location-replies
Show location replies per the designs
2023-07-03 12:52:28 +01:00
bmarty
bd3dd76039 Sync Strings from Localazy 2023-07-03 00:11:17 +00:00
Chris Smith
bd0e24598a Show location replies per the designs 2023-06-30 16:14:44 +01:00
Benoit Marty
f54841d48c Show keyboard when entering special mode (edit/reply/etc.) 2023-06-29 18:17:37 +02:00
Benoit Marty
ff13651b4c When composer does not have focus, hide border. 2023-06-29 18:17:37 +02:00
Benoit Marty
ad1b5700ab Composer placeholder ("Message") color changed to textDisabled 2023-06-29 18:17:37 +02:00
Benoit Marty
dd708abddf Animate rounded corner size change to avoid blink effect when changing number of lines from 1 <-> 2 in the composer. 2023-06-29 18:17:37 +02:00
Benoit Marty
6669c6a3c5 Dsign for editing section in composer and increase click area for the close button. 2023-06-29 18:17:37 +02:00
Benoit Marty
139d041640 Fix send attachment icon color (and remove useless Box) 2023-06-29 18:17:37 +02:00
Benoit Marty
03d00b46b8 Fix send message icon color 2023-06-29 18:17:37 +02:00
Benoit Marty
63bba7c2c2 Fix color for composer. 2023-06-29 18:17:37 +02:00
Benoit Marty
720f5eb188 Text style for reply to in timeline and in composer. 2023-06-29 18:17:37 +02:00
Chris Smith
f7d498599b Show a prompt to reinvite other party in a DM
If you are looking at a DM where the other party has left then
when you focus the composer for the first time we'll show a
dialog asking if you want to reinvite the other party.

Closes #590
2023-06-28 17:20:51 +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
5a59529768 Improve rendering of message reply preview. 2023-06-27 19:48:31 +02:00
Benoit Marty
a8cc935a82 Fix color of reply body preview. 2023-06-27 19:43:03 +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
ed264f23b7 StringR -> CommonStrings 2023-06-27 16:11:32 +02:00
Benoit Marty
5f16297939 Merge branch 'develop' into feature/bma/removeOldResources 2023-06-27 16:09:30 +02:00
Benoit Marty
77e033372f More cleanup 2023-06-27 13:38:55 +02:00
Benoit Marty
4cb9843415 Now that the composer as been removed, we do not need element resource module anymore. 2023-06-27 13:34:55 +02:00
Benoit Marty
4a8c49fa28 Use CommonStrings everywhere 2023-06-27 09:45:00 +02:00
bmarty
9c5c578c67 Sync Strings from Localazy 2023-06-26 00:10:53 +00:00
Jorge Martin Espinosa
ec9f0e2869 Set max lines to 2 in replies for composer (#645)
* Set `maxLines = 2` for the composer message preview in replies

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-20 17:07:53 +02:00
github-actions[bot]
3f7738c001 Sync Strings (#630)
* Sync Strings from Localazy

* Update strings, remove broken German translation

* Update screenshots

---------

Co-authored-by: bmarty <bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-19 11:18:01 +00: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
Jorge Martin Espinosa
595fbda220 [Message actions] New UI for message composer and editing (#526)
* Add UI for edit composer mode

* Remove leftover code from the RTE implementation

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-07 13:06:19 +02:00
github-actions[bot]
03c28ac52d Sync Strings (#522)
Sync Strings from Localazy
2023-06-05 15:26:50 +00:00
bmarty
3daea29a82 Sync Strings from Localazy 2023-05-29 00:09:47 +00:00
Benoit Marty
d6e60de4ec Fix compilation issue with Wysiwyg 2.2.0 2023-05-23 11:55:23 +02: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
Jorge Martin Espinosa
8e451c934e Add PickerLauncher wrapper for media/file pickers. (#361)
* Add `PickerLauncher` wrapper for media/file pickers.

* Add FileProvider path, handle Camera picker and add NoOp implementation to fix tests.

* Move media pickers to their own module.

* Add missing media pickers

* Add feature flag and some extra tests
2023-04-28 10:52:34 +02:00
bmarty
cd5e4458a6 Sync Strings from Localazy 2023-04-24 00:09:54 +00: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
Benoit Marty
830946e0de Ensure ellipsis char is used (fix lint issue). 2023-04-05 11:44:55 +02:00
Benoit Marty
45cea6cc3b Invoke ./tools/localazy/downloadStrings.sh --all 2023-04-05 11:11:47 +02:00
Benoit Marty
c774f7529e [Strings] Use strings from localazy. 2023-03-27 14:44:24 +02:00
Benoit Marty
d449ede86d [Strings] Sync the strings. 2023-03-27 14:36:46 +02: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
Benoit Marty
41e63173b3 Make @Preview internal.
And exclude class generated by Showkase
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
c4f53134d9 Material 1.8 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