629 Commits

Author SHA1 Message Date
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
Doug
98a5ee5b48
Add a toggle in the developer options to optimise the media uploads. (#3408) 2024-10-14 14:48:59 +01:00
Mauro
a16e1346fe
Create Room with knock rule (#3397)
* create knock room implementation (without SDK)

* Apply suggestions from code review

pr suggestions

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

* pr suggestions

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-10-14 11:52:38 +02:00
Doug
6e51969d27
Update the SDK and use media filename and caption internally. (#3375)
Doesn't render captions (other than in fallback places).
2024-10-08 11:00:58 +01:00
Stefan Ceriu
794d0eead1 Fixes element-hq/element-meta/issues/2525 - Display a warning when a user's pinned identity changes 2024-10-07 20:47:31 +03:00
Doug
5522871dd9 MockMediaProvider → MediaProviderMock. 2024-10-03 10:58:59 +01:00
Stefan Ceriu
c79dbe85a0
Bump the RustSDK to v1.0.53: adopt latest record based timeline item APIs (#3356) 2024-10-01 18:50:11 +03:00
Doug
268d9f7479
Move the core logic in LoginScreenCoordinator into the ViewModel. (#3348) 2024-10-01 13:09:45 +01:00
Mauro
5f4c2890f6
Remove message pinning FF (#3318) 2024-09-30 12:32:35 +00:00
Doug
17dfe1359a
Selecting a server that doesn't support login now fails instead of letting you continue to a failure later. (#3342)
* Fail configuration of the authentication service if the homeserver doesn't support login.

* Move the ServerSelectionCoordinator logic into the ViewModel.

- Handle the new login alert.
- Add more tests
2024-09-27 13:58:05 +01:00
Stefan Ceriu
9d23dec2e9
Tracing and integration test tweaks (#3336)
* Disable image and document picker integration tests as they randomly fail to load and are flakey.

* Delete any pre-existing log files

* Various tracing tweaks and fixes:
- delete the custom tracing log levels as we can't control their ouput
- implement comparable on them
- change default levels only if the new chosen level increases their verbosity

* Make logging targets mandatory and fix their logging levels

* Switch back to using the `run_tests` reset simulator flag as `fastlane snapshot reset_simulators` was too generic and slow

* Switch all integration test taps to `tapCenter` (nee forceTap) after noticing missed taps on CI.

* Make the logging file prefix explicit, let the main app not use one.

* Rename tracing configuration `target` to `currentTarget`
2024-09-27 15:08:47 +03:00
Doug
4d7d687954
Start fixing flakey tests ❄️ (#3329)
* Wait longer on authentication flow tests.

* Move default perceptualPrecision value into the snapshot preferences.

* Delay snapshots *before* setting up the test.

* Reset the simulators on GitHub before running?

* Remove a test that is now handled by Rust.

* Fix a test that was yielding.
2024-09-26 16:09:01 +01:00
Doug
a8dbda90d9
Configure the AuthenticationService later now that we have 2 flows on the start screen. (#3316)
* Don't query the homeserver until confirming it (or selecting a different one).

* Setup the infrastructure to test AuthenticationService.

Implement basic tests for configuration & password login.

* Use the real AuthenticationService with a mock Client in all of the tests.

* Add tests for the ServerConfirmationScreenViewModel.

* Remove redundant view state and test for it.
2024-09-25 14:40:18 +01:00