389 Commits

Author SHA1 Message Date
Stefan Ceriu
24572c6582
Rename screens (#826)
* Rename: AnalyticsPrompt -> AnalyticsPromptScreen

* Rename: AnalyticsSettings -> AnalyticsSettingsScreen

* Rename: Settings -> SettingsScreen

* Rename: SessionVerification -> SessionVerificationScreen

* Rename: BugReport -> BugReportScreen

* Rename: FilePreview -> FilePreviewScreen

* Rename: AnalyticsPrompt -> AnalyticsPromptScreen

* Rename: Invites -> InvitesScreen

* Rename: InviteUsers -> InviteUsersScreen

* Rename: MediaPicker -> MediaPickerScreen

* Delete unused UIActivityViewControllerWrapper

* Rename: ReportContent -> ReportContentScreen

* Rename: RoomDetails -> RoomDetailsScreen

* Rename: RoomMemberDetails -> RoomMemberDetailsScreen

* Rename: RoomMemberList -> RoomMemberListScreen

* Rename: Cleanup

* Renaming missed items

* Low effort attempt at fixing the flakey unit tests
2023-04-24 18:48:07 +03:00
Stefan Ceriu
5a14c700cc
Add animated gif support (#825) 2023-04-24 17:44:58 +03:00
Stefan Ceriu
0cbb5e6d26
Media uploading preprocessor tests (#820)
* Add sample files to use in the MediaUploadingPreprocessor unit tests
* Add MediaUploadingPreprocessor unit tests
2023-04-21 19:04:02 +03:00
Nicolas Mauri
b432bd6fe4
Fix: forget the user’s consents for analytics on logout (#816)
* Fix: forget the user’s consents for analytics on logout

* Fix: change how analytics consent state is stored

* Fix: renaming of AnalyticsConsentState entries
2023-04-21 15:05:39 +00:00
Alfonso Grillo
078799c1e2
Add invites badges (#819) 2023-04-21 11:14:27 +00:00
Alfonso Grillo
4db6e68d79
Refactor UserSetting property wrapper to support Codable (#814)
* Add UserPreference property wrapper

* Delete UserSetting property wrapper

* Add PlistRepresentable support

* Add more convenience inits

* Add documentation

* Add UTs

* Fix flaky tests

* Fix more flaky tests

* Fix double optional problem in UserPreference

* Refine UTs

* Delete cache in UserPreference

* Conform Date to PlistRepresentable
2023-04-21 10:46:04 +00:00
Stefan Ceriu
1815b0a7ac Remove unused ScreenshotDetector 2023-04-21 13:27:19 +03:00
Stefan Ceriu
7a1cbdf6b1 Fix IS_RUNNING_UNIT_TESTS not being set in the right place 2023-04-21 13:27:19 +03:00
Flescio
88d3faf77d
Move search users into a dedicated service (#789)
* add users provider with test

* add ui test for search users

* add changelog

* Update ElementX/Sources/Services/Users/UsersProvider.swift

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* add error handling in usersprovider

* remove empty section

* add search in invite users

* add CancellableTask, add setup App Settings in UnitTest, screenshots

* rename of UserDiscoveryService

* Update ElementX/Sources/Other/Extensions/Publisher.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* new error management for User Discovery Service

* Update ElementX/Sources/Other/CancellableTask.swift

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* Update ElementX/Sources/Services/Users/UserDiscoveryService.swift

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* fix invite users and start chat errors

* use only one task to fetch user profile

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-04-21 09:11:15 +01:00
Alfonso Grillo
9921b315b3
Accept and decline invites (#806)
* Add accept/decline invite api

* Fix isDirect logic

* Add logic for accepting/decling invites

* Add error handling structure

* Add decline alert

* Add navigation to joined room

* Add generic error

* Add changelog.d file

* Cleanup

* Fix failing UTs

* Add UTs

* Add UI tests

* Cleanup

* Update ref screenshots

* Refactor invitesScreen state

* Improve switch handling in UserSessionFlowCoordinator

* Fix build error
2023-04-19 17:05:24 +02:00
Nicolas Mauri
5b7ec6c9e2
Set up Analytics to track data per session (#780) 2023-04-18 07:33:32 +00:00
Doug
d01349a60e
Use iOS localization handling for strings. (#803) 2023-04-17 14:58:39 +00:00
Flescio
2b6392e635
Select members before creating a room (UI for selection) (#766)
* add invite users in room flow

* add selectable user cell

* add screenshoots

* add unit test

* add button style

* add scroll to bottom when added user

* rebase screenshot from develop

* add changelog

* rename invite users files

* fix static viewModel

* fix buttonStyle, fix unit test

* UI test for selected user

* remove fixed height size

* fix saled width for horizontal cell

* add usersSection, screenshots

* use publishers pattern

* add selectable form button style

* add comment

* improve readability

* some rename on InviteUsers

* fix compile issues

* add search content
2023-04-17 08:29:30 +00:00
Mauro
3d0d883637
Notifications are now handled when the app is in a killed state (#801)
* WIP, added support for receiver id and managed a way to store the app router state

* WIP, added support for receiver id and managed a way to store the app router state

* Notification Manager is now becoming the UNUserNotificationDelegate ASAP

* code improvements + changelog

* fixed Unit Tests

* pr suggestions
2023-04-14 14:24:48 +02:00
Alfonso Grillo
41994baa4f
Invites list (#787)
* Setup invites SS window

* Add invites label in the home screen

* Add empty invtes list

* Setup navigation to invites list

* Inject invitesSummaryProvider

* Show invites

* Add InviteCell

* Refine InviteCell UI

* Push invites

* Amend SS configuration

* Add inviter in RoomProxyProtocol

* Add Invite model type

* Improve InviteCell

* Fix media provider injection

* Refine InviteCell

* Refine invite cell

* Add invites feature flag

* Try different SS config for invites

* Regiester invites view in configureViewsPostInitialSync

* Cleanup

* Start tests

* Cleanup code

* Add changelog.d file

* Add tests

* Handle canonical alias

* Add InvitesListScreen previews

* Add localisations and improve UI tests

* Add reference screenshots

* Cleanup code

* Fix UT build errors

* Refactor InvitesList -> Invites

* Apply pr comments

* Remove reduntant @MainActor

* Naming cleanup

* Fix InvitesScreenCell.title

* Add accept/decline InvitesViewAction

* Revert Package.resolved

* Add warning in InvitesScreenCell

* Improve PlaceholderAvatarImage

* Record snapshots again

* Refactor Invite -> InvitesRoomDeatils

* Rename identifier in PlaceholderAvatarImage
2023-04-14 10:49:57 +00:00
Doug
30a3efcf51
Fix project warnings (#791)
- Swift 5.8 warnings
- Run SwiftFormat 0.51.5
- Fix SwiftLint blanket_disable_command warnings. (Assets.swift will be fixed by SwiftGen).
2023-04-12 09:33:38 +00:00
Stefan Ceriu
cabb8e5442
Sliding sync v2 (#775)
* Adopt latest rust Sliding Sync changes

* Bump SDK, converge on similar to configure both sliding sync lists

* Adopt latest SDK version, fix breaking changes

* Fix unit tests
2023-04-06 18:43:08 +03:00
Mauro
0bce9918e6
Notifications Enabled (#760)
* Notifications Enabled with default static text

notifications enabled with default static text

code improvement

added the share key

* added the changelog

* notification ID is added to the json only if it exists

* renamed Bundle.mainApp to app and updated the strings from localazy

* made a struct for the APNSPayload

* APNS Payload fix
2023-04-05 20:16:30 +02:00
Alfonso Grillo
9998fadd3b
Refactor vm context (#769) 2023-04-05 17:19:05 +00:00
Alfonso Grillo
2439431287
Improve tests' reliability (#763)
* Create publisher extension into the unit test target

* Add ViewModelContext test extension

* Refactor BugReportViewModelTests

* Fix failing UTs

* Idea PublishedClosure

* Refactor RoomDetailsViewModelTests

* Replace more Task.yield/Task.sleep

* Move leaveRoom/ignore/unignore under the @MainActor

* Revert "Idea PublishedClosure"

This reverts commit 4ab25291041f0dbd99083baf9d95bc6647f1fd97.

* Make process(viewAction:) sync

* Refactor BugReportViewModel callback to a publisher

* Fix UTs

* Refactor ReportContentViewModel

* Fix ui test build error

* Try make sonar happy

* Empty commit

* Revert "Try make sonar happy"

This reverts commit 97804b19373a8f55f12174ccbf27f1fd8db583b7.

* Rename ui test identifier

* Cleanup

* Callback -> actions refactor

* Update template

* Add publisher in TemplateCoordinator

* Add env variable in IntegrationTests.xctestplan

* Add async sequence extension

* Amend integration test plan

* Remove env variable from target.yml

* Cleanup

* Fix failing UI tests
2023-04-05 17:07:12 +02:00
Mauro
d24ee73d15
Fixed translation bug when the locale contained the region (#765)
* Fixed the issue, added tests and italian translation

* changelog

* improved translation handling code and added more tests

* Update UnitTests/Sources/LocalizationTests.swift

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-04-05 10:36:02 +02:00
Alfonso Grillo
ea979d6515
Improve user search using the GET profile (#754)
* Add getProfile in ClientProxyProtocol

* Add fetchProfileIfNeeded

* Refactor search

* Update StartChatSuggestedUserCell UI

* Add showProfilePopover action

* Remove popover code

* Add UTs in StartChatViewModelTests

* Add UI tests

* Cleanup code

* Refine design

* Fix design

* Localise StartChatSuggestedUserCell

* Update localisations

* Update StartChatSuggestedUserCell design

* Fix UT

* Fix PR comments

* Apply suggestions

* Fix typo
2023-04-04 10:47:41 +02:00
Mauro
0f858d977f
DM Details View (#744)
* Basic implementation completed but it requires some bug fixing and polishing (+4 squashed commits)
Squashed commits:
[43f0064e] now the content of the room details reflects the expected dm details content when the conditions are met
[fe6f2b5e] replaced existing headers with a composable and reusable HeaderView
[3c00120a] now the members are fetched every time the room is opened
[421d539b] refactored the members fetching to be immediate in case the room could be a direct chat

* polished the code and fixed some bugs that prevented the updated state of the members to be displayed in the room details view (+1 squashed commit)
Squashed commits:
[6bf98473] fix for the button not being destructive in room details screen

* removed copy button and updated copy

* moved a file and renamed header view

* addressed all PR comments

* sdk bump

* UI tests

* unit tests

* changelog

* updated mocks

* removed a duplicated signature in a mock
2023-04-03 13:18:19 +02:00
Doug
220138d492
Add Block user to Report Content screen. (#742) 2023-04-03 10:21:24 +01:00
Stefan Ceriu
8b11727f19 Various tweaks following code review 2023-03-31 17:00:36 +03:00
Stefan Ceriu
5f6edacc1a Implements #745, #746, #747 - Initial media uploading flows
- room composer contextual menu for selecting source
- coordinator for presenting the different sources
- system picker handling and URL passback
- file preview after selection
- feature flag
2023-03-31 17:00:36 +03:00
Alfonso Grillo
e15b36b916
Add user search for dm chats (#739)
* Add searchUsers in ClientProxy

* Add UserSearchProtocol

* Delete UserSearch file

* Add search

* Refine StartChatScreen

* Improve StartChatViewModel

* Add localizations

* Fix no result style

* Update localizations

* Add UTs

* Add UI tests

* Cleanup

* Refine tests

* Add changelog.d file

* Naming refactor

* Refactor ClientProxyProtocol api

* Fix typo

* Add mark

* Rename tests

* Update Dangerfile

* Improve UI test code

* Refactor search api

* Improve style

* Improve combine chain

* Add comment

* Improve StartChatScreen

* Improve updateState

* Add extension Published.Publisher

* Improve UI tests

* Remove Combine import

* Cleanup

* Remove “proxy” wording

* Delete extra extensions

* Refactor Publisher api
2023-03-29 14:29:25 +02:00
Alfonso Grillo
f67207616b
Add test plans for all test targets (#740)
* Add UnitTests test plan

* Add IntegrationTests plan

* Add changelog.d file

* Update ElementX schema
2023-03-29 10:48:06 +00:00
Doug
d7622ea731
Update UI tests (#730)
* Update snapshots.

* Fix timeline grouping and UI tests.

* Remove German UI tests with double-length pseudolanguage.

Avoids tests breaking when translations are updated.
2023-03-28 13:06:53 +00:00
Mauro
e1df5310b7
Ignore User UI (#737)
* generated files

* Revert "generated files"

This reverts commit f62c1dbcd9e505083ad4ff17532e2c054e253187.

* renaming files to RoomMembersList

* completed the renaming of the list files

* added generated files

* basic setup of the view and the mock

* added a new mock with a avatar

* share/copy link

* copyUserLink implemented

* removed unimplemented tests

* block user UI

* navigation to room member details added

* implemented but we require a sync from the Rust side

* adjusted some UI test screens

* alert for unblocking

* completed

* some tests

* changelog

* ignore user ui enabled

* loader inside the button when the request is fetching

* removed unused code

* blocking the button while loading

* improved the code

* changelog

* UI tests

* unit tests

* added collection concurrency kit

* Revert "added collection concurrency kit"

This reverts commit 499fbe129f73a75e903d9f4952fe2ad672930f04.

* replaced the asyncMap with a @MainActor builder function

* pr comments

* added localazy to setup

* sdk bump to 1.0.49
2023-03-28 09:00:40 +00:00
Doug
2b753b1135
Use strings from Localazy (#718)
* Adopt strings from Localazy.

* Remove all old Android strings.

* Disable german snapshot tests for now.

* Rebase and add latest strings.
2023-03-27 17:18:59 +00:00
Mauro
8daa23b27a
RoomMemberDetailsScreen (#727)
* generated files

* Revert "generated files"

This reverts commit f62c1dbcd9e505083ad4ff17532e2c054e253187.

* renaming files to RoomMembersList

* completed the renaming of the list files

* added generated files

* basic setup of the view and the mock

* added a new mock with a avatar

* share/copy link

* copyUserLink implemented

* removed unimplemented tests

* block user UI

* navigation to room member details added

* implemented but we require a sync from the Rust side

* adjusted some UI test screens

* alert for unblocking

* completed

* some tests

* changelog

* some unit tests

* improved the tests

* removed unused comment

* Update ElementX/Sources/Services/Room/RoomProxy.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* optional displayName

* removing toggle

* removed cancel title

* Update UnitTests/Sources/RoomMemberDetailsViewModelTests.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* removing Group

* pr suggestion

* better naming

* removed capitalizingFirstLetter

* Update ElementX/Sources/Other/Extensions/Alert.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* trailing closure

* removed useless catch clause

* naming conformed to ignore

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-24 20:27:47 +01:00
Flescio
9cd38d1a4c
Show or create direct message room (#716)
* add start chat flow with UI

* add feature flag for start chat

* add changelog

* fix naming and tests

* fix empty display name in user cell

* Update ElementX/Sources/Application/AppSettings.swift

Co-authored-by: Alfonso Grillo <alfogrillo@element.io>

* add screenshots from UI test

* fix swiftFormat and add identifiers

* fix warnings

* add the create or open already existing direct room feature

* add changelog

* add UserProfile object, add loading indicator in start chat flow

* fix test

* add new section for user profile in start chat

* fix duplicates input on search bar

* Update ElementX/Sources/Services/Client/ClientProxy.swift

Co-authored-by: Alfonso Grillo <alfogrillo@element.io>

* Update ElementX/Sources/Services/Client/ClientProxy.swift

Co-authored-by: Alfonso Grillo <alfogrillo@element.io>

---------

Co-authored-by: Alfonso Grillo <alfogrillo@element.io>
2023-03-24 15:16:07 +00:00
Mauro
fe72d34d11
Room Member is now an interface SDK update (#711)
* migrated to the usage of a Protocol for the RoomMember

* removed unused file

* code improvement

* sliding sync new states

* sdk bump

* fix for tests

* fixing tests

* package resolved rollback

* rollback package.resolved

* fixed a mistakenly removed dependency

* Revert "fixed a mistakenly removed dependency"

This reverts commit 096d9da6142d8117bc1dfa6d5bbbd797b43b31ad.

* removing unnecessary Identifiable conformance

* pr suggestions

* pr comment
2023-03-22 12:36:08 +00:00
Doug
efdb47a98a
Move media file loading logic to the SDK. (#702)
* Adopt getMediaFile for media previewing.
2023-03-20 14:51:33 +00:00
Mauro
61d42a24ba
Leave Room (#699)
* created the row in the view and the alert, and added the new function to the RoomProxy

* fixed an issue with the alert function

* handling the navigation

* fixed a bug with the detail coordinators being dismissed incorrectly when inside a stack

* implementation completed

* replaced UI screenshots

* added a test for the fixed bug of the coordinators

* trying to increase the wait time for the expectation

* improved the test

* improved the buttons UI

* uploading artifacts for unit tests

* added result bundle true

* improved the tests

* added a new test

* pr suggestions

* updating mock

* PR suggestions

* improved tests

* fixed UI tests

* pr should be ready now

* removed testing code

* reduced complexity

* fixed test

* added a an assert to the new test case

* more tests and messages cases

* pr comments addressed

* completed
2023-03-17 13:57:08 +00:00
Mauro
7544619a55
Updated setPusher function (#684)
* updated set_pusher function from the SDK

* this fixes a crash and allows for the navigation to work by using the threadIdentifier of the notification

* adding NCE target

* project setup completed with xcodegen

* no need for those ugly storyboards

* code improvement

* removing unused outlet

* mocks generated with the comment instead of the marker protocol

* updated stencil

* fixed unit tests

* updated swiftformat

* pr comments
2023-03-16 16:39:10 +01:00
Doug
266fccefbb
Bump SDK version and fix breaking changes. (#703) 2023-03-15 12:42:19 +00:00
Flescio
8a069ecfa5
Epic: create and join rooms - Start Chat (#680)
* add start chat flow with UI

* add feature flag for start chat

* add changelog

* fix naming and tests

* fix empty display name in user cell

* Update ElementX/Sources/Application/AppSettings.swift

Co-authored-by: Alfonso Grillo <alfogrillo@element.io>

* add screenshots from UI test

* fix swiftFormat and add identifiers

* fix warnings

---------

Co-authored-by: Alfonso Grillo <alfogrillo@element.io>
2023-03-14 10:50:09 +01:00
Mauro
fb27efee10
Cached avatar support (from Rust) (#633)
* loading a cached avatar at first, and then actually doing the request so that the avatar can still be displayed without connection

* improved the code

* fix + changelog

* policy on how to fetch the avatar url added

* code improvements

* addressed al PR comments

* improved the error handling

* improved the async task code

* fixed a typo

* fixed another typo
2023-03-08 17:50:06 +00:00
Mauro
c67c4e362e
Auto-Mocking with Sourcery (#597)
* work in progress, was able to generate a mock for the RoomProxyProtocol, I'll try if I can swap the mock we have with this one

* removing swiftformat from generated

* added the disable of swiftlint directly into the .stencil

* testing if danger still complains

* improved the stencil

* session verification controller proxy using auto mockable

* BugReport mocks and tests added

* changelog

* fixing a typo

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* fix typo in the test

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* removing the Protocol word from the type if present

* using extension in place of a subclass

* removed unused imports

* improved the yielding code

* moved Sourcery files

* stencil master

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-08 17:04:31 +01:00
Stefan Ceriu
e4117e3205
Soft logout removal (#672)
* Remove isSoftLogout from everywhere except the client delegate
- bump the RustSDK to v1.0.43
- cleanup the app coordinator state machine and login/logout flows

* Merge `succeededSigningIn` and `succeededRestoringSession` into `createdUserSession` in order to simplify the logic
2023-03-06 14:58:50 +02:00
Mauro
eed031c9cc
Report Content v2 (#659)
* created the empty files

* set up the view content

* connected the Room Coordinator to the ReportContent Coordinator

* added the loading indicators and the dismiss behaviour

* almost completed but I need to display the success indicator when the report is sent succesfully

* completed

* added an untranslated string

* tests

* Update ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/Screens/ReportContent/View/ReportContentScreen.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* pr comment

* pr suggestion

* removing unused identifiers

* fixing compilation error

* added a form text editor view

* changelog

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-02 18:24:10 +00:00
Doug
1c09a7eace
Update login and server selection screens (#651)
* Update login and server selection screens.

* Replace all NavigationViews with NavigationStacks
2023-03-02 18:05:18 +00:00
Doug
57b30260b1
Remove unused media loading from URL. (#663)
We are now using `MediaSource` everywhere (and should continue to do so).
2023-03-02 11:32:04 +00:00
Stefan Ceriu
a3abde9e23
Fixes #614 - Add the user and device identifiers to rageshakes (#620)
* Fixes #614 - Add the user and device identifiers to rageshakes

* Add `base_bundle_identifier` to rageshakes
2023-02-24 14:51:36 +02:00
Stefan Ceriu
a3c7c47a69 Made room state event collapsing configurable, expose it in the developer menu. Allow the UserSetting property wrappers to only store values in memory (+11 squashed commits)
Squashed commits:
[42e45fc] Even more tweaks following code review
[5dcd5be] Add swift-algoritms and switch bubbling detection to its `chunked` method
[4ac70ed] Move the groupBy implementation to Collection instead of Array
[6aeffc3] Tweaks following code review
[0ca5ac2] Bubbles working again, grouping computed closer to the UI level
[3a66030] Refactor how timeline items are built in the RoomTimelineController
[57d51e9] Remove grouping from timeline items
[8608950] Remove the RoomTimelineViewFactory, update the GroupRoomTimelineView
[9e52e61] Add array grouping extension, unit tests and switched the timeline controller to it
[7d213a1] First attempt
[90bb1d7] Remove now unused `RoomTimelineController` `updatedTimelineItem` calback
2023-02-24 07:34:07 +02:00
Stefan Ceriu
ad06e812bc
Fix navigationStackCoordinator getting torn down when being reset on … (#613)
* Fix navigationStackCoordinator getting torn down when being reset on the navigationSplitCoordinator, added unit tests for it

* Guard against using the same coordinator more than once
2023-02-23 16:01:48 +02:00
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