78 Commits

Author SHA1 Message Date
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
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
Mauro
ca319e0bfe
Dpendencies update + improved dependencies version management (#721)
* updating dependencies

* minor version pinning

* update completed and also added a tool that checks for outdated swiftpm packages

* changelog

* DTCoreText uses exact version

* minor version for analytics

* pushing OutdatedPackages

* package.swift for the repo also using upToNextMinor

* fixing a typo

* Update Tools/Sources/OutdatedPackages.swift

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

* Update Tools/Sources/SetupProject.swift

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

* removing unused comment

* removed trailing comma

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-23 11:26:20 +01: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
8c89b06f3b
Adopt Compound for the settings and bug report screens. (#708)
* Use compound tokens for Settings and Bug Report.
2023-03-21 14:52:10 +00:00
Doug
66651c0f34
Bump SDK version and fix breaking changes. (#709) 2023-03-20 19:26:07 +01:00
Doug
701581f4a1
Use asset catalog for tint colour. Update Sentry. (#705)
Sentry had a bug where the colour was being ignored due to access of the main screen.
2023-03-16 13:32:14 +01:00
Doug
266fccefbb
Bump SDK version and fix breaking changes. (#703) 2023-03-15 12:42:19 +00:00
Doug
0ae664933b
Allow theming of the search bar. (#700) 2023-03-15 10:02:51 +00: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
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
Stefan Ceriu
b5055d1680 Bump the Rust SDK to 1.0.42-alpha, fix breaking changes 2023-03-02 17:12:42 +02:00
Stefan Ceriu
802279d8af
Bump the RustSDK to v1.0.41 (#654)
* Handle breaking changes.
* Fix a couple of warnings
* Bump the SDK to v1.0.41
2023-02-28 18:03:19 +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
Doug
2399088084
Bump SDK version and fix breaking changes. (#610) 2023-02-22 14:31:17 +00:00
Doug
872c911cb5
Use files instead of UDP for signalling. (#585) 2023-02-15 14:02:50 +00: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
183cc88114
Load member profiles through the timeline (#522) 2023-02-03 10:12:36 +00: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
Stefan Ceriu
b68002cbb4 Drop the entire sliding sync observer and updating rooms by identifiers now that we can request to be sent item updates 2023-01-26 15:03:23 +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
3a74f13097
Add support for aliases to RoomProxy and bump the SDK. (#486) 2023-01-24 17:01:00 +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
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
f7ddaacb64
Break out DesignKit into its own sub-package (#459)
We'll be using https://github.com/vector-im/compound-ios eventually so this tidies up the Xcode project dependencies in the mean time.
2023-01-17 12:26:07 +00:00
Stefan Ceriu
83e6ba8f6b
Various sliding sync tweaks (#446)
* Refactor SS configuration and add (unfinished) support for adding views dynamically.

* Implement pop and clear support on the room summary provider

* Register views against sliding sync

* Read invalidated vislbeRoomsSummaryProvider from the allRoomSummaryProvider

* Switch SS window range setting from the ScrollViewAdapter to a publisher debounce

* Tweak allRoomsView addition: switch from listening the visibleRoomsView's state to when it publishes the first diff update

* Cleanup client delegate and sliding sync observers and lifecycle

* Bump the RustSDK to 1.0.30-alpha

* Reuse startSync within restartSync
2023-01-13 17:09:37 +02:00
Stefan Ceriu
d70a240869 New timeline items (#424)
* Cleanup session verification state machine configuration

* Add support for new timeline items: loading indicators, stickers and invalid/unsupported events

* Add sticker accessibility label, fix session verification ones

* Add support for the new TimelineStart timeline item and new pagination API. Remove identifiers from individual timeline items and only set them in the TimelineTableViewController

* Add changelog
2023-01-10 13:41:07 +02:00
Stefan Ceriu
c661b24f08 Bump the RustSDK to v1.0.27-alpha 2023-01-04 20:39:24 +02:00
Stefan Ceriu
ed0ebc0f8f Bump the RustSDK to v1.0.26-alpha 2023-01-04 11:40:18 +02:00
Stefan Ceriu
ac77743c7a
Add retry decryption encrypted timeline item debug menu option (#384)
* Fixed a couple of warnings (+2 squashed commits)
Squashed commits:
[21fbc3b0] Add changelog
[abb092c6] Add retry decryption encrypted timeline item debug menu option

* Cleanup room list state computations

* Bump the RustSDK to v1.0.25-alpha

* Fix brew CI errors: remove imagemagick and brew lock file entirely

* Fix release script version bumping

* Bump ruby dependencies
2022-12-22 13:59:38 +02:00
Stefan Ceriu
131197b7d7
Add timeline day separators and read markers (#383)
* Add timeline day separators and read markers
2022-12-21 15:35:45 +02:00
Stefan Ceriu
ab10278ff5
New SlidingSync flow (#373)
* Switch back to using slidingSync rooms for timeline listeners

* Expose 2 types of slidingSync views from the clientProxy and combine their results for the roomList

* Fix breaking api changes

* Remove sender mxids from the room list (until rust provides resolved display names)

* Bump RustSDK to v1.0.22-alpha

* Rename originServerTs to timestamp throughout

* Simplified sliding sync view list merging

* Rollback some SS changes as things still don't work properly

* Revert "Switch back to using slidingSync rooms for timeline listeners"

This reverts commit 1d6a6c09d8ddf386edefbe0ac6beaf52cc333fba.
2022-12-16 14:05:08 +02:00
Doug
30cb97ee4f
Add a tool to build MatrixRustSDK. (#369) 2022-12-15 09:35:00 +00:00
Stefan Ceriu
00cd2ab707
Set visible ranges on the home screen sliding sync view (#342)
* Set visible ranges on the home screen sliding sync view
* Prevent the visible items from being updated while in search mode
* Enable diffs on invalidations as they seem to fix duplicated events in the home screen room list
* Promoted some diffing logs to info from verbose
2022-11-25 17:50:43 +02:00
Stefan Ceriu
7d8e94d3a7
Crash fixes (#337)
* Add diffing logs and be more aggresive about unexpected states
* Move diff collection on a serial queue
* Handle now optional `addTimelineListener` result
* Treat RoomSummaryProvider invalidations separately
* Bump RustSDK to v0.0.9-demo
2022-11-24 15:32:23 +02:00
Stefan Ceriu
e763c514c7 Bump the RustSDK to v0.0.8-demo 2022-11-24 10:35:53 +02: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
9f12b34a98
Video messages on timeline (#304)
* Create timeline item and view for video

* Create video timeline items in factory, do not bubble them

* Add changelog

* Update packages

* Revert DTCoreText update
2022-11-10 13:45:35 +03:00
Stefan Ceriu
37cfb8f50e Fixes #239 - Use new restoration token format, pass stored homeserver url to the client builder when restoring, dropping the need for a network request
- bumped the rust sdk to v1.0.17-alpha
- move all UserSession related files to Services/UserSession
2022-11-04 15:44:18 +02:00
Stefan Ceriu
fabb0bc95f
New timeline (#276) (#280)
* Fixes #276 - Rebuilt room timeline:
    - Removed the need for the ListCollectionViewAdapter
    - Rewrote the TimelineItemList without using introspection
    - Added ReversedScrollView for laying out items at the bottom/trailing
    - Rewrote TimelineProvider diffing through CollectionDifference (similar to the RoomSummaryProvider)
    - Added back `scrollDismissesKeyboard`  behavior
    - Various other tweaks and fixes
- Fixed various warnings:
    - removed async AttributedStringBuilder as AttributedString is non-sendable, made the RoomTimelineItemFactory synchronous
    - removed unused virtual timeline items
    - removed unused isOutgoing property from the FormattedBodyText
* Make TimelineItemContextMenuActions indentifiable and specify contextMenu identifiers
* Bump the matrix-rust-components-swift to v1.0.16-alpha
* Add changes file and changelog contribution guide
* Fix attributed string builder unit tests
2022-11-02 13:03:34 +02:00
Johannes Marbach
09b2f939ab
Fixes #225 - Use a properly defined user agent
* Set a proper user agent
* Add fallback when UA comes out nil
* Remove unused Bundle extension
* Return nil when asciification fails
* Add whitespace handling and further emoji test case
* Explicitly check if string is already in ASCII
* Rename factory to builder
* Use allSatisfy instead of reduce
* Use key path syntax
2022-10-28 17:11:10 +03:00
Stefan Ceriu
ba4064cc2c
Enable e2ee support (#274)
* Enable sliding sync common extensions and session verification banner display; fix user session flow coordinator state machine
* Fixed a couple of deprecation warnings
* Add missing `m.room.encryption` required state
* Switch to rust-sdk v1.0.15-alpha and add changelog
2022-10-28 17:08:51 +03:00
Stefan Ceriu
50ddecbe3a
Bump project to the latest RustSDK release version (#265) 2022-10-25 14:19:23 +03:00
ismailgulek
29f61461aa
Update snapshotting library to 1.10.0 (#215) 2022-09-28 10:25:59 +03:00
Stefan Ceriu
5ebe923991
Sliding Sync + New Timeline API (#189)
* Begin adopting new Timeline API.

* Add edited indicator and reactions.

* vector-im/element-x-ios/issues/65 - Sliding sync support
* Fix missing room display name, wrong placeholder avatar text color and various other warnings that would fail the build on the CI

* Various tweaks:
* using release version of the demo branch of the sdk
* enabled home screen last room messages
* switched debug mode rust logging to warn
* enabled redactions
* enabled new logout flows and soft logout
* enabled replies

* Fix room member display name and avatar crashes / race condition, fix unit tests
* Make the ClientProxy and the UserSession MainActors
* Remove unused MatrixRustSDK imports, we should strive to keep these only in top level services and proxies
* Don't start either of the syncs while in soft logout

* #181: Style the session verification banner to match Figma.
* #181: Update verification modal.
* #181: Update snapshot tests.

* Make session verification state machine less pedantic
* Remove unnecessary weak selfs
* Various tweaks following code review:
* add start and stop sync client proxy methods
* move ss proxy url the build settings
* made media provider load results discardable
* added publishers for the roomSummaryProvider's total number of rooms and state

* Fix when sender details are shown
* Disable sync v2, causes duplicates in the timeline (as expected)
* Move ClientProxy media loading off the main queue and into a detached task
* Another attempt at moving image loading off the main queue
* Moved home screen diffing and latest room fetching to the background
* Prevent the timeline composer from becoming the first responder when not needed

* Bump to a newer version of the RustSDK

* Fixes vector-im/element-x-ios/issues/107 - New home screen design
* Implement thumbnail loading instead of full image avatars.
* Revert "Disable sync v2, causes duplicates in the timeline (as expected)"
* Add support for local echoes, dispatching detached tasks to a concurrenc GCD queue
* Move the session verification banner to a List Section to avoid UI glitches
* Optimise room mapping after sliding sync updates and thumbnail fetching
* Replace home screen List with a LazyVStack in an attempt to fix performance. Moved move summary provider room updating to a background thread

* Fixes vector-im/element-x-ios/issues/177 - New Bubbles Design
* Define in group state for timeline items
* Add replies into the bubble
* Add timeline width environment value
* Add `RoundedCorner` shape with specific corners rounding
* Add in group state for previews
* Implement bubble grouping logic
* Timeline avatar layout changes
* Fix placeholder avatars for dark mode
* New bubbles design
* Update mock timeline items
* Update timeline separator design
* Update room screen reference screenshots
* Add changelog
* Formatting fixes
* Add some space before single or beginning outgoing items

* Redesign the message composer

* Handle the msgtype enum.

* Update room name label line limit and incoming bubble background. Disabled syncv2, ss withCommonExtensions and session verification controller checking

* Increase default back pagination limit.
* Stop parsing links and tidy up composer button.
* Also fix the frame of an image whilst loading.
* Bump SDK package version.

* Remove app states about settings
* Add strings
* Use colors on placeholder avatars
* Tiny changes for placeholder avatars
* Update settings screen design
* Provide a user display name from the mock client
* Settings screen presentation logic
* Add changelog
* Update reference screenshots

Co-authored-by: Doug <douglase@element.io>
Co-authored-by: ismailgulek <ismailgulek@users.noreply.github.com>
Co-authored-by: ismailgulek <ismailg@matrix.org>
2022-09-21 09:21:58 +01:00
Doug
bc457958db
DesignKit: Update design tokens and create ElementColors locally. (#186)
* Use latest design tokens and create Element colors
* Keep the old colours and add system… ones.
2022-09-14 19:16:50 +01:00
Doug
df68174a32
#106: Begin adding the Analytics class from EI.
No UI or SDK support to enable/disable yet and no tracking is implemented.
2022-09-02 10:09:02 +01:00
Stefan Ceriu
78df4abc7f
#49, #123 - Setup UI integration and performance testing (#148) 2022-08-18 16:32:29 +03:00