Commit Graph

92 Commits

Author SHA1 Message Date
Doug dcae1ffc6b Fix some isolation errors when compiling with Swift 6.4. (#6148)
* Fix some isolation errors when compiling with Swift 6.4.

* Update the Design Tokens dependency to include Sendable conformances.

(cherry picked from commit 4608a63e29)
2026-10-19 09:17:33 +02:00
Valere Fedronic ecced8ee48 Bump element-call-ios to 0.1.0-rc.10 (#6303)
* Bump element-call-ios to 0.1.0-rc.10

The release moves the RTC core to matrix-rust-rtc's room-first API, so the
stack no longer needs starting or stopping: it subscribes to a room when a
call opens it. It also adds headphones and Bluetooth audio output icons,
mapped here to Compound's headphones icon.

* Bump compound-design-tokens to 11.3.1 and use the Bluetooth output icon

11.3.1 adds the `bluetoothOutput` icon, replacing the `headphonesSolid`
placeholder for the Bluetooth audio route in native calls.
2026-10-09 15:16:13 +01:00
renovate[bot] 09085c8bb8 Update dependency element-hq/compound-design-tokens to v11.1.0 2026-10-07 08:45:48 +02:00
Mauro Romito 1b06ca0dcd Let TitleAndIcon take an attributed subtitle
Add an AttributedString subtitle initialiser to Compound's TitleAndIcon,
with the existing String initialiser forwarding to it so current call
sites are unchanged. Add a preview state with a bold run and re-record
the titleAndIcon snapshots.

This lets screens with partially bold copy, such as the multi-account
announcement, use TitleAndIcon instead of rebuilding its layout.
2026-10-05 16:04:22 +02:00
renovate[bot] 9a62206a4f Update dependency pointfreeco/swift-snapshot-testing to v1.19.6 2026-10-01 16:37:26 +03:00
Mauro b1ed870474 Support for Xcode 27 on CI (#6217)
* Run the tests on iOS 27.0

Bump the required simulator OS in the preview, UI and Compound tests, and the CI tool's default OS, from 26.5 to 27.0. Test devices stay the same.

iOS 27 writes transcoded videos 146 bytes larger, so update the expected sizes in MediaUploadingPreprocessorTests.

* Build and test on CI with Xcode 27

Select Xcode 27 in ci_common.sh and move every macOS workflow to the xcode-27 runner image, as macos-26 doesn't include Xcode 27. The Compound workflow now also creates its simulator on the iOS 27.0 runtime.

The xcode-27 runners are slower, so give the unit, Enterprise, Compound and snapshot recording jobs longer timeouts.

* Fix the preview snapshot layout on iOS 27

On iOS 27 the hosting controller applies the window's safe area when rendering, but the snapshot size comes from sizeThatFits, which ignores it. Component previews were shifted down and clipped at the bottom. Disable the hosting controller's safe area regions for these snapshots so the measured and rendered layouts match.

swift-snapshot-testing also renders into a window without a scene, and on iOS 27 a navigation stack in such a window reserves space for a large title it never shows, leaving a gap below the navigation bar. Attach the render window to the app's scene until swift-snapshot-testing handles it.

The invite users and add rooms screens sized their selected items row from a measured width stored in state, which is zero on the first layout pass, so snapshots could draw the row empty. Use containerRelativeFrame instead. The add rooms search previews now also wait for their results, and the search previews that show a clear button get a small precision tolerance, as it renders inconsistently in snapshots.

* Re-record the preview snapshots on iOS 27.0

Recorded on an iPhone SE (3rd generation) simulator running iOS 27.0 with Xcode 27.0 (27A266a). The changes come from iOS 27 rendering: text anti-aliasing, hyphenation and line breaking, navigation bars and toggles that now render in snapshots, lazy stacks that were blank on iOS 26, and pseudo-language locale formatting.

* Fix the UI tests on iOS 27

iOS 27 no longer exposes accessibility identifiers on SwiftUI menu items, so the space exploration test now finds them by label within the menu. On iPad, the start chat search field keeps focus after submitting and can swallow the next tap, so retry the tap if the create room screen doesn't appear.

* Re-record the UI test snapshots on iOS 27.0

Recorded on iPhone 17 and iPad (A16) simulators running iOS 27.0 with Xcode 27.0. The changes come from iOS 27 styling, like the keyboard height and glass borders. This also removes the iPad app lock setup snapshots, which have been orphaned since those tests stopped running on iPad.

* Fix the accessibility tests crashing on iOS 27

The accessibility tests' previews wrapper kept its ImageRenderer alive across the awaits that follow the render. On iOS 27, releasing it at that point tears down its view graph outside of a SwiftUI update, which hits an assertion and crashes the app. Release the renderer as soon as the image has been rendered.

* Keep the accessibility tests' image renderers alive on iOS 27

Releasing the ImageRenderer straight away wasn't enough: on iOS 27, releasing one that rendered a preview crashes SwiftUI whichever context it happens in. Keep the renderers alive instead. Each test launches a fresh app, so they only live for the one test.

* Share the UI tests' app settings with their mock user session

Since the user session flow reads its settings from UserSettings, the UI tests' mock user session was wrapping a fresh volatile AppSettings instead of the one the tests configure. The flags that skip onboarding weren't picked up, so every user session UI test got stuck on the notifications permission screen.

* Re-record the Compound snapshots on iOS 27.0

Apply the same safe area fix as the app's preview tests, so size-that-fits snapshots aren't clipped on iOS 27, and re-record the snapshots on an iPhone SE (3rd generation) simulator running iOS 27.0 in English (US).

* Fix a race reading the keyboard in the accessibility tests

On iOS 27 the QR code login screen's keyboard can be dismissing between checking that it exists and reading its frame, which fails the test. Snapshot it in a single query instead.
2026-09-29 17:02:48 +02:00
renovate[bot] f77d4fe04a Update dependency pointfreeco/swift-snapshot-testing to v1.19.5 (#6184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-23 12:32:34 +01:00
renovate[bot] 0462cb4df0 Update dependency swiftlang/swift-syntax to v604 (#6186)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-23 12:31:33 +01:00
renovate[bot] cfeb38aee9 Update dependency siteline/SwiftUI-Introspect to v27 2026-09-22 09:16:59 +03:00
Doug 5d050f6dfc Fix some SwiftLint warnings. 2026-09-11 08:56:37 +03:00
Doug 4608a63e29 Fix some isolation errors when compiling with Swift 6.4. (#6148)
* Fix some isolation errors when compiling with Swift 6.4.

* Update the Design Tokens dependency to include Sendable conformances.
2026-09-10 15:22:53 +01:00
renovate[bot] b4395d948f Update dependency siteline/SwiftUI-Introspect to v26.0.2 (#6104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-04 08:58:42 +01:00
ElementRobot 9b22ca3cd2 Translations update (#6088)
* Translations update

* swiftformat .

* update previews

---------

Co-authored-by: Element CI <ci@element.io>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-08-31 12:30:26 +02:00
Doug b6a7188fb5 Pin project dependencies to exact versions given we have Renovate. (#6078) 2026-08-27 12:39:48 +01:00
renovate[bot] dd84da15b0 Update dependency element-hq/compound-design-tokens to v10.2.4 2026-08-21 12:28:41 +03:00
Doug 2228da3eb9 Make sure the Tab Rail's background matches the split view's detail background. (#6003) 2026-08-11 11:07:24 +01:00
renovate[bot] 68f7f2b301 Update dependency pointfreeco/swift-snapshot-testing to v1.19.4 2026-08-05 08:26:21 +03:00
Jürgen Wischer 99ba9eb235 Fix CI failures: SwiftFormat indentation and stale text field snapshot
Reformat two files to satisfy SwiftFormat's indent rule on blank lines
introduced by the accessibility fixes in this branch, and re-record the
compoundTextFieldStyle preview snapshots to match the new resting-state
border rendering on raised text fields.
2026-07-17 14:14:45 +02:00
Jürgen Wischer 003c608cc5 Revert "Add a visible custom focus ring to the standard button style"
This reverts commit 3f2434c94761877b96fe5bc2e9acc9dfc2b8db2a.
2026-07-17 14:14:45 +02:00
Jürgen Wischer 5198533242 Add a visible custom focus ring to the standard button style 2026-07-17 14:14:45 +02:00
Jürgen Wischer 814cb99105 Show a resting-state border on raised text fields 2026-07-17 14:14:45 +02:00
renovate[bot] f61c700092 Update dependency pointfreeco/swift-snapshot-testing to v1.19.3 2026-07-16 10:23:33 +02:00
Doug 97990b2877 Update the SDK and Compound tokens. (#5857)
* Update Compound Design Tokens.

No changes, just makes some new ones available.

* Update the SDK.
2026-07-13 09:49:15 +01:00
Mauro a2c1ca06dd Content Scanning View (#5831)
* implement a MediaView to delegate at the view level the usage of the content scanner service, to determine how to render the media.

* fix for a small design mismatch

* fix for greedy error state

* updated naming

* just making some screenshot that have been affected by a string change on Localazy

* pr suggestions + updated strings
2026-07-06 16:15:27 +02:00
Stefan Ceriu b8e6421551 Fix various project warnings 2026-07-03 19:30:28 +03:00
Doug 942ecf9965 Remove Hyperion from the Compound Inspector app. (#5828)
It was barely working and the repo no longer exists now anyway.
2026-07-02 11:12:35 +01:00
Doug 036c9ce248 Stop reserving space for the non-existant icon background in ListRowLabel on iOS 26. (#5822)
* Stop reserving space for the non-existant icon background in ListRowLabel on iOS 26.

* Use the .avatar label style for NotificationSettingsEditScreenRoomCell.
2026-07-01 12:58:33 +01:00
renovate[bot] 17ae3bcce7 Update dependency swiftlang/swift-syntax to v603 (#5803)
* Update dependency swiftlang/swift-syntax to v603

* Stop hiding Package.resolved file contents in GH reviews.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2026-06-30 08:50:37 +01:00
Mauro Romito 3aedd0ccff swiftformat now enforces newlines for ifs 2026-06-19 15:28:27 +02:00
Mauro 6a381dcef0 Fix some issues with missing a11y labels (#5747)
* add a11y label to the bug report field

* include a11y label to the list row directly

* remove is header trait from poll form question header section

* a11y label added to the create room screen name textfield
2026-06-19 11:48:13 +02:00
Doug b38c216185 Add support for defining the text entry type on CompoundTextFieldStyle. (#5757)
* Add support for defining the text entry type on CompoundTextFieldStyle.

* Use Xcode 26.5 when running Compound tests too.
2026-06-18 19:18:44 +01:00
Mauro a520d94760 Swift 6 Migration (#5733)
* Enable Swift 6.2 with default main actor isolation for the app target

Turn on SWIFT_VERSION 6.2, SWIFT_APPROACHABLE_CONCURRENCY and SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor for the ElementX target, matching the NSE and Share Extension (which already use 6.2 without the main actor default).

# Conflicts:
#	ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

* Update the code generation templates for Swift 6

Emit nonisolated/@unchecked Sendable mocks and nonisolated string enums, and mark async mock methods @concurrent so they keep suspending like the real implementations (otherwise intermediate states are unobservable in tests). Includes the regenerated mocks and strings.

# Conflicts:
#	ElementX/Sources/Mocks/Generated/GeneratedMocks.swift

* Make the data layer and services nonisolated and Sendable

Annotate the value-type models, Rust SDK proxy wrappers, timeline item graph, settings, logging and NSE-shared types as nonisolated, and conform the service protocols to Sendable so their existentials can cross isolation boundaries. These types run off the main actor and no longer inherit the target's default main actor isolation.

* Adopt the new isolation across call sites, mocks and signatures

Update call sites, closure signatures and mock configuration helpers to match the nonisolated/Sendable data layer, including the main actor isolated mock inits and the @Sendable filter on recentlyVisitedRooms.

^ Conflicts:
^	ElementX/Sources/Services/SecureBackup/SecureBackupController.swift

* Remove redundant @MainActor annotations

With the app target defaulting to main actor isolation, the explicit @MainActor on view models, coordinators, views and their protocols is no longer required.

* Fix concurrency hotspots surfaced by the migration

Resolve the room summary main-thread deadlock by moving diff processing onto AsyncStreams, add the SDKListener.onMainActor FIFO bridge for SDK callbacks, hop KVO/timer/UIKit callbacks to the main actor via assumeIsolated, add isolated deinits, and apply the few justified nonisolated(unsafe) escapes for queue-confined Apple APIs.

* Fix the unit tests for Swift 6 concurrency

Hop the waitForConfirmation body onto the caller's actor (Swift Testing runs confirmation closures off-actor), and adjust the affected suites and async signatures.

* offload diffs on concurrent threads instead of main actor

* make room info protocols sendable

* use a task group for fetching data so that everything runs concurrently in the TextRoomTimelineView when getting the preview.

* use the generic onMainActor implementation, which already makes a stream and send the continuation on the main actor.

* small pr comments issues being addressed

* update enterprise

* Update StaticCode to 1.1.0 and specify the required Swift isolation.

* fix ElementCallServiceTests

* update enterprise

* re-generate mocks

* update enterprise

* enterprise new code conformed to swift 6

---------

Co-authored-by: Doug <douglase@element.io>
2026-06-18 17:55:31 +02:00
renovate[bot] b6943a6142 Update Compound to v10.2.2 2026-06-12 16:34:34 +03:00
Doug 097d055dbe Some more tweaks to compound for User Status. (#5708)
* Add a plain list modifier to Compound.

* Move ElementTextFieldStyle into Compound and support more styles from the Figma

- More accurately reflects our Liquid Glass updates.
- Adds support for the .raised style.

* Update Element X snapshots.
2026-06-05 15:59:34 +01:00
Doug e9f66bda37 Use the new crop icon from Compound. (#5691) 2026-06-03 11:11:39 +01:00
Doug 915b1fb718 Update ListRowLabel with the correct icon spacing when using LiquidGlass. 2026-06-03 08:15:32 +03:00
Doug fa67713726 Run SwiftFormat. 2026-05-27 17:11:42 +01:00
renovate[bot] d06418a436 Update dependency element-hq/compound-design-tokens to v10.2.0 2026-05-26 14:11:32 +03:00
renovate[bot] 5f5fc15c11 Update dependency element-hq/compound-design-tokens to v10.1.1 (#5526)
* Update dependency element-hq/compound-design-tokens to v10.1.1

* Fix Compound workflow.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2026-05-01 23:52:06 +01:00
Doug 117a96609a Use macOS 26 for all workflows. (#5442)
And check in an out-dated Package.resolved file.
2026-04-20 10:15:34 +01:00
Mauro Romito e1a390e52b update compound-ios snapshotting package 2026-04-17 15:22:15 +02:00
Doug 63422f8f6b Upgrade the project to use Xcode 26.4 (and the 26.4 simulator for tests). (#5375)
* Upgrade the project to use Xcode 26.4 (and iOS 26.4 when running tests).

* Update the test OS assertions.

* updated preview tests

# Conflicts:
#	PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreenInviteCell.iPhone-en-GB-0.png
#	PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreenInviteCell.iPhone-pseudo-0.png

* update compound preview tests

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-04-16 14:33:20 +02:00
renovate[bot] 48794a2c42 Update dependency element-hq/compound-design-tokens to v10 (#5340)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-01 13:33:21 +01:00
renovate[bot] ada2c73c1f Update dependency element-hq/compound-design-tokens to v9 2026-03-31 10:38:07 +03:00
Aaron Thornburgh 96b6d69d5a Update Send button bg color (#5170)
* Update Send button bg color

Change the gradient bg to accent/rest.

* Tidy-up ComposerToolbar to match iOS 18 Figma.

Also simplifies the tests a bit.

* Add a .glassEffect to Compound's SendButton.

* Add a border to TimelineReplyView.

Also use the same sizes in both the message bubbles and the composer.

* Change icon size and container in message bubbles

- Container size = 36x36px
- Icon size = 24x24px

* Update icon of reply contents to be 24x24

* Update the VoiceMessageButton to match the designs.

* Adopt Liquid Glass in the ComposerToolbar.

* Generate and fix snapshots.

---------

Co-authored-by: Doug <douglase@element.io>
2026-03-25 17:42:10 +00:00
renovate[bot] 8b411697a4 Update dependency element-hq/compound-design-tokens to v8 2026-03-19 14:18:22 +02:00
renovate[bot] 860a7de35e Update dependency siteline/SwiftUI-Introspect to from: "26.0.1" (#5221)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-18 12:24:12 +00:00
renovate[bot] abb1274154 Update dependency element-hq/compound-design-tokens to v7 2026-03-12 16:47:10 +02:00
renovate[bot] 785903e8d3 Update dependency element-hq/compound-design-tokens to v6.10.2 (#5180) 2026-03-10 14:28:19 +02:00
Stefan Ceriu 0ab6458e4e Fix new redundantSendable and redundantSwiftTestingSuite swiftformat errors 2026-03-04 17:02:11 +02:00