Commit Graph

34 Commits

Author SHA1 Message Date
David Langley da0e80be49 Merge branch 'langleyd/4781_swiftui_template_examples' of https://github.com/vector-im/element-ios into langleyd/4781_swiftui_template_example2 2021-09-15 17:32:19 +01:00
David Langley e378128668 Allow defer in xcAwait. simplify sending state actions from a publisher. Fix tests. 2021-09-15 16:09:41 +01:00
David Langley 6522385a05 Improve StateStore documentation and naming. 2021-09-15 14:04:18 +01:00
David Langley 7aad7c51ba Introduce StateStore with bindings example for Chat example. 2021-09-15 11:47:59 +01:00
David Langley f3dbd2a056 Add StateStoreViewModel and publisher extensions for convenienec. 2021-09-14 22:30:25 +01:00
David Langley b137d2e229 Add StateStoreViewModel and publisher extensions for convenienec. 2021-09-14 22:28:25 +01:00
David Langley d5455cf58b Update RiotSwiftUI symbols to triple slash documentation style with function annotations. 2021-09-13 11:40:38 +01:00
David Langley a73d8a4122 Fix Naming
Change userService name to templateUserProfileService for templating.
Remove test subclass from MockScreenTest
2021-09-13 11:40:38 +01:00
David Langley 9e8a90ec2a Add subviews for message and image 2021-09-13 11:39:42 +01:00
David Langley 725c324c19 Add chat example 2021-09-13 11:39:42 +01:00
David Langley 8ec910fdb0 Update RiotSwiftUI symbols to triple slash documentation style with function annotations. 2021-09-13 11:36:33 +01:00
David Langley 0c4c22c892 Fix Naming
Change userService name to templateUserProfileService for templating.
Remove test subclass from MockScreenTest
2021-09-13 10:13:29 +01:00
David Langley 0dc08151b6 fix immutability 2021-09-10 16:56:35 +01:00
David Langley acc3de0b32 fix example userId and avatarUrl 2021-09-10 16:55:11 +01:00
David Langley 214748b995 Add utility to run UI tests for Screen states, add screen states for template and finish unit test. 2021-09-10 16:43:31 +01:00
David Langley eaedefa3c2 Add configurable logger for RiotSwiftUI 2021-09-09 22:42:00 +01:00
David Langley d157f1b68d Update based on comments from Doug 2021-09-09 17:00:45 +01:00
David Langley aa3cedbf9e UITests and Mock Screens
Adds the test targets for Unit and UI tests
Adds mock screen data and utilities to render each mock screen for previews/ui tests.
Changes Published property in the service to CurrentValueSubject. we don't need the synthesized aspect of Published and property wrappers cannot be included in protocols.
2021-09-09 16:23:00 +01:00
David Langley 760ba726ba Merge branch 'langleyd/4781_swiftui_template_examples' of https://github.com/vector-im/element-ios into langleyd/4781_swiftui_template_examples 2021-09-09 10:50:42 +01:00
David Langley 85e82fd0cb Make reducer static, pass viewState directly to reducer, log reducer. 2021-09-09 10:50:39 +01:00
David Langley cd567e4de8 Update RiotSwiftUI/Modules/Template/SimpleUserProfileExample/ViewModel/TemplateUserProfileViewModel.swift
Co-authored-by: manuroe <manuroe@users.noreply.github.com>
2021-09-09 10:34:25 +01:00
David Langley 0dbc7a17f3 fix build 2021-09-08 17:56:51 +01:00
David Langley 81414bc38e Fix retain cycle 2021-09-08 16:37:56 +01:00
David Langley 1ac6ae4aea Extract presence listener setup out to own function. 2021-09-08 16:28:08 +01:00
David Langley 350fc6a742 CoordinatorParamters, Type -> Protocol, remove MX Prefix. 2021-09-08 15:47:24 +01:00
David Langley 1e0512c301 Add template unit tests and publisher utility. 2021-09-08 15:32:41 +01:00
David Langley 13a9d82486 Fix ordering, add pragmas, fix visibility on a few functions, remove default param on state. 2021-09-08 11:43:57 +01:00
David Langley c6996cf62d Correct preview name and create template script 2021-09-08 00:00:34 +01:00
David Langley e6d5ab117d Improve folder name 2021-09-07 23:04:52 +01:00
David Langley 24b8e69363 Make naming of symbols consistent 2021-09-07 23:02:26 +01:00
David Langley fea49baf53 Remove unneeded protocol and methods on VectortHostingController 2021-09-07 22:49:11 +01:00
David Langley cf8c805589 Add ViewActions and ViewModelActions for Coordinator
- also add Marks
2021-09-07 16:57:08 +01:00
David Langley 17c6ce6a10 Add Simple Template Example
- Add a simple Template example that shows a user profile with avatar, displayName and presence.
- ScreenCoordinator: closure based with less protocols and delegates.
- Reducer: Reducer function that manages all state modifications.
- SwiftUI View: Decomposes UI into appropriate sub components.
- Uses Theme and Dependency Management Infrastructure
2021-09-06 17:12:31 +01:00
David Langley 23244fc38f Add simple example with profile header, avatar and name. 2021-09-02 09:37:37 +01:00