* Add a UserHooks system with just the CreateRoomScreenHook for now.
* Move more hooks into UserHooks.
* Pass the ClientProxy to makeUserHooks instead of calling AppHooks.configure(with:).
* Update the Enterprise submodule.
* Use our standard XYZMock(.init()) pattern everywhere instead of XYZMock.default.
* Remove the configuration parameter label on mock convenience inits.
* Update the enterprise submodule.
* 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>
* Create AnalyticsServiceProtocol and conform AnalyticsService
* Replace AnalyticsService properties and arguments with AnalyticsServiceProtocol
* Inline AnalyticsServiceMock replacing old mock
* handle more complex AnalyticsServiceMock callsites
* move documentation from AnalyticsService to AnalyticsServiceProtocol
Removes the ServiceLocator singleton and instead directly injects the dependencies it was holding for more control over instantiation of the various component subtrees and better visibility over how they're being used.
* 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
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.
* migrated a lot of unit tests to Swift Testing and added a new implementation for deferred fulfillment
more tests migration
Cleaned the code manually to establish some good patterns
more code improvements
some more code improvements
removed empty tests
update project
* more pr suggestions and cleanups
* removed the TestSetup pattern
* fixing claude not reusing tests
* pr suggestion + added indent rule to swiftformat so that we can prevent AIs to change that
- proxy errors have been getting repetitive and not particularly useful
- differentiate between sdk and client errors and keep what provides value
- add error logs everywhere a failure occurs
* Fix flakey emoji provider tests
* Fix flakey RoomScreenViewModel tests
* Fix flakey HomeScreenViewModel tests
* Fix flakey RoomMemberListScreen tests, problem with bindings getting overriden and deferFulfillment cancellable not getting stored
* Fix flakey RoomNotificationSettingsScreen tests and crashes
* Fix flakey RoomMemberDetailsScreen tests
* Deprecate old `deferFulfillment` and `nextViewState` methods
* Convert more files to the new `deferFulfillment`
* Converted the rest of the tests to the new deferFulfillment
* Removed now unused `nextViewState` and `deferFulfillment`
* Remove automatic retries from unit tests
* Reset analytics flag after running unit tests
* Address PR comments
* Introduce a new `deferFulfillment(publisher, keyPath, transitionValues)` method and use it where appropiate
* refactored alert info to not use the soon to be deprecated API
* missing files and changelog
* updated some tests
* Update ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
---------
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
* 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
* 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
* 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>