158 Commits

Author SHA1 Message Date
Flavio Alescio
6723da16c6 remove create room parameters by reference and use coordinator flow instead 2023-05-16 18:23:23 +02:00
Flavio Alescio
372a2d5360 change accesibility identifiers, remove single selection button style, use Picker instead, 2023-05-16 18:23:23 +02:00
Flavio Alescio
4ab30f9632 add test case for room creation 2023-05-16 18:23:23 +02:00
Flavio Alescio
06147cd99c add files for create room screen, add selected users section with test 2023-05-16 18:23:23 +02:00
Alfonso Grillo
1981270840
Invited members in room's members list (#880)
* Add invited people in RoomMembersListScreen

* Optimize main thread perfomance in RoomDetailsScreenViewModel

* Fix member count in RoomDetailsScreenViewModel

* Add warning

* Add performance warnings

* Build members in RoomMembersListScreenViewModel in global queue

* Refactor RoomDetailsScreenViewModel build members process

* Localize strings

* Cleanup

* Fix RoomDetailsScreenViewModelTests UTs

* Fix UI tests

* Add RoomMembersListScreenViewModel UTs

* Add UI tests

* Amend UI tests

* Use clearAndTypeText
2023-05-12 13:12:59 +00:00
Mauro
23137726de
Disable Local Push Notifications + Start Handling invite notifications (#882)
* disabled local pushes and fixed the issue with the image rendering

* disabled local notifications for now and started implementing invite notificatons

* disabled local notifications for now and started implementing invite notificatons

* removed code that should not have changed

* removed useless comment

* refactored name for category

* fixed a test

* fix

* fix for missing try await

* pr comments
2023-05-12 10:45:59 +00:00
Mauro
b83e8a5bcc
Update SDK to 1.0.63 (#869)
* bump sdk to 1.0.63

* code improvement
2023-05-10 14:36:40 +03:00
Stefan Ceriu
1bd6e461ed
Reply rendering (#861)
* Cleanup how we use message timeline items in preparation for rich reply rendering

* Expose reply details up to the UI level

* Render replies in the timeline (textual for now). Remove now unused AttributedStringBuilderComponent isReply flag.

* Move reply detail loading to when the item appears instead of when it's created.

* Fix unit tests

* Fetch event details also when the reply details are in the error state

* Tweaks following code review

* Localise emote bodies

* Fix replies not loading sometimes, use the current event identifier instead of the one being replied to
2023-05-09 16:09:38 +03:00
Mauro Romito
b17c987fd0 sdk bump to 1.0.60 2023-05-05 15:44:18 +02:00
Stefan Ceriu
93e3a1a80b
Media uploading (#851)
* MediaUploadingPreprocessor - Prevent images without any GPS metadata from being changed

* Add support for sending images

* Add support for sending video, audio and file attachments

* Rename MediaPickerPreview to MediaUploadPreview

* Move media uploading to the MediaUploadPreviewScreen, add waiting indicators and error handling

* Add support for pasting and drag&dropping in media for upload

* Adopt new media picker source UI, remove developer flag

* Set minimum heights for timeline loadable images

* Fix invalid camera picker file names

* Fix flakey MediaUploadingPreprocessor image tests, improve gps metadata stripping

* UITests: Update existing screenshots and add new step for the room attachment picker

* Switch all github action runners to macos-13

* Cleanup enter key and paste message composer handlers
2023-05-04 16:09:29 +03:00
Alfonso Grillo
e9c07c9f8f
Contextual menu for rooms (#842)
* Add room contextual menu

* Add room context menu view actions

* Add navigation to room’s detail

* Show leave alert in HomeScreen

* Implement leave logic

* Refine leave navigation for iPad

* Optimize leave from homescreen

* Refactor roomSettings -> roomDetails

* Refactor room for id mock

* Add UTs

* Cleanup

* Fix alert presentation in RoomDetailsScreenViewModel

* Fix animation flag
2023-05-04 10:02:18 +00:00
Stefan Ceriu
86aebfb9ef Pass attachment bodies when loading media 2023-05-04 11:32:44 +03:00
Mauro
ccccdce0fc
Notification Handler to handle notifications in foreground (#837)
* changed how the notifications are handled

* local notifications can be decrypted and shown!

* Improved the handling for the mock and for the normal messages

* Avatar images are also displayed

* pr ready, commented some code that is not supposed to be releaaed yet, adjusted some tests and added some source code in the targets

* fixing some swiftlint complaints and removed an unused function

* better swiftlint disable

* addressing PR comments
2023-04-28 12:36:16 +00:00
Stefan Ceriu
3fb0829b88 Fixes #687 - Incorrect link detection and handling 2023-04-28 14:11:21 +03:00
Mauro
c96ccd0f26
SDK Updated to 1.0.57-alpha (#840)
* sdk bump

* fixing tests
2023-04-28 09:34:33 +02:00
Doug
2146c71232 Add UnitTestsAppCoordinator. 2023-04-25 21:17:03 +03:00
Doug
1782f3058b Await specific states. 2023-04-25 21:17:03 +03:00
Stefan Ceriu
be8adb19b5
Structured logging (#831)
* Structured logging support

* Bump the SDK, fix breaking changes

* Enabled more logging of timeline diffs

* Keep only source file last path components in logs

* Bump the SDK, tweaks following code review
2023-04-25 14:48:20 +03:00
Stefan Ceriu
b726cd149a
Renaming screens returns (#829)
* Rename: StartChat -> StartChatScreen

* Rename: Login -> LoginScreen

* Rename: ServerSelection -> ServerSelectionScreen

* Rename: SoftLogout -> SoftLogoutScreen
2023-04-25 12:13:03 +03:00
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