Commit Graph

2922 Commits

Author SHA1 Message Date
Mauro Romito
1d08e86982 remove appSettings from SpaceScreen 2026-02-26 16:29:52 +01:00
Mauro Romito
465f832ba5 remove space FFs 2026-02-26 16:29:52 +01:00
renovate[bot]
aafb467e85 Update dependency element-hq/compound-design-tokens to v6.10.1 (#5123)
* Update dependency element-hq/compound-design-tokens to v6.10.0

* Further Compound updates.

The gradients have been simplified and are now opaque.

* Missed snapshots.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2026-02-25 21:45:10 +00:00
Aaron Thornburgh
e71e3487c7 Update join call button in room header (#5143)
* Change the Join Call button to 1.) show a Video Call Solid icon, 2.) change the label from "Join call" to "Join", and 3.) change the background color to primary/rest.

* Add a clarifying comment and snapshots.
2026-02-25 16:24:10 +00:00
manuroe
b33d6d39c0 Change Signposter 'Homeserver' performance tag to 'homeserver' (#5128)
* Signposter: Change 'Homeserver' performance tag to 'homeserver'

The spec was misleading. We fixed it in https://github.com/element-hq/element-meta/pull/3132.
2026-02-25 10:00:24 +00:00
Stefan Ceriu
f6510c8577 Simplify LinkNewDeviceScreen preview test setup and fix preview and accessibility test reliability. 2026-02-25 09:07:45 +02:00
Doug
e1d2c1d415 Update the SDK. (#5141) 2026-02-24 16:29:30 +00:00
Copilot
4834f453ef Finish migration of UnitTests target from XCTestCase to Swift Testing (#5129)
* Initial plan

* Migrate 3 test files from XCTest to Swift Testing

- MediaUploadPreviewScreenViewModelTests: @MainActor @Suite struct with init(),
  BundleFinder class for Bundle(for:), mutating test/setup functions,
  [self] capture replacing [weak self] in closures
- NotificationManagerTests: @MainActor @Suite final class with init()/deinit,
  expectation/fulfillment(of:) replaced with confirmation(...), test_ prefix stripped
- NotificationSettingsScreenViewModelTests: @MainActor @Suite struct with
  init() throws, non-optional stored properties, test prefix stripped

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 3 XCTest files to Swift Testing

- NotificationSettingsEditScreenViewModelTests: @MainActor @Suite struct with init() throws, mutating test methods
- TimelineViewModelTests: @MainActor @Suite final class with init() async throws + deinit
- AttributedStringBuilderTests: @Suite struct with init() async throws

All XCT assertions replaced with #expect/#require/Issue.record

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 4 test files from XCTest to Swift Testing

- TimelineMediaPreviewViewModelTests: @Suite struct, mutating @Test funcs,
  testLoadingItem renamed to loadingItem (called internally by other tests)
- ServerConfirmationScreenViewModelTests: @Suite final class with init()/deinit
- CompletionSuggestionServiceTests: @Suite struct with init()
- RoomFlowCoordinatorTests: @Suite final class with deinit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 4 test files from XCTest to Swift Testing

- VoiceMessageRecorderTests: @Suite struct with init() async throws,
  added BundleFinder class for Bundle lookup, migrated all assertions
- SpaceScreenViewModelTests: @Suite struct, private mutating setupViewModel,
  all test funcs mutating, XCTestExpectation → confirmation
- RoomNotificationSettingsScreenViewModelTests: @Suite struct with
  init() throws, cancellable tests marked mutating
- JoinRoomScreenViewModelTests: @Suite final class with init()/deinit,
  XCTestExpectation → confirmation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate 6 test files from XCTestCase to Swift Testing

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

* Fix trailing blank line in RoomPollsHistoryScreenViewModelTests

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

* Migrate 3 test files from XCTest to Swift Testing

- MediaUploadingPreprocessorTests: @Suite final class with init()/deinit,
  removed executionTimeAllowance, XCTAssertEqual(accuracy:) → abs(Double)
- SecurityAndPrivacyScreenViewModelTests: @MainActor @Suite final class,
  5 expectation+fulfillment → await confirmation(...)
- CreateRoomViewModelTests: @MainActor @Suite final class,
  4 expectation+fulfillment → await confirmation(...)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate RoomScreenViewModelTests and RoomDetailsScreenViewModelTests to Swift Testing

- Replace XCTest with Testing framework
- RoomScreenViewModelTests: final class with init() async throws + deinit
- RoomDetailsScreenViewModelTests: struct with init() and mutating funcs
- Convert XCT assertions to #expect / Issue.record
- Convert XCTestExpectation patterns to confirmation { confirm in }
- Strip 'test' prefix from all test function names

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate ComposerToolbarViewModelTests from XCTest to Swift Testing

- Replace import XCTest with import Testing
- Convert XCTestCase class to @MainActor @Suite final class
- Replace setUp()/tearDown() with init()/deinit
- Strip 'test' prefix from all 41 test method names and add @Test
- Replace XCTAssert* with #expect()/#require()
- Replace try XCTUnwrap() with try #require()
- Convert expectation+wait patterns to deferFulfillment with PassthroughSubject
- Convert isInverted expectation to boolean flag checked after await
- Use deferFulfillment on $viewState for state-transition tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address comments with Copilot.

* Fix the failing tests.

* Fixed flaky tests (#5137)

resolved flaky tests

* Tweaks and fixes.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: pixlwave <6060466+pixlwave@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
2026-02-24 12:20:01 +00:00
Mauro
fccca17ecf waitConfirmation implementation (#5130)
* `waitConfirmation` implementation

* even better docs

* made the body not async since the context of usage did not really require it

* pr suggestions
2026-02-23 14:24:19 +01:00
ElementRobot
3cdb9a2c0e Translations update 2026-02-23 10:01:41 +01:00
Mauro
fda19a0273 Improved Defer Fulfillment (#5127)
* improved defer fullfillment

* applied also for async streams

* fix xcodeproject

* better documentation

* restict deferFulfillment  only for Publisher which can never fail
2026-02-20 17:21:35 +00:00
Mauro Romito
5e5fb19f42 pr suggestions 2026-02-19 22:40:31 +01:00
Mauro Romito
1bb0a8c136 removed unused import and fixed tests for swift testing 2026-02-19 22:40:31 +01:00
Mauro Romito
a0be508691 improved the code so that we can use the AudioPlayerState directly to check the playback speed and added localization 2026-02-19 22:40:31 +01:00
Florian
5f724941ee Voice message: variable play back speed (#5121)
* Implement voice message variable playback speed

* Move playback speed string to Untranslated

https://github.com/element-hq/element-x-ios/pull/5121#discussion_r2822631371

* Address review feedback for voice message playback speed

- Persist voice message playback speed as an enum in AppSettings instead of storing an index.
- Update playback speed cycling to derive from enum allCases and safely fall back to `.default` if the stored value cannot be resolved.
- Apply runtime speed updates in AudioPlayer only when the player is in the `.playing` state.
- Keep MediaPlayerProviderTests formatting/indentation style intact while retaining mock playback speed setup.
- Regenerate preview snapshots for:
  - PlaybackSpeedButton
  - VoiceMessageRoomPlaybackView
  - VoiceMessageRoomTimelineView

* Move VoiceMessagePlaybackSpeed outside AppSettings, remove speedRatio

* Stabilize PlaybackSpeedButton width

* Sync voice-message speed label

- Add voiceMessagePlaybackSpeed to TimelineViewState and bind it from appSettings.$voiceMessagePlaybackSpeed.
- Pass that timeline-level speed into VoiceMessageRoomPlaybackView and use it for PlaybackSpeedButton, so labels update consistently across items.
- Use @EnvironmentObject in VoiceMessageRoomTimelineContent so the view re-renders when timeline context state changes.
- In WaveformInteractionModifier, add .allowsHitTesting(showCursor) to the cursor interaction view so hidden pre-playback cursor hit area does not steal taps from the speed button.
2026-02-19 22:40:31 +01:00
Mauro
173b39a07f Swift Testing for Unit Tests PART 1 (#5119)
* migrated a lot of unit tests to Swift Testing and added a new implementation for deferred fulfillment

more tests migration

Cleaned the code manually to establish some good patterns

more code improvements

some more code improvements

removed empty tests

update project

* more pr suggestions and cleanups

* removed the TestSetup pattern

* fixing claude not reusing tests

* pr suggestion + added indent rule to swiftformat so that we can prevent AIs to change that
2026-02-19 16:20:47 +01:00
Mauro
cbeaaf02bb Session verification UI tests update (#5120)
session verification tests UI tests update
2026-02-18 10:57:04 +01:00
Mauro
f7f47049b1 Unify session verification with Android (#5116)
* session verification now does not have a waiting screen, but the initial state instead presents a loading state. Everything is also handled with one single action

* use progress view in place of the spinner icon

* change progress view tint
2026-02-17 17:59:14 +01:00
Mauro
77c88a817a Compound - Swift 6.2 and Main actor isolation (#5109)
* compound is now using 6.2 and main actor isolation + some tweaks to make it build tests and EX

* better handling of the nonisolated context for CompoundUIColors

* improving docs

* fix comment

* remove unused Sendable conformance
2026-02-16 10:19:12 +00:00
Mauro Romito
bf9c54b1e2 make .invited the default history visibility of a dm 2026-02-16 10:45:42 +01:00
ElementRobot
874d769e5b Translations update 2026-02-16 10:45:27 +01:00
Doug
46be78bc75 Define the notification sound name in AppSettings. (#5106) 2026-02-13 16:36:45 +00:00
Stefan Ceriu
4ec2516d55 Update the RustSDK and adopt the new tracing configuration that allows maximum size and age limits on all logs.
Set that 100Mb and a week and remove previous rageshake uploading checks as they are no longer required.
2026-02-13 18:00:23 +02:00
Mauro
56eec826df Fix A11y tests (#5104)
* replace NavigationStack with ElementNavigationStack to allow the content to be rendered without a NavigationStack in a11y tests

* fix a11y tests

* update xcodeproject

* swiftformat fix

* use iOS 26.1 for CI

* use a wrapper to solve the issue for a11y tests

* ElementNavigationStack only uses the trick in DEBUG mode, and added a swiftlint rule to prevent the usage of NavigationStack
2026-02-13 16:45:58 +01:00
Doug
9b5099bd90 Re-write the space flow state machine configuration and cover it more in UI tests. (#5098)
* Use the old state machine configuration style.

* Test starting the space settings flow in UI tests.

* Test starting the create space room flow in UI tests.
2026-02-12 13:19:20 +00:00
Doug
8e6f9f482b Lock the Link New Device flow to portrait and improve Cancel/Try Again handling. (#5094)
* Lock the LinkNewDeviceScreen to portrait.

* Add cancel buttons to the QR Code errors and handle cancel/startOver correctly.

* Use the shared QRCodeErrorView in the LinkNewDeviceScreen.

* Clarify the different QR Error/ErrorStates a bit more.

* Update snapshots.
2026-02-12 11:21:24 +00:00
Aaron
9d77e199df Update the active Space Filter Button in the Chats header to be Primary instead of Accent. 2026-02-11 17:38:43 +01:00
Skye Elliot
293f99d5bc Add history sharing badges to room details (#5043)
* chore: Add dependency `SwiftFlow` for use in avatar header badges.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* feat: Display history sharing pill in room details.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* tests: Add tests for history sharing room details pill.

Signed-off-by: Skye Elliot <actuallyori@gmail.com>

* tests: Update screenshots for RoomDetailsScreen preview tests.

* fix: Use Localazy translations for room details badges

* fix: Address review comments

* fix: Remove line limit from room details badges

---------

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
2026-02-11 12:22:39 +00:00
Doug
6dc66ec777 Remove the global UserIndicatorController.alertInfo, replacing it with local alertInfo usage. (#5087) 2026-02-10 17:16:11 +00:00
Mauro Romito
334f4903e4 make the FFs volatile and initialised to true by default 2026-02-10 17:08:07 +01:00
Mauro Romito
e64dd38f99 Enable spaces second iteration FFs 2026-02-10 17:08:07 +01:00
Doug
b89a9dc794 More Space tweaks. (#5086)
* Centre align the title in the space filter cells.

* Update SpaceRoomCell and SpaceHeaderView with consistent content.
2026-02-10 13:44:04 +00:00
Doug
cf3920b8e5 Update the SDK. (#5081) 2026-02-10 15:12:16 +02:00
Mauro Romito
3a499e44eb always present the space selection even for pre selected spaces 2026-02-10 13:28:55 +01:00
Stefan Ceriu
da0fce5123 Add a rounded rect border around space avatars
.. and also refactor the LoadableAvatarImage to stop having knowledge of spaces and instead focus on generic shapes.
2026-02-10 14:20:53 +02:00
Stefan Ceriu
44712d8c62 Fix multiple server confirmation request crashes and show a modal indicator sooner 2026-02-10 12:17:16 +02:00
Stefan Ceriu
b49bf20c2c Make the PassthroughWindow work correctly on iOS 26
As opposed to passing through all the touches; as per https://stackoverflow.com/a/79768998/730924
2026-02-10 12:17:16 +02:00
ElementRobot
4bf29f4d4f Translations update 2026-02-09 19:16:15 +01:00
Mauro Romito
ff6df211d6 renamed function to resetRoomList 2026-02-09 18:22:41 +01:00
Mauro Romito
ac86d4cfbc 1. Updated the space selection UI 2. Paginate spaces after room creation 3. Pre-selected space creation defaults to space members access. 2026-02-09 18:22:41 +01:00
Doug
6e42071cbe Automatically dismiss UserDetailsEditScreen when saving changes. (#5073) 2026-02-09 15:07:50 +00:00
Stefan Ceriu
33dc0aacaa Show the empty room list state when filtering by a space that has no children. 2026-02-09 15:35:18 +02:00
Hugh Nimmo-Smith
90800440d7 Treat NotFound error as expired in Sign in with QR/Link new device 2026-02-09 14:22:27 +02:00
Doug
94220bf40e Space tweaks. (#5068) 2026-02-09 11:54:41 +00:00
Stefan Ceriu
74f5ab18e9 Fix a retain cycle in the SecureBackupController remoteBackupStateTask
Try to prevent closure crashes we've been seeing in sentry
2026-02-09 11:04:31 +02:00
Doug
9b6324b295 Add boot detection in the NSE and use this to inform the user that there may be more notifications. (#5054)
* Add an initial implementation of the receivedWhileOfflineNotification.

* Only deliver a single receivedWhileOffline notification per boot and clarify the API.

* Add a 15-minute threshold for the receiveWhileOfflineNotification.
2026-02-06 15:18:09 +00:00
Doug
77496934ce Use our own JoinRule type which doesn't include the reserved .private case. (#5056)
* Stop using Rust's JoinRule.private in mocks.

It isn't used anywhere else (see MSC4413 for more context).

* Use our own JoinRule (and AllowRule) types.

* Update ElementX/Sources/Services/Room/JoinRule.swift

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2026-02-06 13:54:53 +00:00
Stefan Ceriu
d480014304 Bump the RustSDK to v26.02.03 (#5051)
Bump the RustSDK to v26.02.03
Fix breaking changes and add support for the new background task error reporting delegate and the new room invite latest event.
2026-02-06 12:08:44 +02:00
Stefan Ceriu
7347c75ba3 Hide the space filters button when not part of any spaces
Also automatically dismiss a selected filter if no longer available i.e. the space has been left.
2026-02-06 10:06:08 +02:00
Stefan Ceriu
a7650786fc Try to prevent timelineProvider timing crashes on update listeners. 2026-02-05 09:22:56 +02:00