672 Commits

Author SHA1 Message Date
Mauro
4b2aba9367
Tapping on user avatar/name in the timeline opens the room member details (#1020)
* Implementation completed

* changelog

* code improvement

* Apply suggestions from code review

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

* pr suggestions

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-06-06 08:46:04 +00:00
Doug
ea4aa943e0
Improved bug report error handling (#1018)
* Improve rageshake error handling.

* Add a max file size and exclude older files one the limit is hit.

* Zip log files as smaller chunks.
2023-06-06 11:24:01 +03:00
Alfonso Grillo
4e926c3334
Create & Join rooms UI/UX tweaks (#1005)
* Fix people icon size

* Disable dismiss when loading in StartChatScreen

* Reduce debounce on search

* Add padding to invite button

* Add show/hide bottom bar behaviour

* Fix bg color in StartChatScreen form

* Update localisations

* Update search users results to 10

* Fix form background in InviteUsersScreen

* Fix invites list bg color

* Add mxid in InvitesScreenCell

* Refactor InvitesScreenCell design

* Fix separator spacing

* Add more design fixes

* Refine InvitesScreenCell layout

* Refactor UserProfileCell design

* Refactor FormRowAccessory

* Update localisations

* Fix camera size and security section padding

* Change create button style

* Refine InviteUsersScreenSelectedItem

* Refine CreateRoomScreen

* Refine UserProfileCell padding

* Amend preview name

* delete test code

* Add separator in security section

* Fix spacing in InviteUsersScreenSelectedItem

* Revert confirmationAction in CreateRoomScreen

* Refine HomeScreenInvitesButton

* Add dismiss keyboard in InviteUsersScreen

* Refactor FormRowAccessory

* Remove isDisabled from FormButtonStyles

* Update localisations

* Cleanup RoomDetailsEditScreen

* UI fixes on horizontal user carousel

* Refactor InviteUsersScreenSelectedItem

* Try fix flaky tests

* Fix typo

* Update snapshot tests

* Fix flaky UTs

* Fix HomeScreen ui tests

* Fix scroll on selection

* Refactor RoomFlowCoordinatorTests
2023-06-06 08:03:38 +00:00
Doug
dcc4ea5e85
Authentication Layouts (#994)
* Remove unused code in OnboardingScreen.
* Add FullscreenDialog layout and use in auth flow.

Bump minimum OS to 16.4/13.3.

* Add dynamic layout based on dynamic type size.
2023-05-31 18:39:53 +01:00
Alfonso Grillo
e58642208d
Fix navigation back from room's details (#988)
* Fix navigation to room details

* Improve tests

* Delete unused action in RoomDetailsScreen

* Cleanup

* Try fix flaky tests
2023-05-31 16:24:12 +00:00
Doug
74b36ce870
Server Confirmation Screen (#959)
* Add ServerConfirmationScreen.
2023-05-30 10:31:18 +01:00
Mauro
088ca622a1
Generating SDK Mocks through the usage of swift run tools generate-sdk-mocks (#982)
* basic implementation, that works for now only with the local SDK

* replaced a handmade mock with a generated mock
2023-05-30 09:48:55 +02:00
Stefan Ceriu
590655197d
Notification deep linking fix (#972)
* Fixed unused animated parameter

* Wait for lists to load before querying rooms if the cold cache isn't available

* Fix a couple of unused result warnings in the ExpiringTaskRunner unit tests
2023-05-29 11:21:01 +03:00
Stefan Ceriu
0082aba9d4 Fixes #918, #919 - Introduce a RoomTimelineFlowCoordinator and related FlowCoordinator protocol
Squashed commits:
Add unit tests and move the state machine into the FlowCoordinator
[bb686861] Replace the RoomFlowCoordinator's public interface with just `handleAppRoute`
[0d9a4f8d] Remove the navigationStackCoordinator dependency from the roomScreenCoordinator
[4b5fbdf2] Allow rooms to be selected from any other state
[41dbd127] Move all missing coordinators to the RoomFlowCoordinator and state machines
[f32431b7] The UserSessionFlowCoordinator does not need to conform to the CoordinatorProtocol
[0f07e87d] Fix leaving a room dismissing the currently selected one when different
[138385a2] Rewind the navigation stack when re-selecting the same room (iPad)
[0727eb93] Fix presenting different room details from the side menu on iPads
[faf4cc60] Fix selecting the same room multiple times
[fb3391da] Move room details presentation responsibility to the RoomFlowCoordinator. Fixed invitation flows.
[fa2a68d9] Rename RoomTimelineFlowCoordinator -> RoomFlowCoordinator
[0c9c06b5] Start moving things away from the RoomScreenCoordinator and into the RoomTimelineFlowCoordinator
[86cbbdcc] Introduce a RoomTimelineFlowCoordinator to deal with timeline related operations
[9b2381be] Introduce the FlowCoordinatorProtocol
2023-05-26 17:42:39 +03:00
Alfonso Grillo
f2b7faa183
Room's details edit screen (#956)
* Add RoomDetailsEditScreen template

* Add navigation to the edit screen

* Delete template code

* Start RoomDetailsEditScreen UI

* Manage power levels in RoomDetailsScreen

* Start RoomDetailsEditScreenViewModel logic

* Inject initial room state

* Add cancel action

* Expose set name/topic APIs in RoomProxy

* Refine RoomDetailsEditScreen UI

* Add save logic

* Add localisations

* Fix avatar image

* Update localisations

* Add “Add topic” button

* Add feature flag

* Add dismiss on save logic

* Reduce throttling

* Improve form logic

* Fix UT build errors

* Add media sheet

* Add media preprocessing

* Add LoadableEditableAvatarImage

* Add condition on delete image

* Add avatar save button logic

* Add remove avatar logic

* Cleanup

* Fix edit bug in DM

* Add upload avatar

* Add focus

* Add RoomDetailsViewModel UTs

* Fix button style

* Add UTs

* Add empty topic ui test

* Fix iPad sheet presentation

* Revert topic appearance in room’s details

* Address PR comments

* Add UI tests
2023-05-26 13:47:12 +00:00
Alfonso Grillo
bf2102e5d1
Add room's update publisher (#952)
* Add room update publisher

* Cleanup

* Update room’s title

* Add refresh logic in RoomDetailsScreenViewModel

* Fix UTs

* Add UT

* Update timeline listener in RoomProxy

* Fix caching in LoadableAvatarImage

* Cleanup

* Update RoomProxy api

* Inject room proxy in RoomScreenViewModel

* Cleanup

* Fix UTs
2023-05-25 10:42:58 +00:00
Mauro
c59921103d
Inlined Timestamp in bubble style for messages that have a bubble (#947)
* web-like solution

* not super polished but working implementation

* polishing the spacing and sizes

* removing unused code

* code improvements

* adding a test case in the preview for RTL

* addressing some PR comments

* added some tests and polished the code

* better naming

* code improvement

* RTL fix

* Revert "RTL fix"

This reverts commit 14e4468a5358769daa57891f4991e9e32da1c985.

* better RTL fix

* updated UI tests

* separated some files

* addressed some PR comments

* some more tests
2023-05-25 10:13:45 +00:00
Flescio
beb61d109f
Flescio/create room action (#925)
* fix invites users screen

* add create room action

* add a task runner with timeout, add fetch room summary after creation

* rename Runner, add Unit Test, separate UserProfile form client proxy

* change to all room summary publisher
2023-05-22 15:27:39 +00:00
Alfonso Grillo
d9e0f36aeb
Invite people in an existing room (#915)
* Handle power levels

* Add “invite” button in RoomMembersListScreen

* Refactor DI in RoomDetailsScreenCoordinator

* Add navigation to “select people” coordinator

* Add InviteUsersScreenRoomContext

* Add invite user by id api

* Updare InviteUsersScreenRoomContext

* Support disabled state on FormButtonStyles

* Handle membership in UserProfileCell

* Fix conflicts

* Refactor RoomContext -> RoomType

* Refactor UserProfileCell

* Add invite action

* Setup navigation to user flow coordinator

* Add invite logic

* Fix test build errors

* Address comments

* Fix localisations

* Update required state

* Handle error

* Move invite logic in RoomDetailsScreenCoordinator

* Add navigation from room’s members list

* Fix UTs

* Fix missing display name in RoomMemberDetails

* Add user indicator

* Add feature flag

* Add RoomDetailsViewModel UTs

* Add room details ui tests

* Add InviteUsersViewModelTests UTs

* Add UI tests

* Update UI tests

* Empty commit
2023-05-22 14:03:07 +00:00
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