641 Commits

Author SHA1 Message Date
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
Doug
fdbacbc22d
Add the unit test media files as development assets. (#3569)
Move UnitTests/Resources/Media into a top-level DevelopmentAssets directory.
2024-11-28 17:30:26 +00:00
Doug
751be7b3a7
Update the SDK. (#3565)
* Update the SDK.

* Add mockMXC URLs to fix all the crashes during tests.

* Refactor Voice Messages to not use a MediaSource for local files.
2024-11-28 08:34:38 +00:00
Doug
a292c41ca5
Move the media caption composer (and Add Caption action) behind a feature flag for now. (#3560) 2024-11-27 08:30:10 +02:00
Doug
03aaf849ee
Update how file captions are rendered (#3554)
* Update the File/Audio captions layout to match Figma.

* Fix caption sizing issues.

The send info label was being added incorrectly.

* Update icon size and regenerate snapshots.

* Fix a regression in the location timeline item layout.
2024-11-26 10:36:46 +00:00
Mauro
e315451448
Knock Requests List Screen (#3533)
* created the basic navigation and files

* updated the logic

so that the buttons that do not have permissions won't show

* added the empty state

* progress in making the list UI

* update tests

* UI improvements

* fixed an issue with media provider

* update button style

* fixed a navigation bug

* pr suggestions

* pr suggestions
2024-11-21 19:14:05 +00:00
Doug
7e1476d973
Add support for adding/editing/removing media captions. (#3547)
* Add support for editing media captions.

* Add composer snapshots.

* PR comment.
2024-11-21 18:18:27 +00:00
Doug
c081e538b4
Add support for sharing URLs and text. (#3546)
* Add support for sharing URLs and text.

* Fix a bug where a stored draft would overwrite the shared text.

* Add tests.
2024-11-21 14:48:38 +00:00
Stefan Ceriu
1c62792813 Enable inline replies for push notifications. 2024-11-20 18:42:36 +02:00
Stefan Ceriu
acd670ab56 Link the MatrixRustSDK dynamically and only embed it in the main target 2024-11-20 16:11:54 +02:00
Doug
b75ad6a5aa
Support adding a caption to media uploads. (#3531)
* Add a composer to the MediaUploadPreviewScreen.

And send it's content to the media upload's caption.

* Use the new compound SendButton (updating relative padding in the toolbar).

* Update snapshots.

* Add unit tests for sending a caption.
2024-11-19 16:35:01 +00:00
Doug
bef1eda533
Fix a bug where the security banner has the wrong state when out of sync. (#3511) 2024-11-18 11:38:20 +00:00
Stefan Ceriu
ef288a9662
Group image and video metadata in specialised structs (#3518) 2024-11-15 15:00:27 +02:00
Stefan Ceriu
79473ef2e9
Bump the RustSDK to v1.0.67 (#3512)
* Bump the RustSDK to v1.0.67

* PR comments

---------

Co-authored-by: Doug <douglase@element.io>
2024-11-13 18:03:30 +00:00
Stefan Ceriu
b122b02bee
Share extension (#3506)
* Setup simple share extension

* Switch the app url scheme to be the full bundle identifier

* Setup a share extension that show a SwiftUI view, uses rust tracing and redirects to the hosting aplication

* Move media as json through the custom scheme into the main app and deep link into the media upload preview screen

* Fix message forwarding and global search screen room summary provider filtering.

* Tweak the message forwarding and global search screen designs.

* Add a room selection screen to use after receiving a share request from the share extension

* Fix share extension entitlements

* Share the temporary directory between the main app and the extensions; rename the caches one.

* Remove the no longer needed notification avatar flipping fix.

* Extract the placeholder avatar image generator from the NSE

* Nest `AvatarSize` within the new `Avatars` enum

* Donate an `INSendMessageIntent` to the system every time we send a message so they appear as share suggestions

* Support suggestions in the share extension itself

* Improve sharing animations and fix presentation when room already on the stack

* Clear all routes when sharing without a preselected room.

* Fix broken unit tests

* Various initial tweaks following code review.

* Correctly clean up and dismiss the share extension for all paths.

* Move the share extension path to a constants enum

* Rename UserSessionFlowCoordinator specific share extension states and events

* Add UserSession and Room flow coordinator share route tests

* Tweak the share extension logic.
2024-11-13 14:02:47 +02:00
Doug
2b153306dd
Update the project to use Xcode 16.1 (#3505) 2024-11-12 12:24:08 +00:00
Mauro
e7d4ea0d35
Add alias to public room creation (#3450)
* added the address section

* updated code and strings

* syncing name and address

* improved code

* added a way to reset the state

* better documentation

* update strings

* handling the alias

* alias error state

* update strings

* error handling

* improved the error handling

* new preview tests, even if they do not work well

* improved tests

* unit tests

* pr comments and using the correct value

* fix

* pr comments

* to improve safety and control of the FF

* fixed a test

* updated tests

* update SDK
2024-11-08 15:49:20 +01:00
Doug
1f90f1a9f1
Enable the Optimised Media Uploads feature. (#3467)
* Enable the Optimised Media Uploads feature.

(Well move the toggle from Developer Options to Advanced Settings)

* Add OptimizeMediaUploads analytics.

* Final strings.

* Upload reduced quality media by default 😢

Move the setting out of the feature flags section in the file.

* Fix unit tests now the default has changed.

* Pull in updated string, fix snapshots.
2024-10-31 14:14:14 +00:00
Doug
c11e49f962
Tweak the flow for setting up a recovery key. (#3463)
* Remove unwanted title.

* Update SecureBackupScreen strings.

* Update SecureBackupRecoveryKeyScreen.

* Show the recovery banner when recovery needs setting up.

* Fix SecureBackupScreen title.

* Fix timeout on MP4 encoding tests
2024-10-29 15:59:22 +00:00
Stefan Ceriu
d77bb935b7
Incoming session verification support (#3428)
* Fixes #1227 - Add support for receiving and interacting with incoming session verification requests.
* Fix a couple of random small warnings
* Move static view config to the view state
* Update snapshots
2024-10-29 15:21:17 +02:00
Doug
cf5e9fb313
Switch to optimised video uploads to 720p (#3462) 2024-10-29 11:44:46 +00:00
Doug
589df7d76e
Use an https callback for OIDC once again. (#3461)
* Use the new WAS callback type and return back to the https callback for OIDC.

* Simplify OIDCAuthenticationPresenter now it doesn't need to handle universal links.

* Remove old unit tests.
2024-10-29 11:28:05 +00:00
Doug
7c75498b4d
Replace individual RoomProxy properties with a stored RoomInfo. (#3445)
* Store RoomInfo updates in JoinedRoomProxy and read from them directly.

* Remove all RoomProxy properties that were reading from the RoomInfo.
2024-10-28 12:29:31 +00:00
Stefan Ceriu
7a47e37d38
Fix #1934 - Hook reaction pickers into the system's recently used keyboard emojis (#3453) 2024-10-25 19:58:56 +03:00
Mauro
2511c98090
Knocked Preview implementation (#3426)
* JoinRoomScreen ui for knocking

* code improvement

* updated previews

* added knocked state with tests

* send knock request

* Apply suggestions from code review

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

* pr comments

* update tests

* new API

* knock implementation and cancel knock

* update strings

* added a knocked cell in the home screen

* design update

* updated SDK

* simplified the invite case code

* pr comments

* updated previews

* added message as reason

* updated strings

* fixing tests

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-10-24 17:23:06 +02:00
Doug
a4ea552a83
Show a verification badge on the Room Member/User Profile screens. (#3427)
* Add a badge for verified users/room members.

* Reorder subviews.

* Add a (disabled) button to verify other users.

* PR comments.

* Update the SDK.

* Adopt the SDK changes introduced in matrix-rust-sdk/pull/4100

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2024-10-21 16:07:19 +01:00
Doug
201e3b0c9c
Fix an issue calculating the width/height of an image. (#3435) 2024-10-21 15:28:23 +01:00
Mauro
bd4ecdd060
Knock and knocked state for the join room screen (#3424)
* JoinRoomScreen ui for knocking

* code improvement

* updated previews

* added knocked state with tests

* send knock request

* Apply suggestions from code review

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

* pr comments

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-10-17 14:00:51 +00:00
Stefan Ceriu
0651314e3e
Adopt various rust side Timeline API additions (#3423)
* Adopt new reaction toggling API introduced in matrix-org/matrix-rust-sdk/pull/4127

* Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4111: use the new `TimelineUniqueId` type instead of `String` for unique timeline identifiers.

* Bump the RustSDK to v1.0.58.

* Fix unit tests
2024-10-16 19:08:34 +03:00
Doug
6078398ad3
Allow image uploads to be optimised to reduce bandwidth. (#3412)
* Use typed throws for intermediate media upload preprocessing steps.

* Remove unnecessary async/await usages.

* Resize images when optimizedMediaUploads is enabled.

* Reduce the JPEG quality.

* Add tests for PNG and HEIC, fix mimetypes for these.

* Add special handling for GIFs.

* Test the files to make sure their mime types match the info.

* Update the filename when converting formats.

* Extend test timeout for video encoding.
2024-10-16 14:50:24 +01:00
Stefan Ceriu
35d49c4d85 Refactor theTimelineItemIdentifier handling; stop relying on optional EventOrTransactionIds and be explicit when setting composer modes from the draft service. 2024-10-16 16:37:47 +03:00