Commit Graph

101 Commits

Author SHA1 Message Date
bmarty
e196d951f8 Sync Strings from Localazy 2023-07-24 00:10:09 +00:00
Marco Romano
278f8ae4c6 Send My Location (#770)
- https://github.com/vector-im/element-meta/issues/1682
2023-07-19 09:58:13 +00:00
ganfra
f7c55f8d04 Merge branch 'develop' into feature/fga/better_media_handling 2023-07-18 15:13:59 +02:00
Benoit Marty
f292c433ec Remove StableCharSequence, it was useful when we were using the Epoxy library. 2023-07-17 16:47:54 +02:00
Benoit Marty
dafc8d5ebe Merge pull request #859 from vector-im/feature/bma/transactionId
Create value class for transactionId
2023-07-17 11:28:42 +02:00
Marco Romano
a1ca7cf2ca Extract MessageComposerContext class from MessageComposerPresenter (#876)
When sending "Composer" analytics from screens other than the composer's (e.g. send location from map) we need to know the composer's mode in order to properly fill the analytics event. `MessageComposerContext` hoists this state so that other presenters can also read it.

Related to:
https://github.com/vector-im/element-meta/issues/1674
https://github.com/vector-im/element-meta/issues/1682
2023-07-14 11:32:09 +00:00
ganfra
7e5d339922 Media: render audio content 2023-07-13 18:09:58 +02:00
Benoit Marty
771a4ecdd3 Create value class for transactionId. There is no validation on the format, but validation is a bonus for userId, roomId, etc.
The main advantage of using value classes instead of Strings everywhere is to detect errors at compilation time.
2023-07-12 18:15:17 +02:00
Benoit Marty
7be0e3ea4b Remove ElementTextStyles. Only ElementTheme.typography.* styles must be used now. 2023-07-10 17:33:42 +02:00
Marco Romano
220a6087f9 Use @DayNightPreviews to correctly render the PinIcon in dark mode (#795)
- Fixes rendering of `-night` resources in screenshot tests by overriding the `nightMode` with `paparazzi.unsafeUpdateConfig()`.
2023-07-07 16:35:34 +02:00
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