91 Commits

Author SHA1 Message Date
Mauro
e91e0513b6
Attach Screenshot in Bug Report Screen (#578)
* 127 Attach Screenshot in Bug Report Screen

* #127 code improvement

* #127 Code improvements, and changed the loading... label to sending...

* using a statically defined identifier for the new defined ui element

* added the RowLabelStyle and improved the design of the view

* code improvement

* code improvement

* making alignment private

* synthesised init
2023-02-15 16:46:53 +00:00
Stefan Ceriu
4fd24a6c16
Fixes #322 - Developer options menu (#581) 2023-02-15 11:07:06 +00:00
Doug
afc660a1ea
Add SwiftFormat wraparguments (#579)
Matches the wrapparameters rule, seems it was missed.
2023-02-15 08:53:10 +00:00
Mauro Romito
e64c61c91f 547 updated unit tests to replace userNotification with userIndicator 2023-02-14 11:35:17 +01:00
Mauro Romito
d7f80807df 547 refactored userNotification into userIndicator 2023-02-14 11:35:17 +01:00
Stefan Ceriu
7ab64d4cb4
Project file removal (#569)
* Deleted project file

* Add back SPM Package.resolved + .gitignore

* Generate project file on release builds

* Converge on single CI setup scripts within `ci_scripts/ci_common.sh`

* Fix unit tests

* Use new `ci_common/setup_github_actions_environment` setup script on all workflows

* Move lfs validation check to the pre-commit hooks. Remove validate-lfs github actions workflow

* Fix integration tests workflow

* Tweaks following code review
2023-02-13 12:53:01 +00:00
Mauro
e5522e7753
Added a progress tracker to the bug report view (#513)
* created a progress tracker class and passed it in the user notification to be observed by the progress view

* improved the publishing by dispatching it on RunLoop.main

* bug report struct created and progress tracker class moved into the Other folder

* some swiftlint adjustments

* fixed tests

* fixed another test BugReportServiceTests

* changelog 495 - change

* added a mock preview

* fixing some linting suggestions

* no need to use KVO, achieve the same result using a publisher

* some refactors to address PR comments

* some code improvements

* fixed the issue that prevented the avatar of the room to be displayed in the mocks, and updated the tests

* Revert "fixed the issue that prevented the avatar of the room to be displayed in the mocks, and updated the tests"

This reverts commit 113d6091d91a3aac1f9a59ff6c5e07610ed59859.
2023-02-08 21:52:31 +01:00
Doug
4d87701ae9
Automatic discovery of the sliding sync proxy. (#535)
* Automatic discovery of the sliding sync proxy.

* Handle homeserver detection from a MXID.

* Update sliding sync info link, SDK and bump patch.

Add a migration on the new version. The change in restoration token format requires the user to sign in again, but this will fail with the existing device ID.
2023-02-08 19:07:02 +00:00
Stefan Ceriu
f8e6179933
Add permalink detection and custom attributed string attributes (#536)
* Pass full attributed string to TimelineItems and let the UI level handle blockquote coalescing
* Add permalink detection and attribute embedding within the attributed string
2023-02-06 14:59:32 +00:00
Doug
2aaeb576d2
Further design updates to the timeline. (#524)
- Decryption banner on the timeline
- Bubble colours
- Background insets
- Multiline composer corner radius
- Read marker
- GIF indicator
- Reactions shape
- Use RoomTimelineViewLabelStyle everywhere possible
- Only set a line limit on reply quotes, allow all the lines for regular quotes.
- Message label icons
- Yes/No button casing
- Make sender profiles immutable.
- Enable copy link and invite buttons.
- Fix layout loop detecting multiline composer text.
- Add animation to the encryption banner.
2023-02-03 14:09:48 +00:00
Stefan Ceriu
594f6f85dd Fix remaining retain cycles, allow coordinators to be weakly referenced and make sure the NavigationStackCoordinator cleans up after itself 2023-02-02 13:08:08 +02:00
Velin92
a8f154740e
iOS: Removing event id links (#509)
* removing unused event id link

* changelog

* Revert "removing unused event id link"

This reverts commit aacd1124498674662123d5598604ef8bfcdfe02e.

* commented the event id add link code

* better changelog

* commenting a tes that is related to the use of event id links which we don't handle for now
2023-01-31 19:42:45 +01:00
Doug
f6629e0d6e
Hardcode the sliding sync proxy. (#502)
* Add support for migrating between versions.
* Rename InfoPlistReader property.
* Bump SDK version.
2023-01-31 17:48:24 +00:00
Doug
4f8cc08989
Handle API changes from Rust. (#506)
There are some bad assumptions about profile changes in here.

* Remove assumption FIXME's

Profile changes that come from other members will be state event of None.

* Bump SDK version.
2023-01-31 13:28:28 +00:00
Gil Eluard
eeb69d1971
Design review for first public TestFlight (#492)
* 430 - Design review for first public TestFlight
2023-01-26 15:32:39 +00:00
Stefan Ceriu
413b433806 Move last message timestamp formatting to the room summary provider and its background processing queue 2023-01-26 16:31:26 +02:00
Stefan Ceriu
bd4c0b72cb
Media loading flow changes (#483)
* Use an imageProvider directly from the view in the home screen

* Add support for media request coalescing

* Rename MediaProxy to MediaLoader

* Add new image loading mechanism to the room details screen avatar.

* Use the `SettingsScreen` prefix for all settings screen related components

* Add new image loading mechanism to the room header

* Add new image loading mechanism to the room member details screen

* Introduce a LoadableImage SwiftUI view that will automatically handle image loading

* Adopt the new LoadableImage where possible

* Fix LoadableImage not using/storing loaded images properly

* Simplify media loader enqueueing

* Made LodableImage load content after mediaSource updates. Adopt it on the home and settings screens

* Introduce a LoadableAvatarImage component and reuse it throughout the app

* Small logging tweaks, made some LoadableImage properties private

* Fix redacted skeletons avatar background color

* Fix placeholder avatars changing when backgrounding the app

* PR comments.

- Trim the @ sign off of mxid placeholders.
- Only expose AvatarSize on the avatar image, use CGSize elsewhere.

Co-authored-by: Doug <douglase@element.io>
2023-01-25 17:45:01 +00:00
Doug
b8e2d6f823
Show the date on a room when the last message is older than today. (#484)
* Format the last message date correctly.
* Update room cell layout - fixes an issue where the longer the date got the smaller the last message width was.
2023-01-24 11:02:51 +00:00
Doug
9f865cf5c9
Improvements to state items (#478)
- Remove context menu (and fix long press when there are no items).
- Add membership change tests.
- Fix new/old name incorrect ordering.
- Fix message grouping when it comes before/after a state item from the same user.
- Only show reactions picker for items that can be reacted to.
2023-01-23 10:01:45 +00:00
Stefan Ceriu
ae8009d040
Various performance tweaks (#474)
* Store and reuse room list placeholder avatars and last messages

* Cache and reuse HomeScreenRooms

* Reduce RoomSummaryProvider diff collection time

* Promote more logs to info

* Slighty tweak RustTracing to make it easier to configure

* Move TimelineProvider and RoomTimelineController item processing to background queues

* Prevent the timeline from stopping an ogoing decelerating scroll when starting backpaginating
2023-01-20 14:40:23 +00:00
Doug
f05fa630c1
Render state items in the timeline and as the last message on the home screen. (#473)
* State events in the timeline WIP
* Implement membership change strings.
* Add other state event types and use in RoomSummaryProvider.

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-01-20 13:37:39 +00:00
Stefan Ceriu
8f3f83167b
Timeline item sender profiles (#463)
* Adopt timeline item sender profiles for displaying user avatars and display names
* Prevent images from automatically being evicted from the in-memory cache when entering background
* Get rid of all the `urlString: String`s and start using proper URLs
* Add back manual display name loading as the sender profiles aren't working properly yet
* Implement a sender profile.
* Bump the RustSDK to v1.0.32-alpha

Co-authored-by: Doug <douglase@element.io>
2023-01-18 14:29:44 +00:00
Doug
8f906c7be7
Fix unit and UI tests. (#460)
* Fix race condition on session verification tests.
* Fix clear button on text field.
* Add a timeout to UI test signalling.
* Use snapshot testing for login screen.
2023-01-18 13:28:59 +00:00
Doug
c8937505d7
Improvements to logging (#457)
* Use `.info` logging in most places.
* Remove old objc logging support.
* Fix table view controller.
* Make sure timeline item content isn't logged.
* Add tests.
2023-01-17 09:28:01 +00:00
Stefan Ceriu
4b56e4af73
Room member details cleanup (#452)
* Fixes #421 - Stop loading room members twice for displaying the members screen
* Rename RoomMembers to RoomMemberDetails throughout
* Add changelog
2023-01-17 09:31:53 +02:00
Doug
c383029203
QuickLook media. (#447)
* Use QL previews for video and present full screen.
* Use URL(staticString:) in more places.
* Fix DesignKit issues.
2023-01-12 17:37:33 +00:00
Stefan Ceriu
357d493e5a
Various fixes (#437)
* Fix information leaking on RoomSummaryDetails logging

* Prevent crashes when force quitting the application

* Cleanup crash detected alert presentation and exposed home screen view model actions

* Fixes #340 - Wait for logout confirmation before changing the app state

* Add changelogs

* Fix unit tests

* Add missing softLogout logout handling
2023-01-11 15:10:26 +02:00
Stefan Ceriu
956e92a9ac Add support for manually starting SaS verification flows and accepting remotely started ones 2023-01-10 13:41:07 +02:00
Aleksandrs Proskurins
bf9b82334d
User sessions tests (#390)
* User sessions tests

* Refactor

- Merge SessionVerificationControllerProxyMock into MockSessionVerificationControllerProxy.
- Merge ClientProxyMock into MockClientProxy.
- Simplify naming.

Co-authored-by: Doug <douglase@element.io>
2023-01-06 10:53:19 +00:00
Aleksandrs Proskurins
e573bc0dd2
Added MediaProvider tests (#386)
* Media provider tests

* Moved classes to separate files

* Moved image file

* Removed unused image file

* Rebase and refactor.

Replace removed error type.
Refactor XYZMock to MockXYZ.

Co-authored-by: Doug <douglase@element.io>
2023-01-05 18:20:49 +00:00
Doug
e4d087a0a4
Replace completion handlers with async/await. (#407) 2023-01-05 16:43:41 +00:00
Aleksandrs Proskurins
a9f2e1bdf8
Added unit tests for NotificationManager (#376)
* NotificationManager tests

* More unit tests

* More tests, moved classes to separate files

* Removed warnings

* UserNotificationCenterProtocol as AnyObject

* Reverted back Package.resolved
2022-12-21 10:06:30 +00:00
Stefan Ceriu
71f1f044c7
Various tweaks (#381)
* Add the message delivery status to the plain timeline styler and display it outside of the main content

* Fix glitchy timeline scroll to bottom button

* Fixed bubbled reactions padding

* Simplified the emoji picker, double tapping a timeline item directly opens it now and added a context menu option. Linked it to rust side reaction sending

* Fix the sliding sync cold cache: treat invalidated rooms as filled

* Make splash screen view full screen

* Fix the offline indicator popping up when first setting up the network monitor

* Expose presentationDetents on the NavigationStackCoordinator and start using them for the EmojiPicker

* Fix link tint color

* Linked TimelineReactionsView reaction sending

* Remove now unused/unnecessary classes

* Add changelog

* Fix formatting issue
2022-12-21 11:18:45 +02:00
ismailgulek
1a47fd1a8d
Room details screen (#348)
* Create screen module

* Display details on header tap

* Add strings

* Add room avatar size on details

* Update members method signature

* Use room proxy values

* Create room members screen

* Display room members on tap

* Update previews and mock room proxy

* Commit project file

* Various tweaks and cleanup following code review

* More small tweaks + UI and screenshot tests

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-12-19 14:39:33 +02:00
Stefan Ceriu
6f974a4422
Resetting the app after deletion and cleanup settings (#372)
* Fixes #361 - Reset everything if the app has been deleted since the last run

* Cleaned up and renamed the ElementSettings to ApplicationSettings. Removed its singleton and moved it to the service locator.

* Moved the ApplicationSettings to the Application folder

* Merged together the BuildSettings and ApplicationSettings

* Reset the UserDefaults too when resetting the application state

* Rename ServiceLocator.applicationSettings to just settings

* Fix indentation

* Rename ApplicationSettings to AppSettings

* Various tweaks following code review

* Fix unit tests
2022-12-16 10:02:22 +02:00
Stefan Ceriu
cd40da6c3f
Fixes #317 - Adopt a split layout for iPad and Mac apps
Rename navigation components: SplitScreenCoordinator -> NavigationSplitCoordinator, StackScreenCoordinator -> NavigationStackCoordinator and SingleScreenCoordinator -> NavigationRootCoordinator
[0c161039] Tweak navigation logging
[826c19cf] Move the navigation dismissal callbacks to the NavigationModule, add SingleScreenCoordinator tests
[b8830d9c] Add tests
[252ad119] Merge the StackScreenCoordinator and SplitScreenCoordinators into a single file and stop publicly exposing their internal workings. Add more documentation.
[37671699] Cleanup navigation logging
[51406184] Use the parent SplitScreenCoordinator to present embedded StackScreenCoordinator sheets
[b94b04c9] Retract the room "syncing" indicator when dismissing a room
[1467b0ac] Correctly move to the no room selected state when popping in compact layouts
[10bf2ad8] Allow nilling root coordinators, replace present/dismiss sheet with setSheetCoordinator(?)
[33716784] Add single screen coordinator fade transition animation
[3cbe65e7] Prevent the timeline table view from being reused between different rooms
[9c94c50b] Move files around
[c10b6bc5] Adapt the user session state machine to the split layout
[7115a319] Fix unit and UI tests
[1ece59e8] Fix login flows
[6884dc3b] Use modules everywhere the underlying object is a NavigationModule
[ab08d44c] Rename navigation components to: SingleScreenCoordinator, SplitScreenCoordinator and StackScreenCoordinator
[ada2be57] Add SplitNavigationController

* Remove the navigationRootCoordinator from the UserSessionFlowCoordinator
2022-12-12 12:31:27 +02:00
Aleksandrs Proskurins
5ef53e9220
Added schema to target.yml for IntegrationTests (#358)
* Added schema to IntegrationTests

* Environment variables

* Removed captureScreenshotsAutomatically
2022-12-08 16:50:12 +02:00
Aleksandrs Proskurins
1e197d48de
Send reaction method placeholder (#355)
* Send reaction method placeholder

* Removed unnecessary emoji skin parsing

* Code review fixes
2022-12-07 11:19:47 +00:00
Doug
b97e6f7a98
Fix keychain access on macOS. (#354) 2022-12-06 17:39:15 +00:00
Aleksandrs Proskurins
7f91852291
Timeline Reactions: Emoji picker (#350)
* Screens template

* Loading and parsing

* Gridview

* New json

* Search method

* Unit tests

* Added emoji provider state

* Removed containsIgnoringCase

* Added plus icon, added double tap gesture, dismiss sheet after selecting emoji

* Renamed EmojisProvider to EmojiProvider

* Renamed EmojiPickerScreenScreen

* Extra padding

* Renamed EmojisLoaderProtocol

* Category names

* Moved method into public section of the class

* Return all categories when search string is empty

* Added cancel button and tittle

* Removed empty lines

* Removed swiftlint warning
2022-12-06 14:04:48 +00:00
Stefan Ceriu
9415bd3a7a Fix tracing configuration unit tests 2022-11-29 18:39:37 +02:00
ismailgulek
cb5db22b7f
Fix state machine crashes & background tasks (#343)
* Fix `UIApplication.shared` after moving to SwiftUI app

* Do not autoplay videos on background

* Move app state changes into the app coordinator

* Add application background task, move into the suspended state more accurately

* Add changelog

* Fix most of the linter errors

* Strip suspended state from state machine

* Fix build

* Clear audio session warning

* Update AppCoordinator.swift

* Update AppCoordinator.swift

* Swift format
2022-11-28 18:42:49 +03:00
ismailgulek
232430ac95
Image viewer (#338)
* Resume other app's music when video playback finished

* Remove old media player

* Add `isModallyPresented` into the video player screen

* Create image viewer screen

* Add test screen identifier

* Display image viewer when message tapped

* Fix template script unit test path

* Tweaks on scaling

* Commit project file

* Add changelog

* Ignore safe areas on the file preview screen

* Display images in preview

* Remove image viewer screen

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-28 11:19:40 +00:00
Doug
5762dc3037 Setup tracing with a typed configuration. 2022-11-28 09:31:33 +02:00
ismailgulek
d389ce7ad7
Notifications (#275) 2022-11-21 19:37:13 +03:00
Doug
ba684d8efb
#166: Re-write MXLogger in Swift
* Add logging tests that cover file rotation.

* Re-write MXLogger in Swift.
2022-11-18 15:02:01 +00:00
Stefan Ceriu
2fd0491a18
SwiftUI NavigationController and UserNotificationControllers (#309)
* Fixes #286 - Adopted the new SwiftUI NavigationStack based NavigationController throughout the application
* Fixes #315 - Implemented new user notification components on top of SwiftUI and the new navigation flows
* Add home screen fade animation between skeletons and real rooms
* Bump the danger-swift version used on the CI and swiftlint with it
* Renamed Splash to Onboarding, Empty to Splash
2022-11-16 13:37:34 +00:00
ismailgulek
287fa4cad5
File messages on timeline (#311)
* Create media player screen

* Introduce `FileCache` to cache message attachments

* Add file loading functionality into the media provider

* Process tap action on timeline items

* Pass item taps to view model

* Navigate to media player on view model callback

* Commit project file

* Add changelog

* Add file messages into the timeline

* Create file preview screen

* Display files in the preview screen

* Commit project file

* Update Rust SDK to 1.0.19-alpha

* Add changelog

* Bump the RustSDK to `v1.0.20-alpha`

* Configure audio session on video playback

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-16 11:34:37 +00:00
ismailgulek
2e56fe9380
Video playback (#308)
* Create media player screen

* Introduce `FileCache` to cache message attachments

* Add file loading functionality into the media provider

* Process tap action on timeline items

* Pass item taps to view model

* Navigate to media player on view model callback

* Commit project file

* Add changelog

* Rename media to video

* Add a loader when large videos being processed

* Add back button explicitly on video screen, fixes for light scheme

* Handle right swipe to dismiss video
2022-11-14 08:58:18 +00:00
ismailgulek
6c6c188f73
Regex: Fixes Permalink action on timeline (#303) 2022-11-09 11:20:19 +00:00