671 Commits

Author SHA1 Message Date
Mauro
7f6ea1c2ae
Join room by address (#3840)
* Implemented join room by address

* improved the text field typing

* some improvements to how the text is edited

* remove navigation link

* moved room directory search to the start chat flow

* updated preview tests

* added unit tests and improved the code

* updated strings

* some pr suggestions:

- moving the file
- changing the name of the action
- reintroduce the debounce text queries
- add comments

* renamed the auth text field style to Element

updated tests
2025-02-28 12:35:15 +00:00
Mauro Romito
14fa7d87fc show "Room" for unresolved event permalinks 2025-02-28 11:53:33 +01:00
Stefan Ceriu
5b2f6cfbf4
Show DM recipient verification badges on the room details screen profile button (#3824) 2025-02-26 13:55:59 +02:00
Mauro
a2242c63e2
Render Room and Message Pills (#3809)
* added a way to render the room and the message

pills, but is WIP

* permalinks now get converted into pills!

* fixed an issue where room address mentions

were not adding a URL properly but a string

* updated tests

* c

* Revert "c"

This reverts commit 5c80252fa23dba7e4d44f2a07fbf1e9500e37c82.

* updated tests

* more tests

* created APIs to get a specific RoomSummary

given the id or the alias

* small mention builder improvement

* pr suggestions
2025-02-25 13:46:01 +00:00
Doug
3884b83ff6
Don't set the room topic when creating a room if it is blank. (#3821)
* Don't set the room topic when creating a room if it is blank.

Also fix the styling on the room name text field.

* Snapshots

* Add a test for the empty topic.
2025-02-25 11:10:59 +00:00
Doug
d325adb4fc
Hide the unread dot after previewing an invite. (#3800)
* Hide the unread dot when previewing an invite.

* Remove an invited room ID when accepting/rejecting.

* Remove the unread badge from knocked room cells.

* Update snapshots.

* Address PR comments.

Refactor KnockRequestType to JoinRequestType.
2025-02-18 12:22:13 +00:00
Doug
8c07ee35c4 Update the SDK.
Handles changes that removed support for the sliding sync proxy.
2025-02-18 11:55:20 +00:00
Stefan Ceriu
f77faee981
User verification state indicators (#3793)
* Introduce a `UserIdentityProxy` and have it combine upstream methods into an easy to digest  `UserIdentityVerificationState`. Use it in a dedicated `VerificationBadge` UI component

* Show a DMs counterpart verification state in the room header

* Show a warning on the room details `People` entry when there are identity verification state violations on any of the members.

* Show verification badges in the room member list

* Show a withdraw verification section on the room member details for users that have pinning violations.

* Remove the verification section from the profile screen as there's no reliable way to keep it up to date
- the underlying Rust SDK Olm Machine can be rebuilt without notice which would break any existing user identity change streams.

* Update preview test snapshots
2025-02-18 08:37:34 +02:00
Vickcoo
4b43d901f8
Fix message completion trigger to work anywhere in the message (#3696)
* Fix message completion trigger to work anywhere in the message

* Add tests for display suggestion in difference message positions

* Fix suggestion trigger could support multiple mention symbol

* Remove optional parameter type and tweak argument name to hide

* Optimize the suggestions trigger using regex

* Fix the cursor at wrong position after selected suggestion

* Modify the rawSuggestionText pass data in right way

* Modify mention symbol to use regex type

* Update ElementX/Sources/Screens/RoomScreen/ComposerToolbar/CompletionSuggestionService.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update generated mock

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2025-02-13 15:13:09 +00:00
Doug
8ee1427809
Update our development assets. (#3783)
* Replace downloaded test assets with original content.

* Replace AI generated assets with original content.

* Update preview tests snapshots

* Update UI test snapshots.

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2025-02-11 11:53:35 +00:00
Doug
f6a1d38972
Log whether a notification is expected to make a noise. (#3782)
* Log whether a notification is expected to make a noise.

* Also log the system notification sound setting too.
2025-02-11 09:59:46 +00:00
Stefan Ceriu
8680d8437b
Add support for initiating and responding to user verification requests (#3759) 2025-02-10 18:07:11 +00:00
Mauro
22d0fae423
Knock Polishing part 4 (#3779)
* added decline and block and inviter redesign

* improved testing

* improved testing

* code improvement

* code improvement

* improved the code
2025-02-10 17:31:12 +00:00
Stefan Ceriu
922ebf47e6
Fix some concurrency warnings, update missed licence headers. (#3741)
* Switch the TimelineController to an async sequence and fix the warnings on the UserIndicatorController
2025-02-06 11:35:23 +02:00
Doug
cfaa1b455a
Use the new preview screen when tapping media on the room and pinned events screens. (#3736)
* Use the new TimelineMediaPreview modifier on the room and pinned timeline screens.

* Use the same presentation logic for all timeline media previews.

* Fix a bug with the detection of the timeline end.

* Send pagination requests from the media preview screen.

* Add SwiftLint to the Danger workflow (it is no longer installed on the runner).

* Put SwiftLint back on all of the GitHub runners too.

* Set the function_parameter_count lint rule to 10.

* Make sure to clean-up any previews when the coordinator is done.

* Handle the viewInRoomTimeline action more appropriately.
2025-02-05 13:27:23 +00:00
Doug
bad4a8f9c8
Refactor Rust timeline identifiers into our own. (#3731)
* Refactor eventOrTransactionID.

* Refactor uniqueID.
2025-02-04 09:50:46 +00:00
Doug
d195e603c9
RoomTimeline… refactor (drop the Room). (#3728)
* Add the timeline controller factory to the timeline view model.

In preparation for building a timeline to swipe through media in QuickLook.

* Refactor RoomTimelineControllerFactory.

* Refactor RoomTimelineController.

* Refactor RoomTimelineProvider.
2025-02-03 14:14:01 +00:00
Doug
6cd583d904
Revert back to UIKit for the presentation of the timeline media preview. (#3719)
* Revert back to UIKit for the presentation of the timeline media preview.

* Fix a presentation issue where the media is clipped until the animation finishes.

* Workaround for the preview controller replacing the info button when swiping.

* Use a self-sizing detent on the media info sheet.
2025-01-31 17:28:14 +00:00
Doug
d412c10352
Detect the timeline start/end when swiping through media files. (#3714) 2025-01-29 15:07:23 +00:00
Stefan Ceriu
df997ad251 Fix flakey user indicator controller tests; switch them over to the deferred fulfillment. 2025-01-28 12:55:37 +02:00
Stefan Ceriu
d585e208a1
Bump the RustSDK to 25.01.27, adopt the new emoji boosting API. (#3708)
* Bump the RustSDK to v27.01.22, adopt the new emoji boosting API.

* SDK version 25.01.22 😅

---------

Co-authored-by: Doug <douglase@element.io>
2025-01-27 17:49:44 +00:00
Doug
c6338064b6
Media Browser: Listen to the timeline in the preview screen (#3707)
* Listen to the timeline to load more items in the media preview screen.

* Fix the view model tests.

* Fix tests
2025-01-27 16:22:49 +00:00
Doug
62611be006
Show a blank topic as removed. (#3706) 2025-01-27 11:44:21 +00:00
Mauro
3162bf7dcc
Better handling for editing alias in case of different HS (#3695)
* better handling for aliases from different HS

* insert the alias at the top

* removing the old homeserver alias

* code improvement

* always remove the old canonical alias found on the server if exists

* added extensive testing for all the

possible cases on how the save is handled given the various context of the existing room alias
2025-01-22 17:33:43 +00:00
Doug
909ee4abf2
Media browser tweaks (#3692)
* Move the media actions from the bottom bar into the details sheet.

* Allow the media type picker to fill the width of the screen.
2025-01-21 17:00:04 +00:00
Stefan Ceriu
8577f53613
Refactor the JoinRoom screen to take advantage of newer APIs and support more joinRule/membership combinations (i.e. invite required, restricted, banned) (#3685)
- expose the full RoomPreview and RoomMembershipDetails through their own proxies
- implement standard mocks for all the different combinations
- converge on a single room info provider
- rebuild all the previews
- prioritise the preview data over the room one.
2025-01-20 19:07:11 +02:00
Valere
f20847f62b
Warn and block sending on verification violation (#3679)
* feat(crypto): Warn and block sending on verification violation

* fixup: Fix ComposerToolbar previews

* fixup! add ComposerToolBarViewModelTests for canSend

* add new preview tests for verification violations

* Use `deferFulfillment`s in the unit tests.

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-01-20 18:29:34 +02:00
Stefan Ceriu
0fd8df52ab
Improve how alias settings are handled, add unit tests (#3686) 2025-01-20 15:43:47 +02:00
Stefan Ceriu
0bcc59ae0a Bump the RustSDK to v25.01.15 and fix (most) concurrency sendability warnings in the generated mocks. 2025-01-15 14:59:54 +02:00
Mauro
e3ad925285
Security and privacy part 2 (#3637)
* handling the history visibility flag

* better logic to handle visibility

* better handling of the visibility options state

* added some copies, and the public room directory

visibility state

* completed the UI

added also the preview tests

* improved the handling of the directory visibility

* added the space users case

and improved handling of the access -> vsibility reaction. Also added a simple error handling for the public directory toggle

* added the edit room address view

but is missing its full implementation

* implement the UI for the edit room address screen

* implemented error checking

when editing the address

* updated preview tests and improved code

* typo fix

* Fix various issues after rebasing.

* Fix build errors and broken snapshot tests

* Adopt latest room privacy and canonical alias setting APIs

* Add support for creating and editing the room's alias.

* Add support for saving room privacy setting changes.

* Fix room alias screen snapshot tests following recent changes.

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-01-15 11:50:08 +02:00
Stefan Ceriu
57b85d2650 Move tracing configuration to the rust side. 2025-01-10 19:09:52 +02:00
Doug
7ca44a043b
Add the event cache to the Rust tracing configuration. (#3662) 2025-01-06 12:58:41 +00:00
manuroe
3950cac085
Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
536f01abbd
Retrofit deferFulfillment onto snapshot tests. (#3641)
* Retrofit `deferFulfillment` onto snapshot tests.

* Convert a bunch of preview tests to the new fulfillment publisher

* Convert more tests

* Remove unneeded delays from the remaining tests

* Remove snapshotting delay option.
2024-12-20 15:30:59 +02:00
Doug
888a61ace1
Media upload tweaks (#3643)
* Focus the media caption composer if a hardware keyboard is available
Not worrying about live connections, this screen is short lived.

* Fix a bug where you could hit the send button multiple times while waiting for the media to be converted.

* Begin processing media as soon as the media upload screen is shown.
2024-12-20 10:34:22 +00:00
Doug
3aa7edc508
Enable the media browser feature 🖼️ (#3642)
* Overlay a progress indicator for downloads instead of using a toast indicator.

* Update the SDK.

* Remove the feature flag for the media browser.

* Remove the media captions feature flag too.

* Add unit test cases for download failure and swiping between items.

* Snapshots (with the media browser visible in the screen).
2024-12-19 14:15:31 +00:00
Doug
e7cc807084
Add a fullscreen button to TimelineMediaPreviewScreen and hook up swiping through the timeline. (#3638)
* Add a fullscreen button to media previews - Not ideal but the gestures conflict with the preview controller.

* Don't un-flip the preview thumbnail until the preview has disappeared, and only do it on iOS 18.

* Add all of the loaded items for previewing in the preview controller.
2024-12-18 19:10:19 +00:00
Doug
2a865ce5bf
Implement the save action when previewing media. (#3630)
* Implement the save action on the media preview.

* Update Compound and use the correct icon.

Also fixes an icon that has been renamed.

* Update the add to photo library usage description to match the designs.

* PR comments.
2024-12-17 16:35:51 +00:00
Doug
3a82b88859
Rework the presentation of the media browser quick look view to use SwiftUI. (#3619)
* Embed the media preview quick look inside a full screen cover

With a zoom transition on iOS 18.

* Use a the representable coordinator properly.

* Fix a bug with the toolbar appearance.

* Format

* Try prevent the zoom transition being upside down.

* Fix the snapshot test configuration.
2024-12-16 15:27:50 +00:00
Mauro
45a630dd85
Implement Knock Logic (#3573)
* WIP RequestToJoin struct

* implemented the logic to display the cells

* knock request banner accept flow

* mark all knocks as seen implemented

* details logic

* implemented accept, decline and ban in the list

* added a loader and modified the stacked view

of the banner

* pr suggestions

* updated naming and loading strings

* added the initial loading state

improved code and the tests

* updated a string that has changed

* code improvement

* tests for the room screen view model

* room details tests

and improved the knock requests tests for the room screen

* knock requests list tests

* added error state alerts with retry

* struct has been renamed on the sdk

so I renamed it also on the app side

* update SDK
2024-12-16 15:32:45 +01:00
Mauro
b11fbc6cce
Security and privacy part 1 (#3617)
* added the security and settings button in details

* added content to the view

* added enable encryption alert

* updated preview tests and the UI

* removed wrong plists committed by mistake

* pr suggestions
2024-12-13 18:29:17 +01:00
Doug
88b5426e97
Hook up the actions in the media details sheet. (#3607) 2024-12-12 09:22:36 +00:00
Doug
c827ab9165
Configure the media preview screen based on the event and presentation. (#3604)
* Configure media previews based on the presenting screen.

* Switch on TimelineKind instead of having an isPinnedEventsTimeline Bool.
2024-12-11 15:40:31 +00:00
Stefan Ceriu
0b85964f73
Monthly media gallery separators (#3601)
* Fix the order of the items in the media grid.
* Add media gallery timeline separators.
* Change the `SeparatorRoomTimelineItem` to have it expose a Date timestamp instead of a text string.
2024-12-11 13:32:29 +02:00
Doug
b5605a52e3
Update the timeline media QuickLook modifier. (#3593)
Not hooked up to any flows yet.
2024-12-09 15:23:12 +00:00
Stefan Ceriu
caaa89af62
Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
2024-12-06 16:58:14 +02:00
Doug
a9e4837b62
Use a Date for the timestamp in all timeline items. (#3590)
* Use a Date for the timestamp in all timeline items.

* UI test snapshots.

* Update snapshots

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2024-12-06 13:55:29 +00:00
Doug
4187155159
Enable local echoes for media uploads for all builds. (#3579)
* Enable local echoes for media uploads for all builds.

* Update a string.
2024-12-03 11:28:21 +00:00
Doug
34f1c61fe2
Add a warning to the media caption composer. (#3574)
We can now remove the feature flag.
2024-11-29 16:23:20 +00:00
Doug
49a94e0bdb
Handle media source validation more gracefully. (#3571)
* Handle media source validation more gracefully.

* Fix unit tests.
2024-11-29 12:42:27 +00:00