Commit Graph

3175 Commits

Author SHA1 Message Date
Stefan Ceriu 423bd8073f Move more MockTimelineController configuration to the constructor 2026-05-29 17:48:00 +03:00
Stefan Ceriu 4830424427 Move MockTimelineController signalling to a new SignallingTimelineItemProviderMock
This allows for testing more of a flows and using a real TimelineController in
a lot of the UI tests
2026-05-29 17:48:00 +03:00
Stefan Ceriu bb2cbb6592 Generate a mock for the TimelineControllerProtocol 2026-05-29 17:48:00 +03:00
Stefan Ceriu deb319c18a Expand the EventTimelineItem mock configuration 2026-05-29 17:48:00 +03:00
Stefan Ceriu d81679cf41 Make the RoomTimelineItem fixtures available as TimelineItemProxys too 2026-05-29 17:48:00 +03:00
Doug 46373b1204 Use the same icon in the TimelineReplyView as shown in the File timeline view. (#5665) 2026-05-29 13:26:57 +00:00
Stefan Ceriu f040964d3f Allow the user to forward the same message to multiple rooms at once
This will send the item to the rooms in order they were chosen and only deep link
into the target room if single, otherwise it will just dismiss the forwarding screen
after sending.
2026-05-29 14:27:42 +03:00
Mauro 7093d966b4 Set map tiler URL from well known if available (#5633) 2026-05-28 15:24:58 +02:00
Doug 594d041128 Update the section order in RoomDetailsScreen to match the latest Figma. (#5653)
Also make sure we snapshot the entire thing.
2026-05-28 10:55:39 +01:00
Doug fa67713726 Run SwiftFormat. 2026-05-27 17:11:42 +01:00
Stefan Ceriu 0138fd2a5e Add message sending end editing steps to the user session flow UI test 2026-05-27 18:05:25 +03:00
Doug e0b7f1b3fa A couple of fixes to match the Figma more closely. 2026-05-27 14:30:11 +03:00
Stefan Ceriu da9eda80cd Use Compound icons within the user indicators. 2026-05-27 14:30:11 +03:00
Stefan Ceriu c9317547f8 Replace plain SF Symbols with Compound counterparts 2026-05-27 14:30:11 +03:00
Stefan Ceriu 15eb4a112e Use only compound icons in the TimelineReplyView 2026-05-27 14:30:11 +03:00
Mauro Romito 277f0cc5bc Fix for the content not updating after an edit, restore the usage of the content based identifier in the formatted body for components. 2026-05-26 15:54:07 +02:00
Mauro Romito ef82d184fe updated sdk to 26.05.26 2026-05-26 13:49:13 +02:00
Quentin Gliech bc775a509c Stop message bubbles from stealing dropped files
Each bubble's UITextView keeps `isSelectable = true` so links remain
tappable, which also makes it a valid drop target — items dragged onto a
bubble landed on the text view instead of bubbling up to the timeline's
`.onDrop`. Disable `textDropInteraction` alongside the existing
`textDragInteraction` workaround.
2026-05-26 14:12:04 +03:00
Stefan Ceriu a89445edae Fix #5636 - Clear the composer after editing a message or caption 2026-05-26 13:20:57 +03:00
Element CI 0f976a49aa Translations update 2026-05-25 16:50:05 +03:00
Quentin Gliech 2082e71888 Recognise dragged iOS screenshots as images instead of raw data
When dragging the floating screenshot preview into a room, iOS hands us
a provider whose `suggestedName` is e.g. `Screenshot 2026-05-22 at
14.49.40`. `NSString.pathExtension` returns `"40"`, so the previous
`!pathExtension.isEmpty` check treated the timestamp's trailing segment
as a real extension. The file got written without `.jpg`/`.png`, and the
`MediaUploadingPreprocessor` then fell back to `application/octet-stream`
which is why screenshots showed up as a "data" tile.
2026-05-25 11:01:28 +03:00
Doug 08d02001bf Tidy up mock creation. (#5627)
* Use our standard XYZMock(.init()) pattern everywhere instead of XYZMock.default.

* Remove the configuration parameter label on mock convenience inits.

* Update the enterprise submodule.
2026-05-22 17:34:35 +01:00
Mauro edd7130a97 Fix for overlapping timestamp when last block is not plainText (#5629)
* fix for the overlapping timestamp when the last block is not plain text

* remove id and use offset as iterator in the foearch of the components
2026-05-22 17:56:32 +02:00
Doug 86b51fb104 Remove the CertificateValidatorHook. (#5624) 2026-05-22 15:26:54 +01:00
Stefan Ceriu 77c5aba326 Forward current composer text to the new poll form to serve as the question/topic 2026-05-22 16:46:42 +03:00
Stefan Ceriu ac20ff0fc3 Forward current composer text to the media upload preview screen as captions 2026-05-22 16:46:42 +03:00
Stefan Ceriu a8cff4ded2 Improve how the composer is cleared after sending a message. 2026-05-22 16:46:42 +03:00
Doug 1eb58a465e Revert "Fixing Room List in Spaces View Not Rendering Some Rooms (#5595)" (#5616)
This reverts commit 96230fcc36.

* Use the newer geometryGroup instead of drawingGroup.
2026-05-22 14:32:41 +01:00
Michael 22d14ff8e4 AppSettings are Mockable (#5589)
* create DependenciesProtocol and replace ServiceLocator registration with it

replace mocking calls for ServiceLocator to Dependencies

replace ServiceLocator with instance level calls

replace ServiceLocator configs with TestDependencies config in Tests

replace servicelocator usage in analytics service

replace remaining ServiceLocator calls in unit tests

that depended on the UnitTestAppCoordinator configuration with per suite dependencies instances

fix swiftlint warning

remove remaining references to ServiceLocator

make dependencies properties consistent in tests

delete Dependencies and DependenciesProtocol

fix whitespace modifications

updates from PR feedback

a pass over converting AppSettings and AnalyticsService test instance properties to per test instantiation

fix a missed PR feedback

Sync up after rebase

create DependenciesProtocol and replace ServiceLocator registration with it

replace mocking calls for ServiceLocator to Dependencies

replace ServiceLocator with instance level calls

replace ServiceLocator configs with TestDependencies config in Tests

replace servicelocator usage in analytics service

replace remaining ServiceLocator calls in unit tests

that depended on the UnitTestAppCoordinator configuration with per suite dependencies instances

fix swiftlint warning

remove remaining references to ServiceLocator

make dependencies properties consistent in tests

delete Dependencies and DependenciesProtocol

* AppSettings is instance level mockable now

* replace mocked and preview usages of reset + AppSettings global init with

AppSettings(store: UserDefaultsMock())

* AppSettings.UserDefaultsKeys is now a RawRep struct, making it extensible

* update tests with new AppSettings so it builds

* update remaining AppSettings test/mock inits

* AppSettings.UserDefaultsKey conformed to ExpressibleByStringLiteral

* addressed issues found in first pass ai review

* update AppSettings instantiations after rebase

* fix accessibility tests coordinator after rebase

* Rename to VolatileUserDefaults

* AppSettings init uses mandatory parameter

* Revert UserDefaultsKey to enum

* Add TrackedUserDefaults to be able to reset the defaults object

* Added volatile static func to AppSettings

* Use .volatile() static func instead of full init

* review fixups

* Resolve build issues after rebase

* updated enterprise module

* remove the static reset settings call from the preview tests

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-05-22 15:14:08 +02:00
Stefan Ceriu 97d4a35af7 Improve Application lifetime scheduling
We have noticed race conditions between deep link handling and client
resuming/sync starting which lead to timelines being created without being able
to access the underlying stores.

This patch switches to foreground/background app tracking in an attempt at a cheap
way to fix the underlying issue. Arguably this was the correct way to do it to
being with.
2026-05-22 15:41:17 +03:00
Michael dfebb4719c Compiler Warning Reductions (#5609)
* Reduce warnings in AttributedStringBuilderTests

(cherry picked from commit e1f32b2b1df147c93207e01df5c8fec4046b0f48)

* Fixed Sentry warning

(cherry picked from commit e45c3002b2331a6f2d363de61a12377316078602)

* JoinRule and AllowRule conform to Sendable

(cherry picked from commit 27c67c27b944df11adc17bdd405e442e8c50b0d6)

* AudioConverterProtocol conform to Sendable

(cherry picked from commit 352bdab15db424c632538eb3140858eae9fdfb15)

* TimelineControllerProtocol conform to Sendable

(cherry picked from commit 07a927745624db4bab3cf68842027e12177be70b)

* Resolved some AI review notes

(cherry picked from commit 8d3ac820754a6126785e639a98c8c1fcf86ef77f)

# Conflicts:
#	ElementX/Sources/Other/SendableConformance/SendableBox.swift
#	ElementX/Sources/Other/SendableConformance/WeakSendableBox.swift
2026-05-22 10:56:30 +02:00
Mauro 2462ddea85 Swift 6 migration for NSE (#5608)
* swift 6 support for NSE and concurrency safe implementations for it

* enforcing required Sendable conformance for swift 6 migration in NSE

* use Mutex to access the string builder cache

* use an async stream to update timeline items diffs

* fix for Sendable appHooks
2026-05-21 20:21:57 +02:00
Stefan Ceriu 14f7f4a6bb Fix small multiple_closures_with_trailing_closure warning 2026-05-21 17:59:04 +03:00
Stefan Ceriu 9609fa4616 Add notification setting sound translatables 2026-05-21 17:59:04 +03:00
Stefan Ceriu 3bbf31bea6 Add jump to unread translatable 2026-05-21 17:59:04 +03:00
Stefan Ceriu 9a3473137c Remove unused untranslated crypto keys 2026-05-21 17:59:04 +03:00
Danny eae464ecd7 Timeline: add a Jump to Unread button and a new-message badge on the scroll-to-bottom button. (#5506)
* Timeline: add a Jump to Unread button and a new-message badge on the scroll-to-bottom button.

* Rename scrollToFirstUnread to scrollToReadMarker for consistency with isReadMarkerVisible.

* Cache readMarkerUniqueID and unreadMessageCount as stored properties on TimelineState.

* TimelineViewModel: rename newTimelineItems and drop redundant ordering comment.

* Use Compound chevron icons in TimelineScrollButton.

* Fix TimelineScrollButton layout at large dynamic type sizes.

* Add a trailingAccessory slot to topBanners and use it to dodge banners with the jump-to-read-marker button.

* Put jump-to-read-marker behind a developer-options feature flag.

* Fine-tune TimelineScrollButton sizing and badge colour.

* Remove TimelineScrollButton chevron offset that was compensating for SF Symbol centering.

* Drop the new-messages count, replace with a presence dot.

* Move both timeline scroll buttons to bottom-right and revert topBanners trailingAccessory slot.

* Position TimelineScrollButton badge above for up direction and below for down direction.

* Add long-press mark-as-read pill to the timeline scroll buttons

* Read isSwitchingTimelines from state in updateHasNewMessagesAtBottom.

* Use assertionFailure when scrollToReadMarker is called with no read marker.

* Add TimelineScrollButton preview snapshots.

* (fix) design and various self-review issues

* (fix) suppress scroll button tap after long-press

* (feat) fall back to RoomInfo.fullyReadEventID for jump-to-unread

* (fix) hide jump-to-unread immediately after mark-as-read

* (fix) align with newer matrix-rust-sdk surface

* Bump the RustSDK to v26.05.20

---------

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2026-05-21 15:03:32 +03:00
Stefan Ceriu ab82068740 Make the AnalyticsServiceMock default a variable as well, for consistency. 2026-05-21 12:37:52 +03:00
Stefan Ceriu 13128d9869 Provide a default implementation for the NotificationToneManager and fix the NotificationSettingsScreen preview tests 2026-05-21 12:37:52 +03:00
Michael dd0de4d7b0 Custom Notification Tones (#5527)
* added foundation for custom notifications

* feat: add localizations for tone names

also, if available, include the pro sound in the element x sound list

* use a static file location to store the notification tone

and update the file at that location when selected

* if there's a problem previewing or setting the alert tone, toast the user with the error

* rename tone directory

* create NotificationToneManager to handle tone business logic

* conform to project formatting

* assign custom sound to actual notifications

* dry up notification generation in the nse

* add compilation condition for including notification alert tone and remove from share extension

* swift format had some opinions

* flatten the notification tone ui, removing system/elementx designations

* fix stored file url breaking due to sandbox path changes

* tone manager can import custom tones and provide a list of imported tones

* ui support for custom tones

* can delete custom imported tones

* sort the custom tones

* add additional preset sounds

* can choose caf files for custom sounds and fix location persistence issues

* store sound locations with relative links

this is a better solution than storing bookmarks since bookmark resolution can be variable and differ from freshly derived urls

* add docs for new notification features

* run tone conversion in background

* resolved several ai found issues

* added protocol and mocks for notification tone manager

* added tests for notification settings screen vm interactions with the tone manager

* add tests for notification tone manager

* rename element tone names per feedback

* move custom tone option to the top of the notification tone list

* rename Tone to Sound for consistency with Android

* remove additional bundled tones

* restore accidentally deleted Element Default sound file

* system alert tones are filtered by what's available on the system prior to finalizing the collection

* Add a couple more caf file conversion log statements

* Simplify the notification sound conversion logic

* Update notification sound strings in sync with Android

* update xcodeproj after rebase

* remove conditional compilation and include NotificationAlertSound in share extension

* Use AudioPlayer instead of custom tone previewer and remove the previewer

* rename NotificationTone

* Consolidate and move errors to top of NotificationToneManager

* tone manager no longer depends on userinterfacecontroller

* Move static Tone properties to NotificationToneManager

* resolve view model initializer feedback

* update xcodeproj

* fatalerror when tone manager cannot init

* Remove banner icon on alert tone error

* fixup review feedback

* Moved URL handling to NotificationToneManager
2026-05-20 15:40:34 +03:00
renovate[bot] cb1c89be9d Update XcodeGen (#5610) 2026-05-20 08:33:44 +03:00
Michael 5a07c98afc Make AnalyticsService mockable via `AnalyticsServiceProtocol (#5599)
* Create AnalyticsServiceProtocol and conform AnalyticsService

* Replace AnalyticsService properties and arguments with AnalyticsServiceProtocol

* Inline AnalyticsServiceMock replacing old mock

* handle more complex AnalyticsServiceMock callsites

* move documentation from AnalyticsService to AnalyticsServiceProtocol
2026-05-20 08:23:58 +03:00
Mauro Romito b3e6373750 update sdk to 26.05.18 2026-05-18 17:40:17 +02:00
Atridad Lahiji 96230fcc36 Fixing Room List in Spaces View Not Rendering Some Rooms (#5595)
Removed drawingGroup call in SpaceRoomCell and fix #5306
2026-05-18 16:23:09 +03:00
ElementRobot 087bf9a2c8 Translations update (#5604)
* Translations update

* Translations update

* update the name of the theme keys

---------

Co-authored-by: Element CI <ci@element.io>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-05-18 11:16:18 +00:00
Mauro 6c0aaa7a58 Invite the DM recipient to a new room (#5588)
* handle the details to invite users flow.

* implemented the room creation in the invite screen, and its dismissal + navigaton to the newly created room

* updated preview and unit tests

* pr suggestions
2026-05-18 10:08:07 +02:00
Mauro Romito 9ed47c61b7 possible fix for the top banner having it's pieces slide and appear independently 2026-05-17 14:40:47 +03:00
Stefan Ceriu 4ff58f8756 Hook up client pausing and resuming next to sync starting and stopping for nightly and debug builds.
This will hopefully close all file descriptors and prevent the system from killing the app in the background.
Reported in https://github.com/matrix-org/matrix-rust-sdk/issues/6366 and implemented in https://github.com/matrix-org/matrix-rust-sdk/pull/6495
2026-05-17 14:37:55 +03:00
Stefan Ceriu 579b63d331 Remove unused method 2026-05-17 14:37:55 +03:00
Stefan Ceriu 16715ea1c2 Remove the focused ComposerToolbar accessibility test and preview
The automatically focused keyboard is creating false positives when running accessibility
tests and doesn't bring any value in the previews. Simplest solution is to remove it.
2026-05-16 16:54:32 +03:00