Commit Graph

575 Commits

Author SHA1 Message Date
Stefan Ceriu 0de6231399 Give search breadcrumbs a consistent row height
Query and room breadcrumbs reserved slightly different heights, and
rooms without a description collapsed further. Both now reserve the
space of a title and subtitle so every row lines up.
2026-09-29 21:53:04 +03:00
Stefan Ceriu a78e4f0c2a Add a clear all button to recent searches
Lets users wipe their whole search history at once from the recent
searches section header, as per the designs.
2026-09-29 21:53:04 +03:00
Stefan Ceriu 50b38555b6 Allow removing individual search breadcrumbs
Each recent search now has a trailing close button to remove it from
the history. The view action is logged without its payload so removed
queries don't end up in the logs.
2026-09-29 21:53:04 +03:00
Stefan Ceriu 1464a98ef0 Split the description of the new "Show all activity" notification setting 2026-09-29 21:36:44 +03:00
Mauro Romito e6bd8b0eb9 Fix the build after the translations update
The translations update removed screen_room_confirm_removal_message, as the redaction confirmation now asks the question in its title ("Remove message?"), matching Element X Android. Drop the message from RedactConfirmationView and re-record the previews whose copy changed.
2026-09-29 20:05:14 +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
Mauro ad1d7a3010 Add multi selection to the Forward action (#6190)
* Start message selection from the Forward action

Behind the multi-select developer option, choosing Forward on a message
now starts a selection with that message checked, instead of the
dedicated Select menu action which is removed. Only forwardable
messages can be selected: remote, decrypted, non-redacted events that
aren't state, unsupported, poll or live location items.

The chrome follows the Figma exploration: the room header stays, an X
in the trailing toolbar position ends the selection, rows show only the
checkbox (no highlight, 10pt gap to the bubble), and the composer is
replaced by a single primary "Forward N messages" button. The limits
are now 10 messages into 5 rooms.

Tapping the button forwards the selection in timeline order, never in
the order the messages were tapped. MessageForwardingItem carries
several contents and the forwarding screen sends them one after the
other per room, reporting a single error toast on partial failures.
The selection is kept while the forwarding screen is open so cancelling
it returns to the selection; it is cleared by the flow coordinator once
the messages are sent, or by the X in the timeline.

New plural action_forward_messages lives in Untranslated for now;
action_select and screen_room_selection_count are no longer used.

* Tidy the selection code after review

Reuse ToolbarButton's cancel role for the selection's toolbar item so it
matches the other screens on every OS version, and disable the room
header while selecting so the room details can't cover the selection.

Move the forwardable/selected item helpers next to the existing
nonisolated array extension, drop the unused MessageForwardingItem
initialisers and the single-item makeForwardingItem overload, and
simplify the forwarding loop now that a room either sends or isn't
reachable.

The action bar preview builds its own view model instead of putting
the shared mock into selection mode for every later preview, and a
test locks that Forward keeps forwarding directly in the pinned
timeline.

* Select messages to forward from the pinned timeline too

Forward is offered in the pinned events timeline, so with the flag on
it starts a selection there as well, with the same cancel item in the
toolbar and the same forward button at the bottom. Forwarding from
that sheet already dismisses the whole sheet, so the selection is
discarded with it. Only the media timelines keep forwarding a single
item directly.

* Confirm with a toast when messages are forwarded to several rooms

When a single room is picked the flow opens it, which is confirmation
enough. When several rooms are picked the user stays in the origin room,
so a "Messages forwarded" toast tells them it worked, as in the designs.
The new screen_room_message_forwarded / screen_room_messages_forwarded
strings live in Untranslated for now.

* Apply review suggestions to multi-message forwarding

Strings
- The forward button and the multi-room toast now use the Localazy
  plurals action_forward_messages and screen_room_messages_forwarded;
  the toast shows the count. The Untranslated copies and the unused
  action_select are gone.

Selection
- Drop the dead startSelection view action and the redundant
  canSelectMessages guard; tests start a selection through Forward
  like the app does.
- Remove two comments on the selection state that restated the code.

Forwarding
- After a send, clear the selection in the room and any open thread
  instead of working out which one started it; only one can be
  selecting at a time.
- Explain that stickers are excluded because the SDK can only forward
  m.room.message content.

* Rename the timeline selection to message selection

"Selection" alone was too generic in a timeline that also has text and
room selections. The selection state, toolbar, action bar and
accessibility types, the timeline state's property, the view actions
and the public clear method now say "message selection". Private
helpers keep their short names.

* Rename MessageForwardingItem to MessageForwardingPayload

The type now carries several messages, so "item" no longer described
it. The factory method and the variables and action labels holding it
follow the new name.
2026-09-25 11:51:14 +00:00
Stefan Ceriu fc8ee9d93d Room list notifications tweaks (#6106)
We decided against changing how unread activity is rendered in the room list, so the experiment and its developer option are no longer needed.
we have also added a notification settings entry for hiding the room list gray dots.
2026-09-25 13:36:33 +03:00
Stefan Ceriu 8572150b70 Remove the room list notification count feature flag.
The room list now always shows the unread notification count for highlighted rooms
and the app icon badge always uses the SDK's own unread notification count, both in
the app and in the NSE. The push payload's unread count is no longer used, so its
UNNotificationContent helper and user info key have been removed along with the
setting, its developer options toggle and the feature-disabled unit test.
2026-09-23 17:57:42 +03:00
Doug 8ba47a333a Update the Start Chat button's icon. (#6179) 2026-09-22 17:40:59 +01:00
Stefan Ceriu 482cc0fee8 Show recent searches on the search screen
The search screen's empty state now lists the queries the user searched
for and the rooms they opened from the results, newest first, capped at 25
and stored in AppSettings. Tapping a query fills the search field, tapping
a room opens it, and both are reachable with a hardware keyboard.

Rooms are resolved from their identifiers as the room list loads, and
those the user has left or is only invited to are dropped. The history is
cleared on logout.
2026-09-16 11:37:11 +03:00
Stefan Ceriu 9bff070648 Hide the search mode picker until there's a query
The chats/messages picker has nothing to switch between before a query is
entered, so it only shows once the user starts searching.
2026-09-16 11:37:11 +03:00
Doug a150df584d Update the read marker colour to match the Figma. (#6146) 2026-09-10 13:26:10 +00:00
Mauro e57d872fc8 Scope dark mode change only to the presenting sheet (#6144)
* Scope dark mode change only to the presenting sheet, instead of the whole window

* Apply review suggestions to the presentation colour scheme modifier

API:
- Take a `ColorScheme?` at the SwiftUI level instead of a `UIUserInterfaceStyle`
  and map it once inside the representable (`nil` means no override).
- Rename to `presentationColorScheme` and the file to match.
- Restore the `preferredColorScheme` property on the media preview details and
  redact confirmation views, and the `nil` at the media timeline call site, so
  no UIKit types leak into the views.

Cleanup:
- Walk the responder chain with `sequence(first:next:)` instead of a while loop.

* Re-record the media upload preview iPad snapshots

The Cancel button no longer has an explicit tint, so its label colour changed
very slightly from `textActionPrimary` to the default. Only the iPad references
include the toolbar, which is why the iPhone ones were unaffected.
2026-09-10 10:23:56 +02:00
Mauro 426fdc70a1 Add a developer option and selection mode for timeline messages (#6102)
* Add a developer option and selection mode for timeline messages

First step of the multi-select messages feature (element-meta#3255, iOS
counterpart of element-x-android#6918). Everything is gated behind the new
`messageMultiSelectEnabled` developer option and nothing changes while it
is off.

- Adds a "Select" action to the timeline item menu for remote messages in
  the room, focused and thread timelines. Choosing it enters selection
  mode with that message selected.
- While selecting, every bubbled row shows a checkbox on its leading edge
  and tapping or long pressing a row toggles it. State events, redacted
  messages, live locations, unsupported events and local echoes cannot be
  selected and stay inert. Selected rows get the accent background.
- The navigation bar swaps to a Cancel button and an "N selected" title,
  the back button is hidden and the composer is removed until the
  selection ends (Cancel or deselecting the last item). This is the hook
  where the bulk action bar will land in the next PR.
- The selection is capped at 30 messages, showing a toast when the cap
  is hit, and is cleared if the developer option is switched off.
- The selection state lives in `TimelineViewModel` so room and thread
  timelines share the behaviour without extra plumbing.

Includes unit tests for the menu action gating and the selection state
transitions, plus RoomScreen and bubble styler previews for the new state.

* Harden the timeline selection mode after review

- Reconcile the selection with timeline updates: selected messages that
  become unselectable (e.g. redacted) are dropped, and the selection is
  cleared when the timeline is swapped for a focused or live one, so the
  count can never refer to items that aren't on screen.
- Keep the composer mounted but collapsed while selecting, instead of
  removing it from the hierarchy. This preserves the draft and composer
  mode and avoids the disappear side effects. The footer with the identity
  warnings stays visible.
- Give the long press modifier an `isEnabled` flag so the recogniser is
  disabled while selecting, rather than only skipping the action while
  still animating and buzzing.
- Gate the Mac context menu on the selection like the other gestures.
- VoiceOver: a selectable bubble becomes a button carrying the selected
  trait whose default action toggles it, non-selectable rows lose their
  message actions while selecting, and reactions, thread summaries and the
  checkbox are hidden from the accessibility tree in selection mode.

* Stop voice message recordings when entering selection mode

The composer is collapsed rather than removed while selecting, so an
in-progress recording would otherwise keep the microphone open out of
sight. Entering the selection now stops the recording, which moves the
composer to the preview state so the message is still there to play or
send once the selection ends. Playback of voice messages is unaffected.

* Use the translated strings for the message selection mode

The selection strings have been imported to Localazy, so the untranslated
placeholders are dropped in favour of `action_select`,
`screen_room_maximum_messages_selected` and the `screen_room_selection_count`
plural. Only these keys are taken from the download to keep the change
focused.

* Apply review suggestions to the message selection mode

Addresses the first review round on the selection mode:

- Undecryptable messages are no longer selectable, as none of the bulk
  actions can be taken on them from the single item menu either.
- Renames for clarity: the menu action is `selectMessages` (leaving room
  for a future `selectText`), the view action is `startSelection`, the
  state exposes `contains(_:)`, `limit` and `isAtLimit`, and the composer
  collapsing modifier is `collapsedInPlace(_:)`.
- `canSelectMessages` uses a switch expression, the selection state doc
  comment refers to a feature flag rather than Labs, the recording helper
  doc describes only what it does, and `toggleSelection()` moves below
  the subviews.

* Keep the accessibility labels of timeline items while selecting

The selection mode used to replace each item's accessibility body with a
plain combined element, dropping the sender name representation and the
gallery label. The per item labelling now always applies, and the selection
only changes the interaction on top of it: the message actions are offered
as before, or the item becomes a button carrying the selected trait whose
default action toggles it. Polls and galleries collapse into a single
element only while selecting, as their children are inert then.

* Keep the timeline types within the lint limits after rebasing

The redaction reason work on develop grew the menu action handler and the
timeline view model right up to SwiftLint's size limits, so the selection
additions tipped them over. The `selectMessages` case now shares the
`downloadMedia` break and the selection flag subscription lives in the
selection extension.

* Fix the snapshot regressions from the selection mode

- Drop `geometryGroup()` from the bubble row: it stopped the avatar
  placeholder initial from rendering, which showed up as a mismatch in
  every timeline item snapshot.
- Collapse the composer with opacity instead of clipping, as the clip also
  removed the composer background from the home indicator area while the
  composer was fully visible.
- Keep the timeline item menu preview on the default flag-off state so the
  existing menu snapshots stay valid.
- Record the new "Selecting" room screen and "Selection" bubble snapshots
  on the same iPhone SE simulator CI uses.
2026-09-09 13:36:57 +02:00
Stefan Ceriu ac183daff8 Show message counts on room list notification badges 2026-09-08 18:09:25 +03:00
ElementRobot e32e1dd388 Translations update (#6111)
* Translations update

* update preview tests

---------

Co-authored-by: Element CI <ci@element.io>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-09-08 13:08:25 +02:00
Mauro 346a1e8ebb Redaction reason (#6098) 2026-09-07 18:57:05 +02:00
Stefan Ceriu 4355307ba0 Add support for <details> and <summary> tags (#6077) 2026-09-03 11:47:12 +03:00
Stefan Ceriu 7052751e38 Update preview test snapshots 2026-09-03 11:44:32 +03:00
Matthew Hodgson eec2facab1 Add a Mentions room list filter (#5885)
* Add a Mentions room list filter

Adds a new filter chip to the room list that shows only rooms with
unread mentions, using the new mentions room list filter from the
Rust SDK (matrix-org/matrix-rust-sdk branch matthew/mentions-filter).

The SDK version needs bumping to a release that includes the new
filter kind before this can build against the released components.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Order the room list filters by expected usage

Move Favourites ahead of People and Rooms so the more commonly used
filters (Unreads, Mentions, Favourites) sit first in the chip row —
Rooms and Invites are used rarely enough that it's fine for them to
wrap off the side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uk8aPxHn3BHCe52L226jdG

* update the SDK and use the appropriate rust filter types

* preview tests + app settings flag for mentions

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-09-01 18:08:00 +02: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
Aaron Thornburgh 600b9224b3 Updates to Notification Settings (#6075)
* Updates to Notification Settings

Move "Invitations" and "Notify me on @room" to the section labeled "Notify me for"

* Record preview snapshots

* Update @room mentions label.
2026-08-27 14:21:15 +01:00
Doug 353233672a Fix settings screen snapshots. 2026-08-25 16:40:21 +01:00
Mauro Romito 024b02324e update preview tests 2026-08-24 14:49:17 +02:00
Doug 84556c0672 Enable the User Status feature on supported homeservers. (#6059)
* Remove the user status feature flag.

* Handle User Status in tests.
2026-08-24 11:00:31 +01:00
Stefan Ceriu 70714dd7f7 Update preview test snapshots 2026-08-21 17:01:54 +03:00
Doug b27a549ef8 Update the toolbars in the Chats/Spaces screens. (#6043)
* Fix an issue with macro compilation when using Xcode previews.

* Update the Chats/Spaces toolbars to match the Figma.

Fixes a bug with the status emoji in the liquid glass button.
2026-08-18 17:50:15 +01:00
ElementRobot f090f30e7e Translations update (#6036)
* Translations update

* Update snapshots.
2026-08-17 14:17:05 +00:00
Michael 6efa8743ff Combine the Server Selection screen into the Server Confirmation screen and add autocompletion when entering an account provider. (#5949)
* Adjust login flow to exclusively use the ServerSelectionScreen

* Move async code to server selection vm

* ServerSelection supports pro picker options

* Use homeserver address for both confirmation and picker modes

* rename ServerSelectionScreenMode

* remove ServerConfirmationScreen

It's been superseded by the ServerSelectionScreen

* rename userInput

* Update strings with latest design strings

* Add server input autocompletion

* Store previous servers in AppSettings and autofill on server signin

* Audit changes for logging

* Enforce lowercase server history storage

* Update tests

* Update Xcode project

* PR review fixups

* Add HomeserverHistoryManager

* Review fixups 2

* Review fixups 3
2026-08-10 18:38:37 +01:00
Doug a82726a991 Add timeouts after verifying the device owner when linking a new device. (#5970)
* Support for waitingForAuth continuation sender during Link new device

* Stop automatically regenerating new QR codes when they expire.

This reverts part of commit e235e3ba81.

* Add a timeout after the Face/TouchID verification when linking a desktop computer.

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2026-08-06 14:56:34 +01:00
Doug 1e78825b0b Rename properties and sort members in advance. 2026-08-03 15:00:38 +01:00
Kai 3ab0aacabf Add call icon next to members in call (#5941)
* feat: add call icon next to members in call

* feat: use matrix rtc room status for in-call

* chore: revert xcodeproj change

* chore: update preview tests

* chore: Update ElementX.xcscheme

* chore: undo room member status proxy

---------

Co-authored-by: Kai <nankeen@users.noreply.github.com>
2026-08-03 15:00:38 +01:00
Doug 94cd9590b5 Allow clearing your own call status. (#5959)
* Allow clearing your own call status.

* Clarify the names of the SettingsScreenUserStatusRow.Mode cases.
2026-07-31 18:15:42 +01:00
Mauro Romito 3eb8075913 use fixed size 2026-07-31 15:14:39 +02:00
Mauro Romito e498271420 Revert "size fitting preview tests for the media events timeline"
This reverts commit 666eee86fa0f5da845268bfebcf0173162649de8.
2026-07-31 15:14:39 +02:00
Mauro Romito dbb14e0df4 size fitting preview tests for the media events timeline 2026-07-31 15:14:39 +02:00
Mauro Romito 68a277143a use the appropriate timeline kind (to be refactored) 2026-07-31 15:14:39 +02:00
Mauro 704b3dbb29 Render replies to gallery items (#5942) 2026-07-29 16:28:46 +02:00
Mauro 4d7d61dae7 Render galleries with non-visual attachments as a list (#5932)
* Render galleries with non-visual attachments as a list

Adds GalleryListView (with GalleryDivider) for galleries containing a file or audio item, extracting the shared FileTypeIconView from FileRoomTimelineView. GalleryRoomTimelineView picks the list vs the grid via usesListLayout. Tapping to open the preview lands in a follow-up.

Co-authored-by: svetoslav.mitov <svetoslav.mitov@sportinno.com>

* pr suggestions

---------

Co-authored-by: svetoslav.mitov <svetoslav.mitov@sportinno.com>
2026-07-27 18:46:15 +02:00
ElementRobot 5262350b40 Translations update (#5931)
* Translations update

* update preview tests

---------

Co-authored-by: Element CI <ci@element.io>
Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-07-27 14:36:14 +02:00
Mauro 274da99787 Render image and video in galleries as a grid (#5929) 2026-07-24 18:47:39 +02:00
Doug 3796fdc966 Fix call timeline item snapshots. (#5923)
* Fix call timeline item snapshots.

* Fix a warning and hard code the call timer during tests.
2026-07-23 14:42:44 +01:00
Doug d4849a2a79 Remove the requiresExtraAccountSetup badge. (#5921)
It is no longer part of the designs, we only badge the item in Settings.
2026-07-23 09:06:25 +01:00
Valere Fedronic 0f72fe3511 Add support for active call item rendering in timeline (#5775)
* feat(timeline): Add support for active call item rendering in timeline

* Update active call as per design (show raw count of members)

* fixup project files

* revert unexpected generated mocks change

* code review

* Record preview snapshots

* revert changes on project.yml

* post rebase fix
2026-07-22 15:13:46 +01:00
Doug 94313173f0 Add a warning to the Link New Device instructions. (#5916) 2026-07-22 14:56:49 +01:00
Doug b46189d05f Add support for showing the user's own status over their avatar on the app's Settings button. (#5912)
* Add a common .inverseMask view modifier and use a blend mode for efficiency.

This also fixes the snapshot rendering 🎉

* Add support for the status emoji on the app's Setting button.

* Align the room header decoration icons with the status emoji.

* Add missing snapshots.
2026-07-22 14:53:32 +01:00
Stefan Ceriu e4f919e58f Update SearchScreen snapshots 2026-07-22 15:40:56 +03:00
Mauro 9093631f8b Periphery cleanup (#5893) 2026-07-20 11:16:11 +02:00
Doug e8fffe35d2 Update snapshots. 2026-07-17 17:26:46 +01:00