Commit Graph

359 Commits

Author SHA1 Message Date
Benoit Marty
a79e3d41d6 Compute avatar color of users and apply foreground color to the sender displayname. 2023-09-05 12:23:42 +02:00
Benoit Marty
9db45a997d Compute avatar color of users and apply foreground color to the sender displayname. 2023-09-05 12:10:30 +02:00
Marco Romano
88eda62f56 New icon for "poll end" in both action menu and timeline item. (#1203)
- Also fixes preview of action list (reply is included as it will soon be added).
2023-08-31 15:40:51 +02:00
Marco Romano
d736261317 Poll end (#1182)
- Adds an "End Poll" item in the action list long press menu.
  - Shows only on remote polls that have not ended yet and only if the user is the creator or has redact powers.

Closes https://github.com/vector-im/element-meta/issues/2026
2023-08-31 14:39:11 +02:00
Benoit Marty
e67c7ac9f1 Merge pull request #1177 from vector-im/feature/bma/analyticsSettingLink
Fix issue on analytics setting link
2023-08-30 11:16:46 +02:00
Jorge Martin Espinosa
400315e39a Make sure Snackbars are only displayed once (#1175)
* Make sure Snackbars are only displayed once

* Use a queue instead

* Fix docs

* Add tests for `SnackbarDispatcher`.
2023-08-30 10:43:23 +02:00
Benoit Marty
bae963c4bc Reorder params. 2023-08-30 10:28:44 +02:00
Jorge Martín
0a77590e76 Split link text into a ListSupportingText component.
This also requires some internal changes to `ListSupportingText`, `ClickableLinkText` and `TimelineTextView` to match the behaviour and design.
2023-08-30 09:33:53 +02:00
Benoit Marty
88786cdda6 Use buildAnnotatedStringWithStyledPart and remove copied code. 2023-08-29 16:38:21 +02:00
Benoit Marty
56c637ce7d Merge branch 'develop' into feature/bma/settingUpAccount 2023-08-28 13:02:44 +02:00
Benoit Marty
1a6376e723 Merge branch 'develop' into feature/bma/dataObject 2023-08-28 10:56:02 +02:00
Benoit Marty
a2a9fda583 Add preview for SunsetPage and fix warnings about Modifiers. 2023-08-25 14:38:34 +02:00
Benoit Marty
4ecd4c636f Extract Composable to new SunsetPage. 2023-08-25 13:49:40 +02:00
Florian Renaud
9999b95852 Merge pull request #1113 from vector-im/feature/fre/improve_poll_event_timeline_rendering
[Poll] Render ended poll and improve UI in the timeline
2023-08-25 10:14:15 +02:00
Florian Renaud
87e314fe4d Use a single preview for radio buttons with checked & unchecked states 2023-08-25 09:01:20 +02:00
Marco Romano
9942710207 ListItem: Don't apply clickable modifier if onClick is null. (#1146)
If it is applied but disabled (like before this PR) it will hijack all touch input from the view and no other component in it can respond to clicks.
2023-08-24 15:11:13 +00:00
Jorge Martin Espinosa
7f50671a45 Improve list items: add lists to dialogs, rework ListItem customizations (#1119)
* Improve list items:

- Create `ListItemContent`.
- Create `ListItemStyle`.
- Apply those to `ListItem` components.
- Create helper list item components for checkboxes, switches, radio buttons.
* Create single/multiple selection dialogs.
* Create `SingleSelectionListItem` and `MultipleSelectionListItem`
- Add `subtitle` to `AlertDialogContents`.
- Fix paddings and margins inside dialogs.
- Add `ListOption`.
* Adds small delay before hiding the single selection dialog.
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-24 15:11:05 +02:00
Florian Renaud
ebf6a98c34 Merge remote-tracking branch 'origin/develop' into feature/fre/improve_poll_event_timeline_rendering 2023-08-24 14:42:16 +02:00
Benoit Marty
52853101d9 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
Benoit Marty
9c46ac8f5c Merge pull request #1112 from vector-im/feature/bma/fixButtonTheme
Fix button theme
2023-08-23 13:16:26 +02:00
Benoit Marty
8c9643f8b8 Simplify code (code review). 2023-08-22 18:10:49 +02:00
Jorge Martin Espinosa
e45b15165a Make links in messages clickable again (#1115) 2023-08-22 15:21:43 +02:00
Florian Renaud
161402d501 Improve previews 2023-08-22 10:55:17 +02:00
Florian Renaud
91e92a5cc4 Use custom RadioButton 2023-08-22 10:55:17 +02:00
Benoit Marty
448e526ffa Button theme: fix small integration mistake on button padding from Figma. 2023-08-22 10:38:24 +02:00
Benoit Marty
a88b3699a3 Code clarity (no change effect): always use when with ButtonStyle.Filled, ButtonStyle.Outlined and ButtonStyle.Text cases. 2023-08-22 10:17:55 +02:00
Jorge Martin Espinosa
1092e0bed9 Linkify raw links in HTML message contents (#1102)
* Linkify links in HTML too:

- Creates a `ClickableLinkText` for `String`.
- Adds a `linkify` parameter to the original function, which is `true` by default.
- Does the linkify logic inside that component, if `linkify` is true.

* Add changelog

* Make sure we don't linkify user mentions or room aliases.

* Use remember to avoid re-processing the text for no reason.
2023-08-21 16:31:01 +02:00
Jorge Martin Espinosa
b36667844d [Compound] Platform components (Lists) (#990)
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-21 10:34:57 +02:00
Benoit Marty
9c60f78c86 Missing cleanup 2023-08-17 18:02:52 +02:00
Jorge Martín
8afc103c1d Fix snackbar padding 2023-08-17 16:01:59 +02:00
Jorge Martin Espinosa
e3cfbc113b Upgrade compose-material3 to 1.2.0-alpha05 version (#1011)
Co-authored-by: ElementBot <benoitm+elementbot@element.io>

Also upgrade compileSdk to 34.
2023-08-17 14:20:54 +02:00
Florian Renaud
1083b431b6 Add feature flag for polls (#1064)
* Handle poll events from the sdk

* Render started poll event in the timeline

* Create poll module

* Check poll kind before revealing the results

* Check if user has voted before revealing the results

* Add active poll previews

* Minor cleanup

* Update todos

* Fix CI

* Remove hardcoded string

* Update preview

* changelog file

* Update screenshots

* Use CommonPlurals

* Set poll root view as selectableGroup

* Improve poll result rendering

* Update screenshots

* Add missing showkase processor

* Update screenshots

* Add feature flag for polls

* Add supporting text in PreferenceCheckbox

* Render poll events if feature flag is enabled

* changelog

* Update screenshots

* Fix tests

* Move feature flag check to poll factory

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 15:14:38 +00:00
Jorge Martin Espinosa
9cb2424101 Add workaround for blur in ElementLogoAtom for OS < 9. (#1061)
* Add workaround for blur in `ElementLogoAtom` for OS < 9.

* Update screenshots

* Pass `useBlurredShadow` to `ElementLogoAtom`

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 15:13:49 +00:00
Florian Renaud
f2d1658ffa "View only" polls in the timeline (#1031)
* Handle poll events from the sdk

* Render started poll event in the timeline

* Create poll module

* Check poll kind before revealing the results

* Check if user has voted before revealing the results

* Add active poll previews

* Minor cleanup

* Update todos

* Fix CI

* Remove hardcoded string

* Update preview

* changelog file

* Update screenshots

* Use CommonPlurals

* Set poll root view as selectableGroup

* Improve poll result rendering

* Update screenshots

* Add missing showkase processor

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 14:19:12 +00:00
Jorge Martin Espinosa
e248920909 [Compound] Implement Snackbars based on designs (#1054)
* Make `InternalButton` internal instead of private so it can be customised.

Also, change the `ButtonColors.contentColor` for text buttons to `LocalContentColor.current` by default.

* Add temporary color for Snackbar action label

* Implement `Snackbar` component based on Compound

* Propagate changes to all other components

* Use right Preview annotation config

* Move `ButtonVisuals` to their own file

* Update screenshots

* Make previews internal

* Update screenshots

* Set a custom token for contentColor in AppBars

* Change 'Label' to 'Action' in the previews

* Add changelog

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 10:38:28 +00:00
Jorge Martin Espinosa
53e80e6b5d [Compound] Implement DropdownMenu customisations. (#1050)
* Compound: implement `DropdownMenu` customisations.

* Update screenshots

* Add changelog

* Address review comments

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-11 13:09:51 +00:00
Jorge Martin Espinosa
37a4d49494 [Compound] Implement dialogs (#1043)
* Implement dialogs following Compound tokens

* Update screenshots

* Fix confirmation dialog preview

* Update screenshots

* Add changelog

* Add Figma designs link

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-11 12:44:40 +00:00
Jorge Martin Espinosa
0773e99216 [Compound] implement IconButton changes (#1049)
* Compound: implement IconButton changes.

* Use `LocalContentColor` for tinting

* Update screenshots

* Add changelog

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-11 10:01:18 +00:00
Jorge Martin Espinosa
af932b31c4 [Compound] Implement components (Button) (#1021)
* Create `CompoundButton`

* Some fixes

* Lint fixes

* Start replacing existing `Button` usages

* Replace button usages

* Remove previous Button composable

* Rename `CompoundButton` to `Button`

* Fix emphasized button being displayed as Text

* Fix cancel button in `WaitListView`

* Update screenshots

* Add shorthand functions for `OutlinedButton` and `TextButton`

* Add changelog

* Fix wrong size used for emphasized button in dialog

* Create a private `ButtonInternal` implementation with the shared logic.

- Make `ButtonStyle` private.
- Rename `title` to `text`.
- Rename `buttonStyle` and `buttonSize` to just `style` and `size`.

* Fix several warnings and lint issues.

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-08 16:11:37 +00:00
Jorge Martin Espinosa
75137c1469 Fix detekt issues in develop (#1004)
Co-authored-by: Marco Romano <marcor@element.io>
2023-07-31 14:01:08 +02:00
Benoit Marty
70787a0345 Merge pull request #986 from vector-im/feature/bma/bigFontSizeImprovement
Big font size improvements
2023-07-28 17:02:29 +02:00
Benoit Marty
d06f86f79d Merge pull request #967 from vector-im/feature/bma/detektConfig
Update detekt config.
2023-07-28 16:47:26 +02:00
Benoit Marty
8dd1aeabff fix typo 2023-07-28 16:34:37 +02:00
Benoit Marty
4d7307bae2 Showkase does not take into account the fontScale parameter of the Preview annotation, so alter the LocalDensity in the CompositionLocalProvider. 2023-07-28 16:08:38 +02:00
Benoit Marty
0b5a3c56d6 Update the API and add UI screenshots demoing it. 2023-07-28 10:29:13 +02:00
Benoit Marty
bfb27db58b Move extension to dedicated file. 2023-07-28 10:01:22 +02:00
Benoit Marty
d46a79316e Auto capitalize first letter of sentences for messages, room topic and bug report description. (#948) 2023-07-27 17:13:42 +02:00
Benoit Marty
5047136a7b Merge pull request #983 from vector-im/feature/bma/lintErrors
Update lint rules, remove unused resource and sync strings.
2023-07-27 15:59:38 +02:00
Benoit Marty
1d89584daf Improve rendering of Text composer regarding fontScale. (#984) 2023-07-27 15:45:02 +02:00
Benoit Marty
96b7923979 Improve rendering of "All chats" regarding fontScale. (#984) 2023-07-27 15:44:56 +02:00