Commit Graph

596 Commits

Author SHA1 Message Date
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
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 d671adcc1c Fix timeline scroll button preview test snapshots 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 ccec2dff6e Update some preview test snapshots 2026-05-21 12:37:52 +03: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
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
Mauro Romito 690a177f6b apply last character font size to the attachment 2026-05-13 12:40:01 +02:00
Mauro Romito 07fc022a65 prevent replies to LLS timeline items, and live location sharing in threads 2026-05-12 17:26:02 +02:00
Mauro Romito d60f5d6efb UI tests updated 2026-05-12 14:46:18 +02:00
Mauro Romito 8318198601 update preview tests (also improved the strings for ltr and rtl testing) 2026-05-12 14:46:18 +02:00
Doug e235e3ba81 Link new device with QR code tweaks. (#5563)
* Hook up Rust's InvalidCheckCode failure to the right state when linking a new device.

* Automatically regenerate a new QR code instead of ending the flow when it expires.
2026-05-11 14:22:34 +01:00
Valere Fedronic ba23153ab4 feat: Render declined calls in DM timeline (#5512)
* feat: Render declined calls in DM timeline

* Record preview snapshots

* review: Use CallIntent constant

* review: clean-up

* Record preview snapshots

* review: Move private field to the bottom with MARK: - Private

* review: Male CallIntent a string enum to use rawValue

---------

Co-authored-by: Element CI <ci@element.io>
2026-05-11 14:51:30 +03:00
Mauro Romito 6d71a3efe5 updated preview tests 2026-05-06 13:53:36 +02:00
Element CI f0aac9295b Translations update 2026-05-04 15:28:22 +03:00
Doug 8f815aafb2 Update TimelineMediaPreviewDetailsView to match the latest design. (#5513)
Update the TimelineMediaPreviewDetailsView design.
2026-04-29 19:34:22 +01:00
Richard van der Hoff 9a2a852af3 Promote "history sharing on invite" out of developer options (#5480)
* Enable key-share-on-invite irrespective of feature flag

* Remove feature-flag dep: warning on starting chat with new people

* Remove feature-flag dep: invite from room member details

* Remove feature-flag dep: warning on new users in invite screen

* Remove feature-flag dep: from room details screen

* Remove feature-flag dep: starting chat from user profile screen

* Remove feature-flag dep: timeline info on forwarded keys

* Remove feature-flag dep: RoomScreenModel

* Remove `enableKeyShareOnInvite` from AppSettings

* Remove `enableKeyShareOnInvite` feature flag

* Remove outdated comments

* Update preview test room snapshots as their header now includes the history sharing icon
2026-04-27 14:43:18 +03:00
Mauro ef26796d98 Open Live Locations map on tapping on the banner (#5477)
* Implemented opening the LLS on our own user when tapping on the banner

* added a test for moving the map as soon as the first update arrives.

* updated preview tests
2026-04-24 13:19:07 +02:00
Mauro 5e2210f1e8 LocationSharingScreen: fix indefinite loading on the center to location button in non picker mode (#5469) 2026-04-22 16:36:15 +00:00
ElementRobot fb94b3fc63 Translations update (#5452)
* Translations update

* translation updates

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-04-21 13:24:41 +01:00
amshak 2a6f94ff48 Notification Decoration Revised (#5312)
1. I removed the grey dots for when there is activity in rooms set to mentions or mute.
2. For all unread rooms, I made the message preview text bold for better legibility
3. For rooms with no unreads, I made the font weight regular, again for legibility

We have also mergeg the new room list activity rendering with the existing feature hide unread badge feature flag and provide 3 variations: current production behavior, no badge but bolding, and no bolding and no badge
2026-04-21 14:12:07 +03:00
Mauro Romito 30ee9c943a updated the UI for the live locations distance to match designs. 2026-04-21 12:32:50 +02:00
Valere Fedronic d49a6e5a5d Support for ongoing voice vs video call + joining (#5399) 2026-04-21 09:11:52 +00:00
Mauro Romito 915007850e fix invite users confirmation sheet strings 2026-04-20 18:33:44 +02:00
Aaron Thornburgh 826946e310 Replace the Cancel button with a Close button on the Space Filters screen. (#5408)
* Updated placement and type of button

Moved the "X"/Close button from the left to the right, and made it a primary action.

* Update snapshots.

---------

Co-authored-by: Doug <douglase@element.io>
2026-04-17 16:14:17 +01:00
Mauro bfb1036aa0 LLS Sheet implementation (#5420)
* Add LiveLocationSheet and refactor existing views to share code

* Implement logic for highlighting a specific LLS from a user once selected in the sheet

* Updated tests, project and added new previews for the LLS sheet.

# Conflicts:
#	PreviewTests/Sources/__Snapshots__/PreviewTests/liveLocationRoomTimelineView.Bubbles-iPad-pseudo.png
#	PreviewTests/Sources/__Snapshots__/PreviewTests/liveLocationRoomTimelineView.Bubbles-iPhone-pseudo.png

* add Equatable conformance to CLLocationCoordinate2D
2026-04-17 11:13:16 +00:00
Doug eef4a2497a Add support for homeserver capabilities to disable the UserDetailsEditScreen UI. (#5421)
Add support for homeserver capabilities to disable editing your user profile.

Also updates editable avatar size/formatting to match the latest Figma at the same time.
2026-04-17 11:52:46 +01:00
Aaron Thornburgh c40454bbd3 Update the icon for "Remove this device" on the Settings screen. (#5415)
* SettingsScreen > Update the icon for "Remove this device"

Change the icon from "Sign Out" to "Close"

* Update snapshots.

---------

Co-authored-by: Doug <douglase@element.io>
2026-04-17 10:34:02 +00:00
Doug 09438cba7c Tweak the font/icon sizes on the Space visibility label. (#5396) 2026-04-17 09:57:18 +00:00
Stefan Ceriu 0a04037609 Update preview snapshots following iOS 26.4 workflow migration. 2026-04-17 12:01:06 +03: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
Doug efbf47441a Use a VStack for invite buttons when the HStack doesn't fit. (#5403)
The Accept/Decline labels were being wrapped onto 2 lines.
2026-04-16 13:01:53 +01:00
Skye Elliot 78240ebdee Prompt user when inviting users with uncached identities (#5331)
If the user attempts to invite someone (to a room or creating a DM) whose identity is not cached, we prompt them to make sure this was their intention.
2026-04-14 14:51:58 +03:00
Stefan Ceriu 7ff2cf618b Add an action to the newly introduced FloatingDateBadge that scrolls the timeline to that day. (#5350)
and replace the TimelnieTableViewController's `floatingDateText` with a pure date.
2026-04-14 11:27:27 +03:00
Doug 7c812201cb Verify Element X with an existing Element Classic account. (#5374)
* Read and import the secrets from ClassicAppAccounts.

* Record snapshots.

* Add some documentation, tidy up tests and fix the dismissal of the backup instructions.

* Workaround flakey tests (the fulfilments weren't always firing).

* Allow a custom Classic App deep link URL to be configured.
2026-04-13 15:30:09 +01:00
Doug 9590443aac Remove the Spaces Announcement sheet. (#5376) 2026-04-10 17:49:28 +01:00
Mauro 922fcafcd5 Live Location Sharing Banner (#5370)
* Live Location Sharing Banner

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj

* updated the top banner modifier and the top banner views

# Conflicts:
#	ElementX/Resources/Localizations/en-US.lproj/Localizable.strings
#	ElementX/Resources/Localizations/en.lproj/Localizable.strings

* improved the stopping function from the timeline item

* stop live location sharing before starting a new one.

* added some tests for LiveLocationManager

* pr suggestions
2026-04-10 14:50:42 +02:00
Valere Fedronic b05ab3ac0b Add support for starting voice calls from a DM (#5305)
* feat: Start voice call from DM

* rename voiceCall:bool to isVoiceCall

* review: Fix a typo

* review: use one displayCall(bool) instead of 2 actions

* review: Add a new specific preview for DM calls

* combine startCall and startVoiceCall in single enum with isVoiceCall

* review: add isVoiceCall to presentCallScreen action

* review: Use proper a11y for voice vs  video

* add voice/video options to UserProfile Screen

* fixup: move config params to the roomInfo object

* review: Revert changes on preview as the toolbar cannot be snapshot'd

* review: Extract call controls in specific file

* oups: Add voice call option in room details screen

* Update room details screenshots

* Update user profile screenshots

* Update room member details screenshots

* fixup: remove dead code
2026-04-09 16:22:31 +01:00
Doug 6978f96f91 Add a view with instructions for enabling backups in Element Classic. (#5359)
No presentation logic yet.
2026-04-08 11:03:30 +01:00
Stefan Ceriu 2b8c21afd1 Update reply view border corner radii and color
And also update relating preview test snapshots
2026-04-01 18:42:45 +03:00
Stefan Ceriu 91a10f4d51 Add RoomThreadListScreen preview snapshots. 2026-03-31 18:21:14 +03:00
Stefan Ceriu e7e1e990db Add a new RoomThreadListScreen and hook it up to the RoomThreadListService
It will automatically paginate to fill the screen and update the list as updates come in.
2026-03-31 18:21:14 +03:00
Mauro Romito d7f8d6d890 reactively determine with a timer if the lls timeline item has expired or not.
Move mockToday410/420/430 to private Date extension in LiveLocationRoomTimelineView

Agent-Logs-Url: https://github.com/element-hq/element-x-ios/sessions/d2136882-1acc-455d-a363-815e0fb73e89

Co-authored-by: Velin92 <34335419+Velin92@users.noreply.github.com>

fix
2026-03-31 14:29:04 +02:00
Doug 07490dd4a9 Add support for iOS 26.4 emoji reactions and ensure older ESS versions still work. (#5329)
* Update the SDK and EmojiBase (with support for iOS 26.4 emojis).

* Update snapshots

(We use 26.1 so the snapshot doesn't support the new emoji)
2026-03-31 13:26:51 +01:00
Mauro Romito 96a13f718e implemented the UI to render the formatted floating date 2026-03-30 14:05:31 +02: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
Mauro b8d337e4ce Render the live location timeline item (#5209)
* created the data for the timeline item

# Conflicts:
#	ElementX/Sources/Other/Logging/Tracing.swift
#	ElementX/Sources/Services/Authentication/AuthenticationService.swift
#	ElementX/Sources/Services/Authentication/LinkNewDeviceService.swift

* Implemented the LLS timeline item

* updated preview tests

* pr and design suggestions

* previewscrollview is debug only
2026-03-24 10:34:00 +01:00
amshak eae10b2125 Changed ordering of Room details screen (#5290)
* Changed ordering of Room details screen

Added media, polls and pinned section on top, because the user is more likely to access those.

* Update snapshots.
2026-03-20 15:12:53 +00:00
Aaron Thornburgh 0601b3248a Use an iOS 26 close button and re-order some sections in SettingsScreen. (#5281)
* Settings > Change Done button to Close

Do it!

* Change ordering of menu item sections

Swap manage app section with manage account section.

* Use a primaryAction placement for the close button.

* Generate the preview snapshots.

* Merge the Manage account and Manage devices actions.

---------

Co-authored-by: Doug <douglase@element.io>
2026-03-20 15:00:10 +00:00
Aaron Thornburgh 81a5e3c486 Update container shape of the File TimelineItem's icon. (#5288)
* Change corner radius of icon container

From round to 4px

* Update snapshots.
2026-03-20 14:08:57 +00:00