Commit Graph

98 Commits

Author SHA1 Message Date
Stefan Ceriu 27e59a81e4 Fix integration tests following the search tab introduction
Tabbar tabs now can take accessibility identifiers and the integration test uses the newly expected flow.
2026-10-14 20:14:27 +03:00
Stefan Ceriu 46eb23fa64 Show the unread notification count on the chats tab
Set the chats tab's badge count from the same value used for the app badge.
The tab bar already renders it through the .badge modifier but that has no
effect outside of a TabView or List, so the iPad tab rail now overlays a
small NotificationCountBadge instead.
2026-10-09 11:44:39 +03:00
Stefan Ceriu 38312b7473 Fix the search tab's layout now that its built against os27 2026-10-01 15:59:16 +03:00
Stefan Ceriu 12d937a5a8 TabRail layout fixes (#6172)
* Attempt another TabRail layout fix by just keeping it visible all the time
* Move one of the sidebar dividers to the tab rail.
2026-09-24 15:47:46 +03:00
Doug 223ddeae22 Fix the split view layout on iOS 27. (#6180) 2026-09-22 17:41:23 +01:00
Stefan Ceriu f224c104e0 Fix the tab rail flickering on narrow iPad windows (#6107)
* Fix the tab rail flickering on narrow iPad windows

The rail is laid out beside the split view, so hiding it when the split
collapsed handed that width back to the split, which then had room for its
sidebar again, which showed the rail, which collapsed the split. Any window
whose width sat within a rail of the split's collapse threshold flickered
forever, an iPad mini in fullscreen among them.

The split reports the same column visibility whether it collapsed on its own or
because the sidebar was toggled, and at the same width, so the two can only be
told apart by when they arrive: the rebound lands in the next layout pass. A
collapse that soon after showing the rail is therefore taken as proof that the
rail and the sidebar don't fit at this width, and the rail is left hidden until
the window is resized. Later collapses are treated as deliberate and still hide
the rail as before.

The container width, the width the rail and the sidebar were shown not to fit
at, and the moment the rail was last shown are one piece of state with
invariants between them rather than three independent values, so keep them and
the decision they feed together in TabRailVisibility.
2026-09-04 17:46:03 +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
Doug 58938dbd4f Fix another layout loop. 2026-08-03 09:32:41 +01:00
Doug ad38d9698a Fix a layout loop. 2026-08-03 09:32:41 +01:00
Doug 7c245acaaf Add a custom TabRail on iPad instead of the top tab bar.
Warning: There's currently an observation tracking feedback loop 😕
2026-08-03 09:32:41 +01:00
Mauro 9093631f8b Periphery cleanup (#5893) 2026-07-20 11:16:11 +02:00
Stefan Ceriu c5653c2208 Allow returning from global search with the escape key
cmd+k jumps to the search tab but left users with no way back. Pressing
escape in the search field now returns to the tab they came from (never
into search itself).

Escape is handled at the search field's pressesBegan, alongside the
existing arrow-key navigation, since the focused UIKit field swallows
SwiftUI keyboard shortcuts.
2026-06-22 16:54:30 +03:00
Stefan Ceriu 7f1b6086ae Search tab (#5754)
* Add a developer flag for the search tab
Introduces a globalSearchEnabled user preference (off by default) with a toggle in Developer Options, used to gate the new search experience.

* Support search role tabs in the tab coordinator
Migrates the NavigationTabCoordinator to SwiftUI's value-based Tab API and adds an isSearch option so a tab can adopt the iOS 26 .search role, which detaches it into the trailing search button in the tab bar.

* Moves room search to a new screen
Adds a new screen that filters the alternate room summary provider as you type, shows an empty state, and lists matching rooms with their matrix identifier. Supports hardware keyboard selection (arrow keys to move through results, return to open) by reaching into the system search field.

* Present search in a dedicated tab
Adds the search tab to the chats flow on iOS 26 when the flag is enabled, rendered as the detached .search role button. The Cmd+K shortcut now selects this tab, and the home screen's inline search is hidden while the tab is available.

* Remove the old global search screen
The dedicated search tab replaces the Cmd+K floating window, so the GlobalSearchScreen, its window plumbing in the WindowManager, and its presentation in the chats flow are all removed.
2026-06-19 13:50:17 +03: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
Doug fa67713726 Run SwiftFormat. 2026-05-27 17:11:42 +01:00
Doug 0acbc41432 Rename OIDC to OAuth. (#5525)
* Rename OIDC to OAuth.

* Update the enterprise submodule.
2026-05-05 14:07:06 +01:00
Doug fef942f529 Restore the .oidcCallback route for external authentication. (#5391)
* Restore the .oidcCallback route (partially reverts #3461) for external authentication.

* Make sure OIDC also works for non-http URLs.

* Remove oidcAuthentication from the state machine.

There isn't a reliable way to detect failure/cancellation when e.g. the user returns from an external app without interacting with the MAS page.
2026-05-05 12:47:07 +01:00
Doug 63592e48c1 Remove support for handling SPA calls within the app. (#5515)
* Remove support for handling SPA call links.

They were a stop-gap solution whilst we were building support for embedded room calling.

* Simplify ElementCallConfiguration now that there is only 1 type of call to handle.

* Remove the unused overlayModule from NavigationRoomCoordinator.
2026-04-29 19:32:38 +01:00
Doug 16fce556b6 Revert the space filters Toggle and instead don't try to use glass when in the sidebar.
This reverts commit 283029b14976cda1aa567c947c27b09916c88824.
2026-04-17 15:22:56 +01:00
Stefan Ceriu a010306b41 Move the global search shortcut to application commands so it's more reliable with multiple windows 2026-03-31 20:33:33 +03:00
Valere fec4f7d9ee call: Support voice only incoming call 2026-03-30 17:49:46 +02:00
Mauro Romito ce97fec477 remove space FFs 2026-02-26 16:29:52 +01:00
Mauro 0e40cc7008 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 071a1eeb52 Remove the global UserIndicatorController.alertInfo, replacing it with local alertInfo usage. (#5087) 2026-02-10 17:16:11 +00:00
Stefan Ceriu 23062901c0 Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Stefan Ceriu b90fd5d8d9 Fix incorrect empty lines in doc comments 2026-01-27 12:50:57 +02:00
Mauro Romito 656648fc7c drop iOS 17 and removed all #available and #unavaible checks for 17 and 18 2025-12-01 14:19:52 +01:00
Doug 1b321a0690 Disable the cross-fade animation on the split view detail. (#4737) 2025-11-13 10:52:32 +00:00
Mauro Romito 6dee4176f2 pr suggestions and implemented a simpler way to clear the route, that always brings back to the initial coordinator 2025-11-06 12:57:39 +01:00
Mauro 7a1d4a08fb Threaded notifications (#4644)
* implemented grouping

* implemented presenting the thread

* improved the implementation by reusing the presentation action

* add Thread group to DMs to differentiate from non threaded messages of the same DM

* name for a threaded notification in group room

* focus event when tapping on a notification

* pr suggestions

* document
2025-10-23 15:28:45 +02:00
Mauro f7dd9cdcf8 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
Stefan Ceriu da967e24be Prevent the system from automatically hiding the sidebar when backgrounding the app 2025-10-10 21:08:19 +03:00
Doug 27f7085dc1 Even more space tweaks (#4588)
* Bring back the button to share a space on iOS 26.

* Remove the setting and disable the space tab on iOS 17.

(The tab bar is broken on iPadOS 17).
2025-10-07 14:34:10 +01:00
Doug 621b72f162 Joining a space from the room flow. (#4563)
* Add the More menu to SpaceScreen.

And a simple way to leave a space for testing.

* Start a space flow when accepting a space invite from the room flow.

* Minimise the tab bar on iOS 26 when scrolling down.

* Enable spaces by default!
2025-10-02 10:58:38 +01:00
Doug c48580aeb4 Move call presentation from the chats flow into the user session flow. (#4459) 2025-09-03 17:01:07 +01:00
Doug c140209e0c Hide the tab bar when pushing screens on iPhone as requested by the designs. (#4444)
Make the tab bar hide when pushing screens on iPhone as requested by the designs.

Annoyingly we couldn't simply add a second call to .toolbar(.hidden, for:.tabBar) on the pushed screens, but this way is automatic and there's still an override so it's good enough for now.
2025-08-27 10:31:56 +01:00
Doug a5d3b0ff77 Fix the push animation when selecting a room with the compact layout on iPad.
Also makes sure we don't animate the change of room in the split's detail when using the regular layout
2025-08-08 10:33:08 +01:00
Doug cdf4e04928 Use @Observable instead of ObservableObject for our NavigationCoordinators. 2025-08-08 10:33:08 +01:00
Doug 5ed1d9b1ef Fix a bug when a compact split view doesn't react to a change of root coordinator in the sidebar. 2025-08-08 10:33:08 +01:00
Doug c47ec8a7cc Add a SpaceExplorerFlowCoordinator. (#4383)
* Add a SpaceExplorerFlowCoordinator.

* Project tweaks

- iOS 17.5 so that we can use the simulator.
- Make a Spaces group for common Space related views.
- Fix the tab bar badge colour on iPhone landscape and iPadOS 17 (18 is still wrong 😒)
2025-08-07 12:48:53 +01:00
Mauro 5ab6f90863 Last Owner should edit admins, and not leave when is last (#4372) 2025-08-07 08:40:14 +00:00
Doug bf0adfcb25 Implement tab bar badges, visibility and selection. (#4373) 2025-08-05 09:23:45 +01:00
Doug 496c29ae36 Hide the tab bar whilst we're working on it and add some tests. 2025-07-31 14:09:26 +01:00
Doug 6307534341 Move session related responsibilities from ChatsFlowFlowCoordinator to UserSessionFlowCoordinator.
Specifically: onboarding, session verification and logout.
2025-07-31 14:09:26 +01:00
Doug 4943db841a Create a NavigationTabCoordinator to manage a TabView. 2025-07-31 14:09:26 +01:00
Doug e23edf3ac3 Stop VoiceOver from reading the screen behind the current call. (#4265)
As we're using an overlay for the presentation (to keep the web view alive when minimized), we need to make sure to hide everything behind the overlay from VoiceOver.
2025-06-27 11:15:05 +01:00
Doug 876618d557 Add support for Account Provisioning links. (#4108)
* Add support for account provisioning links and route them to the authentication flow.

* Use the provisioning parameters to configure the authentication flow.

* Add UI tests for the provisioned authentication flow.

* Record new preview snapshots.

* Add unit tests.

* Make the domain configurable in the app settings.

* Use the loginHint in the login screen too.
2025-05-12 13:28:34 +01: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 9697d59710 Fixes #1918 - Revert 1a12c729de521d2dcb664bed6b19a75ec139bede as #617 is no longer reproducible on iOS 18. 2024-11-15 17:37:50 +02: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