Stephen Celis
57e804f1cc
Macro bonanza ( #2553 )
...
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Silence test warnings
* wip
* wip
* wip
* update a bunch of docs
* wip
* wip
* fix
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Kill integration tests for now
* wip
* wip
* wip
* wip
* updating docs for @Reducer macro
* replaced more Reducer protocols with @Reducer
* Fixed some broken docc references
* wip
* Some @Reducer docs
* more docs
* convert some old styles to new style
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* bump
* update tutorials to use body
* update tutorials to use DML on destination state enum
* Add diagnostic
* wip
* updated a few more tests
* wip
* wip
* Add another gotcha
* wip
* wip
* wip
* fixes
* wip
* wip
* wip
* wip
* wip
* fix
* wip
* remove for now
* wip
* wip
* updated some docs
* migration guides
* more migration guide
* fix ci
* fix
* soft deprecate all apis using AnyCasePath
* wip
* Fix
* fix tests
* swift-format 509 compatibility
* wip
* wip
* Update Sources/ComposableArchitecture/Macros.swift
Co-authored-by: Mateusz Bąk <bakmatthew@icloud.com >
* wip
* wip
* update optional state case study
* remove initializer
* Don't use @State for BasicsView integration demo
* fix tests
* remove reduce diagnostics for now
* diagnose error not warning
* Update Sources/ComposableArchitecture/Macros.swift
Co-authored-by: Jesse Tipton <jesse@jessetipton.com >
* wip
* move integration tests to cron
* Revert "move integration tests to cron"
This reverts commit f9bdf2f04b .
* disable flakey tests on CI
* wip
* wip
* Revert "Revert "move integration tests to cron""
This reverts commit 66aafa7327 .
* fix
* wip
* fix
---------
Co-authored-by: Brandon Williams <mbrandonw@hey.com >
Co-authored-by: Mateusz Bąk <bakmatthew@icloud.com >
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com >
Co-authored-by: Jesse Tipton <jesse@jessetipton.com >
2023-11-13 12:57:35 -08:00
Brandon Williams
10e84922b2
Simplify case studies. ( #2526 )
2023-10-23 12:03:11 -04:00
Stephen Celis
50f8e0d9a6
Update Focus demo to use bind helper ( #2472 )
...
TCA re-exports SwiftUI Navigation's `bind` view modifier, so we may as
well use that in our case study.
2023-09-20 09:51:34 -07:00
Brandon Williams
2c93195c23
Prerelease 1.0 ( #1929 )
...
* Converted voice memos back to identified array
* update deps
* update docs for DismissEffect
* wip
* Add Sendable conformance to PresentationState (#2086 )
* wip
* swift-format
* wip
* wip
* fix some warnings
* docs
* wip
* wip
* Catch some typos in Articles (#2088 )
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* docs
* wip
* wip
* docs
* wip
* wip
* wip
* wip
* docs
* docs
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Fix invalid states count for 3 optionals and typos (#2094 )
* wip
* wip
* more dismisseffect docs
* fixed some references
* navigation doc corrections
* more nav docs
* fix cancellation tests in release mode
* wrap some tests in #if DEBUG since they are testing expected failures
* update UUIDs in tests to use shorter initializer
* fixed a todo
* wip
* fix merge errors
* wip
* fix
* wip
* wip
* fixing a bunch of todos
* get rid of rawvalue in StackElementID
* more todos
* NavLinkStore docs
* fix swift 5.6 stuff
* fix some standups tests
* fix
* clean up
* docs fix
* fixes
* wip
* 5.6 fix
* wip
* wip
* dont parallelize tests
* updated demo readmes
* wip
* Use ObservedObject instead of StateObject for alert/dialog modifiers.
* integration tests for bad dismissal behavior
* check for runtime warnings in every integration test
* wip
* wip
* wip
* fix
* wip
* wip
* wip
* wip
* wip
* wip
* Drop a bunch of Hashables.
* some nav bug fixes
* wip
* wip
* wip
* fix
* fix
* wip
* wip
* Simplify recording test.
* add concurrent async test
* fix
* wip
* Refact how detail dismisses itself.
* fix
* 5.6 fix
* wip
* wip
* wip
* wip
* Add TestStore.assert.
* Revert "Add TestStore.assert."
This reverts commit a892cccc66 .
* add Ukrainian Readme.md (#2121 )
* Add TestStore.assert. (#2123 )
* Add TestStore.assert.
* wip
* Update Sources/ComposableArchitecture/TestStore.swift
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
* Update Sources/ComposableArchitecture/Documentation.docc/Extensions/TestStore.md
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
* fix tests
---------
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
* Run swift-format
* push for store.finish and presentation
* wip
* move docs around
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Add case subscripts
* wip
* wip
* wip
* 5.7-only
* wip
* wip
* wip
* wip
* fix
* revert store.finish task cancellation
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* add test for presentation scope
* wip
* wip
* wip
* wip
* wip
* cleanup
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Rename ReducerProtocol.swift to Reducer.swift (#2206 )
* Hard-deprecate old SwitchStore initializers/overloads
* wip
* wip
* Resolve CaseStudies crash (#2258 )
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Bump timeout for CI
* wip
* wip
---------
Co-authored-by: Jackson Utsch <jutechs@gmail.com >
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
Co-authored-by: 유재호 <y73447jh@gmail.com >
Co-authored-by: Dmytro <barabashdmyto@gmail.com >
Co-authored-by: mbrandonw <mbrandonw@users.noreply.github.com >
2023-07-27 17:35:07 -07:00
Stephen Celis
95d2bc701b
Better Bindings Revisited ( #2215 )
...
* Simpler bindable view state
* wip
* wip
* wip
* wip
* wip
* wip
* simplify
* wip
* wip
* wip
* wip
* wip
* wip
* wip
2023-06-28 09:31:12 -07:00
Stephen Celis
767231d179
Add Store.init that takes reducer builder ( #2087 )
...
* Add `Store.init` that takes reducer builder
* wip
* wip
* added some tests
* wip
* wip
* wip
---------
Co-authored-by: Brandon Williams <mbrandonw@hey.com >
2023-05-11 12:30:08 -07:00
Stephen Celis
52c4a01437
Rename BindableState to BindingState ( #1855 )
...
The -`able` naming evokes protocols in Swift, and is an outlier when
considered alongside the rest of TCA's binding tools:
- `BindingAction`: concrete type
- `BindableAction`: protocol
- `BindingReducer`: concrete type
So, let's make things consistent.
The one caveat is that Swift diagnostics for such a deprecation aren't
great, so users won't get proactive warnings here for the time being:
https://github.com/apple/swift/issues/63139
We may just want to keep the deprecation around till it does...
2023-01-20 14:56:53 -08:00
Stephen Celis
30015d13a3
Revert #1790 ( #1795 )
...
It occurred to us that this solution unfortunately is incompatible with
view actions. We have an alternate solution that works, so I'll PR that
in the future if no others materialize!
2023-01-05 18:04:48 -05:00
stephencelis
d1c2e5b6d1
Run swift-format
2023-01-05 18:30:30 +00:00
Thomas Grapperon
c719fa1d39
Allow BindingReducer to work with ViewState ( #1790 )
...
* Simpler bindable view state
* wip
* wip
* Remove `BindingStore`
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Make BindingState conditionally sendable.
* Fixed tests
* Update bindings article
* Add some additional contextual information to the runtime warnings
* update some docs
* lots more docs
* test clean up
* Improve diagnostic
* Put back `BindingReducer()` in the form study
* clean up
* Improve DocC references
* Remove DocC references for `@`'d property wrappers.
* wip
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
Co-authored-by: Brandon Williams <mbrandonw@hey.com >
2023-01-05 13:18:34 -05:00
유재호
790469d1e5
Remove unnecessary dependencies in every CaseStudies ( #1503 )
...
* Remove unnecessary dependencies in SwiftUI-CaseStudies
* Remove unnecessary dependencies in other-CaseStudies
* Add MARK headers to every SwiftUI-CaseStudies
2022-10-15 14:23:01 -07:00
Brandon Williams
b8294b89d5
ReducerProtocol ( #1283 )
...
* Add previewValue to DependencyKey, and fixed build errors on Xcode 13.
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Add Xcode 14 to CI (#1266 )
* Add Xcode 14 to CI
* Update ci.yml
* wip
* wip
* Update Makefile
* Update Makefile
* wip
* runtime warning when no live dependency available for live app
* bring back live
* wip
* soft deprecate Reducer
* fusion test
* ternary clean up
* wip
* add some todos
* typealias Reducer inside AnyReducer
* Add `now` convenience property to date dependency (#1286 )
* Remove type alias
* LiveDependencyKey: DependencyKey -> DependencyKey: TestDependencyKey (#1288 )
* LiveDependencyKey: DependencyKey -> DependencyKey: TestDependencyKey
* wip
* wip
* wip
* wip
* wip
* fix
* wip
* fix navigate case studies
* wip
* fixes and docs
* more migration
* wip
* wip
* thread deps through ifLet and forEach examples.
* update
* clean up
* wip
* wip
* Update MigratingToReducerProtocols.md
* wip
* wip
* docs
* docs
* fix some docs
* Fix for CombineReducers compiler bug
* wip
* wip
* wip
* wip
* todos for docs
* Don't warn for overridden test dependencies (#1324 )
* Don't warn while setting test dependencies
* wip
* fix conflict
* wip
* Docs and deprecations
* add binding info
* wip
* Add URL session
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Don't run debug reducer in tests
* wip
* updated reducer debugging
* Update UUID.swift (#1374 )
* wip
* optional
* added Self as default associatedtype value for TestDependencyKey.value (#1395 )
* added Self as default associatedtype value for TestDependencyKey.value
* Update Tests/ComposableArchitectureTests/DependencyKeyTests.swift
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com >
* Update example to set badge to the unread count (#1391 )
* Add store.finish().
* Fix warnings introduced in Xcode 14.1 (#1388 )
* Fix warnings introduced in Xcode 14.1
* wip
* Conform dependency values to DependencyKey where convenient
* fix
* Fail if testValue is invoked without providing implementation (#1399 )
* Update example to set badge to the unread count (#1391 )
* Add store.finish().
* Fix the CaseStudies (UIKit) (#1392 )
* Fix warnings introduced in Xcode 14.1 (#1388 )
* Fix warnings introduced in Xcode 14.1
* wip
* Fail when accessing testValue when one hasn't been provided.
* wip
* wip
* wip
* test
Co-authored-by: Mark Adams <hyperspacemark@users.noreply.github.com >
Co-authored-by: Maciek Czarnik <Czajnikowski@users.noreply.github.com >
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
* Add DateGenerator.init(_ generate:)
* Start running some tests in release config. (#1405 )
* Start running some tests in release config.
* wip
* wip
* wip
* wip
* wip
* Update Sources/ComposableArchitecture/Store.swift
Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com >
* wip
* wip
Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com >
* added test that dependencies are transferred to effects
* wip
* self
* clean up
* simplify
* fix
* doc fixes
* wip
* fix
* wip
* wip
* wip
* fix
* Run dependencies tests on CI. (#1408 )
* Run dependencies tests on CI.
* wip
* update makefile
* wtf
* more docs
* more docs
* wip
* docs
* wip
* docs
* wip
* message tweaks
* wip
* docs and clean up
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* typo fix
* docs clean up
* doc fixes
* cancel in progress
* cancel in progress
* no need to make recope release-only, and make more use of XCTAssert to get better release tests
* fix test
* Remove ActorIsolated from tests where it's not needed
* fix test
* wip
* wip
* Add a benchmark for dependency key writing.
* fix test
* make benchmark 5.7 compatible
* iflet docs
* more docs
* dependency docs
* rearrange
* @Dependency docs
* docs
* fix benchmark in 5.6
* doc fix
* wip
* wip
* wip
* wip
* more docs
* clean up
* fix
* wip
* Fixes compilation on watchOS (#1423 )
Co-authored-by: Gunnar Herzog <gunnar.herzog@kf-interactive.com >
* move deprecation
* format
* wip
* Fix openURL
* wip
* wip
* wip
* wip
* fix
* Keep simple
* Reducer.debug -> Reducer._printChanges
We want to revisit some of these debugging APIs in the future, so let's
keep them around, but underscore them to allow for more flexible
evolution.
* `ReducerProtocol.debug` -> `ReducerProtocol._printChanges` (#1426 )
* Reducer.debug -> Reducer._printChanges
We want to revisit some of these debugging APIs in the future, so let's
keep them around, but underscore them to allow for more flexible
evolution.
* Update DebugTests.swift
* OpenURL fix for macCatalyst (#1429 )
* OpenURL fix for macCatalyst
Fixes #1428 .
* Update Makefile
* Correct typo in "Designing dependencies" chapter (#1430 )
protocol AudioPlayerClient should be a struct
* fix
* fix
* protocol docc
* docs
* Typos (#1439 )
* remove unneeded internals
* wip
* Fix missing parameter in code sample (#1450 )
* typo fix
* more docs for DependencyKeyWritingReducer
* wip
* wip
* update readme
* wip
* update image
* main actor
* Added withValue, added docs and tests
* public properties
* cleaned up overload
* changed reducer->feature in a bunch of spots of dependencies docs
* add articles to readme
* 6
* fix tests for swift 5.6
* tweak
* tweak
* Update ReducerProtocol.swift
* wip
* wip
* docs update
* docs for conforming dependency directly to DependencyKey
* typo fix
* performance article update
* fixes
* deprecate another effect timer API
* link to migration doc in deprecation messages
* make some tests that deal with line numbers less fragile
* package.swift clean up
* tweak to echos
* remove docs at root, not in docs-out
* remove todo
* update WithViewStore.init deprecation message to explain and link to performance doc
* Add back ReducerProtocolOf for 5.7.1 (#1444 )
* Add back ReducerProtocolOf for 5.7.1
* wip
* Move scheme tests to matrix
* streamline
* try this
* store.finish
* wip
* dependencies -> transformDependency
* wip
* wip
* Compat
* fix
* preserve deps for combine publishers
* Remove dump calls (#1460 )
* Fix compiler errors for library evolution. (#1443 )
* Fix compiler errors for library evolution.
* wip
* wip
* work around ambiguous init
* Revert "work around ambiguous init"
This reverts commit 002a199d59 .
* fix ambiguity errors
* remove _Observe for now
* wip
* wip
* wip
* longer timeout
* more waiting
* wip
Co-authored-by: Stephen Celis <stephen@stephencelis.com >
Co-authored-by: Ken Grigsby <kgrigsby@mac.com >
Co-authored-by: Petr Sima <ptea.sima@gmail.com >
Co-authored-by: Mark Adams <hyperspacemark@users.noreply.github.com >
Co-authored-by: Maciek Czarnik <Czajnikowski@users.noreply.github.com >
Co-authored-by: Thomas Grapperon <35562418+tgrapperon@users.noreply.github.com >
Co-authored-by: Gunnar Herzog <github@trispo.de >
Co-authored-by: Gunnar Herzog <gunnar.herzog@kf-interactive.com >
Co-authored-by: Guttorm Aase <guttormaase@gmail.com >
Co-authored-by: Julien Sagot <contact@juliensagot.fr >
Co-authored-by: Jaanus Siim <jaanussiim+github@gmail.com >
2022-10-10 11:37:50 -04:00
Stephen Celis
bef2084cb2
Introduce WithViewStore.init(_:observe:send:...) ( #1339 )
...
* wip
* Introduce `WithViewStore.init(_:observe:send:...)`
* Update examples
* wip
* typo
* wip
2022-09-07 10:08:20 -04:00
Thomas Grapperon
b979b442da
Modernize SwiftUI Case Studies ( #1208 )
...
* Replace `.navigationBarTitle` by `.navigationTitle`
* Remove .background from Animation
* Update 01-GettingStarted-Bindings-Basics.swift
* Update 01-GettingStarted-Bindings-Forms.swift
* Update 01-GettingStarted-Composition-TwoCounters.swift
* Update 01-GettingStarted-Counter.swift
* Update 01-GettingStarted-FocusState.swift
* Update 01-GettingStarted-OptionalState.swift
* Update 01-GettingStarted-SharedState.swift
* Update 02-Effects-Basics.swift
* Update 02-Effects-Cancellation.swift
* Update 02-Effects-LongLiving.swift
* Update 02-Effects-Refreshable.swift
* Update 02-Effects-Timers.swift
* Update 02-Effects-WebSocket.swift
* Update 02-Effects-SystemEnvironment.swift
* Update 03-Navigation-NavigateAndLoad.swift
* Update 04-HigherOrderReducers-ElmLikeSubscriptions.swift
* Update 04-HigherOrderReducers-Recursion.swift
* Update 04-HigherOrderReducers-ReusableFavoriting.swift
* Update CircularProgressView.swift
* Update DownloadComponent.swift
* Reindent `XCTestDynamicOverlay` block
* Use a dedicated shape for the clock hand
This is a little much simpler I guess.
* Go back to use a Path, much simpler to understand.
* Use more natural modifiers to apply styles
* small updates
* Center the "clocks" horizontally
Co-authored-by: Brandon Williams <mbrandonw@hey.com >
2022-07-13 10:08:09 -04:00
유재호(예거)
dd5ced35df
[SwiftUI Case Studies] Revise initialState and layout in Animations ( #1195 )
...
* Remove some unnecessary 'nil' literals in State structs.
* Revise initialState and layout
- move Circle's initial location to center of the screen for better visibility
- align 'circleColor' property's value with actual color using colorInvert()
- remove top margin to display more text because we cannot apply ScrollView in this case
* Update AnimationTests
2022-07-11 15:11:18 -04:00
Brandon Williams
90d91ffedc
Clean up compiler checks. ( #1167 )
2022-06-28 16:05:50 -04:00
Stephen Celis
bec0128bae
Clean up sample code ( #1156 )
...
We employ a few tricks that might be confusing folks that are unfamiliar
with them, so this dials some things down in the sample code and docs.
We could maybe take it further, but this is a start.
2022-06-22 13:19:55 -04:00
Stephen Celis
c232a9f353
Swift 5.7 fixes ( #1089 )
...
* Fix Swift 5.7 warnings
* Fix Swift 5.7 threading issue
2022-05-12 13:07:37 -04:00
Stephen Celis
8260a1ab8d
Fix bindable deprecations ( #815 )
...
* Fix Bindable Deprecations
* More CI
* wip
* wip
* wip
* wip
2021-09-20 10:03:43 -04:00
Stephen Celis
c0c95c5bab
Deprecate dynamic member lookup on view stores in favor of ViewStore.binding ( #810 )
...
* wip
* wip
2021-09-17 12:33:38 -04:00
Stephen Celis
af88fe4c79
Safer, Conciser Bindings ( #765 )
...
* Better binding tools.
* make everything public
* deprecate
* update
* clean up
* wip
* dml
* wip
* wip
* Fix a redundant conformance constraint warning in ForEachStore (#738 )
The warning was:
Sources/ComposableArchitecture/SwiftUI/ForEachStore.swift:141:28: warning: redundant conformance constraint 'EachContent' : 'View'
public init<EachContent: View>(
^
Sources/ComposableArchitecture/SwiftUI/ForEachStore.swift:146:16: note: conformance constraint 'EachContent' : 'View' implied here
EachContent: View,
^
I fixed the warning by removing the redundant constraint from the type
parameter.
* wip
* wip
* wip
* wip
* wip
* wip
* wip
Co-authored-by: Brandon Williams <mbrandonw@hey.com >
Co-authored-by: Adam Roben <aroben@apple.com >
2021-09-06 11:10:47 -04:00
mbrandonw
c24ea6e7ab
Run swift-format
2021-08-02 14:56:16 +00:00
Brandon Williams
8ae8a60770
@FocusState case study. ( #690 )
...
* @FocusState case study.
* compiler version
2021-08-02 10:49:59 -04:00