Commit Graph

168 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
6a75be7bf0 Room admins can change user roles (#2423)
Allow Admins to modify room member roles:

- Add a 'roles and permissions' option for each room.
- Allow promoting users to admins, adding or removing moderators, and demote yourself if you're and admin.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-03-05 16:46:47 +00:00
Jorge Martin Espinosa
87823fe8a4 Sort the room member list and display member roles (#2412)
* Sort the room member list and display member roles

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-19 15:03:36 +00:00
ganfra
e00311a739 Merge branch 'develop' into feature/fga/mark_room_as_favorite 2024-02-15 10:16:43 +01:00
Jorge Martin Espinosa
973c57d401 Update Compound to v0.0.5 and update icons (#2380)
Update Compound to `v0.0.5`:

- Make sure we fix all the breaking changes.
- Update some icons to use the compound version instead.
-Replace icons with their Compound counterparts when possible.
- Clean up unused icons.
- Fix issues with incorrect icons or sizes being used after replacing the temporary icons with the Compound ones.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-02-12 16:41:58 +00:00
Benoit Marty
ca91b23512 Add ability mark as unread / mark as read a room. 2024-02-08 11:33:43 +01:00
renovate[bot]
f36d3cae89 Update dependency org.matrix.rustcomponents:sdk-android to v0.1.96 (#2323)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.96

* Fixes for the SDK upgrade

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-01-31 11:07:34 +00:00
Jorge Martin Espinosa
7686fbbd07 Make the whole items in advanced settings screen clickable, standarize paddings (#2314)
* Make sure the whole item in advanced settings screen triggers the toggle action

* Fix UI changes when setting `onChecked` actions to null.

* Fix padding in invite member list items

* Remove redundant `CheckableUserRow` alternatives.

* Use 4dp for padding instead

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-30 11:39:04 +00:00
Benoit Marty
fe0e82b5d6 Map roomInfo.numUnreadNotifications to RoomSummaryDetails.numUnreadNotifications 2024-01-25 15:00:43 +01:00
Benoit Marty
cdbfe8f92c Fix API break: use new methods canUserRedactOwn and canUserRedactOther. 2024-01-23 13:32:13 +01:00
Benoit Marty
ca1f907ec5 Use new Rust fields numUnreadMessages and numUnreadMentions, and iterate on the room badge rendering. 2024-01-22 15:48:46 +01:00
Benoit Marty
31b2c55bee Remove default value of RoomSummaryDetails constructor, and iterate on fixture functions. 2024-01-19 16:46:42 +01:00
Benoit Marty
371aec4427 Remove RoomSummaryDetails.lastMessageTimestamp and replace by a getter on lastMessage 2024-01-19 16:11:10 +01:00
Benoit Marty
603b10264b Rename avatarURLString to avatarUrl 2024-01-19 15:58:37 +01:00
Benoit Marty
d3830af78b Fix ktlint issues 2024-01-10 19:33:39 +01:00
renovate[bot]
7e9cda3aa9 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Jorge Martin Espinosa
0e3f0ac6b5 Trim whitespace at the end of messages (#2169)
Trim whitespace at the end of messages
2024-01-05 12:40:10 +01:00
Jorge Martin Espinosa
ada16a8563 Revert "Room list badges" 2023-12-22 11:02:07 +01:00
Benoit Marty
e6ad262329 Iterate on indicators on room list #2079 2023-12-21 14:51:31 +01:00
ganfra
72cdc0eee0 Merge branch 'develop' into julioromano/poll_history_entry_point 2023-12-13 17:22:55 +01:00
Benoit Marty
0ccfa2a15b Load avatar for notification when there is no active imageLoader. (#1991) 2023-12-12 15:29:54 +01:00
ganfra
79d59eb5de PollHistory : simplify so we only have one Node. Also enrich PollHistoryState. 2023-12-06 19:27:50 +01:00
Benoit Marty
17bee2ee95 Ensure user display name is clipped to the Text area (#1950) 2023-12-05 17:20:58 +01:00
Jorge Martin Espinosa
a8b85fb4e6 Extract compound tokens and theming to compound-android library (#1888)
* Replace tokens & icons with the external Compound ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-27 10:30:07 +01:00
Benoit Marty
d29219169a Merge pull request #1862 from vector-im/feature/bma/moreTests
Remove lambda default value
2023-11-24 11:00:34 +01:00
Jorge Martin Espinosa
f55d347387 Add plain text representation of messages (#1850)
* Add plain text representation of messages.

This is used in the room list as the last message in a room, in the message summary when a message is selected, in the 'replying to' block, in the 'replied to' block in a message in the timeline, and in notifications.
2023-11-23 08:29:20 +01:00
Benoit Marty
ec2fa8b5a2 Merge pull request #1845 from vector-im/feature/bma/sendingStateA11y
Content description: add for sending state and fix other issues.
2023-11-22 17:51:48 +01:00
Benoit Marty
4ae0790cc1 Remove default value for lambda.
We enforce a value to be provided and it's better for code coverage.
2023-11-22 17:28:23 +01:00
Marco Romano
202173c8e3 Update poll icons from Compound (#1849)
* Use compound icons for polls

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-22 13:35:04 +01:00
Marco Romano
6441c54c8b Reply to a poll (#1848)
<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md) before submitting your pull request -->
 
## Type of change

- [x] Feature
- [ ] Bugfix
- [ ] Technical
- [ ] Other :

## Content

Polls can now be replied to.

## Motivation and context

User story: https://github.com/vector-im/element-meta/issues/1976

## Screenshots / GIFs

<!--
We have screenshot tests in the project, so attaching screenshots to a PR is not mandatory, as far as there
is a Composable Preview covering the changes. In this case, the change will appear in the file diff.
Note that all the UI composables should be covered by a Composable Preview.

Providing a video of the change is still very useful for the reviewer and for the history of the project.

You can use a table like this to show screenshots comparison.
Uncomment this markdown table below and edit the last line `|||`:
|copy screenshot of before here|copy screenshot of after here|

|Before|After|
|-|-|
|||
 -->

## Tests

<!-- Explain how you tested your development -->

- Step 1
- Step 2
- Step ...

## Tested devices

- [ ] Physical
- [ ] Emulator
- OS version(s):

## Checklist

<!-- Depending on the Pull Request content, it can be acceptable if some of the following checkboxes stay unchecked. -->

- [ ] Changes have been tested on an Android device or Android emulator with API 23
- [ ] UI change has been tested on both light and dark themes
- [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
- [ ] Pull request is based on the develop branch
- [ ] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#changelog
- [ ] Pull request includes screenshots or videos if containing UI changes
- [ ] Pull request includes a [sign off](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off)
- [ ] You've made a self review of your PR
2023-11-22 10:52:12 +01:00
Benoit Marty
5f8e85edc6 Prevent usage of hard-coded string for contentDescription, and fix existing issues. 2023-11-21 15:38:21 +01:00
Benoit Marty
d5d002ce5d Read receipt: Bottom sheet 2023-11-16 14:05:00 +01:00
Jorge Martin Espinosa
14cf2b0440 Iterate design on several screens: update icons, replace PreferenceTexts (#1771)
- Batch import new icons from the design team.
- Rename _september icons since they're just extra icons that need to be integrated in Compound in the future, and it should be ok if we don't distinguish between ic_september_*, ic_november_* etc., so all icons are now simply ic_* in the designsystem module.
- Create a new CompoundIconListPreviewProvider to add chunked lists of icons for previews. Add an exception for it to Konsist.
- Move some icons to use Compound icons.
- Remove most PreferenceText usages, use ListItem instead.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-15 10:52:37 +01:00
Benoit Marty
9af275b7cf Revert icon change for location. 2023-11-09 12:31:36 +01:00
Benoit Marty
344cad5341 Rename file. 2023-11-08 16:47:18 +01:00
Benoit Marty
e7a6e4039c Add preview for AttachmentThumbnail and fix issue rendering for AttachmentThumbnailType.Location for coherency. 2023-11-08 16:28:07 +01:00
Benoit Marty
d2483ea11a Use the blurHash if available, when the thumbnailSource is null, and if not available render the image icon for image file. 2023-11-08 15:34:06 +01:00
Marco Romano
d7ce326612 Show correct UI when replying to a voice message (#1658)
Shows voice messages in the room summary.
Shows voice messages in the reply context menu and composer.
Show replies to voice messages in the timeline. 

(before this PR voice messages were shown the same as audio messages)

Story: https://github.com/vector-im/element-meta/issues/2106
2023-10-27 11:30:57 +02:00
Benoit Marty
308a0c0f57 Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +02:00
Benoit Marty
99caa031e8 Replace mutableStateOf by mutableIntStateOf and mutableFloatStateOf. Use intValue and floatValue to avoid unboxing. 2023-09-26 18:07:53 +02:00
Benoit Marty
d2ca528679 Detekt: Rename DayNightPreviews to PreviewsDayNight to follow naming convention.
MultiPreview annotations should start with `Previews` as prefix
2023-09-21 08:30:36 +02:00
Benoit Marty
d6ea21da22 Migrate other icons to compound icons. 2023-09-20 16:44:59 +02:00
Benoit Marty
e326e49e4c Use DayNightPreview 2023-09-19 11:49:12 +02:00
Jorge Martín
19caf2e7a7 Create tests 2023-09-15 17:26:39 +02:00
Jorge Martín
41e614310f Changes:
- Improve UI to match designs.
- Extract `EditableAvatarView` component.
- Create `LabelledOutlinedTextField`.
- Get strings from Localazy.
2023-09-15 14:04:21 +02:00
Jorge Martin Espinosa
ddb8f66c32 Take screen density into account when requesting thumbnails (#1262)
* Take screen density into account when requesting thumbnails

Otherwise, we could be asking for images with N size while we needed images for N@2x or N@3x size i.e.
2023-09-11 15:24:56 +02:00
Benoit Marty
52853101d9 migrate object to data object (#1135) 2023-08-24 09:32:44 +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
ganfra
226a3dbf28 Feature/fga/sync states (#1042)
* Change RoomSummaryDataSource to RoomListService to better reflects the rust api

* Better Sync management

* Sync: improve sync spinner rendering

* Sync: make test compiles

* Sync: add more test for sync spinner

* Sync: more clean-up

* Sync: pr review

---------

Co-authored-by: ganfra <francoisg@element.io>
2023-08-09 12:37:43 +00: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
b2d3368f63 Allow user with enough power level to redact other's messages (#969) 2023-07-27 18:42:45 +02:00