Commit Graph

241 Commits

Author SHA1 Message Date
Stephen Celis
0cd0c3ecce Update AlertState to use new APIs (#794)
* Update AlertState to use new APIs

* fix

* Feedback

* wip

* Fix

* wip

* wip

* wip

* wip
2021-09-20 10:42:17 -04:00
mbrandonw
bb5da6a0a4 Run swift-format 2021-09-20 14:12:18 +00: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
a554b00ff4 Remove old deprecations (#795)
* Remove old deprecations

* wip
2021-09-14 22:30:38 -04:00
Stephen Celis
03a814d0d3 Update bindable helpers docs (#783)
* Update bindable helpers docs

* wip
2021-09-10 12:27:10 -04:00
Stephen Celis
69b3605e3a Fix BindableState: Codable strategies (#781) 2021-09-10 10:33:03 -04:00
stephencelis
cb5150f57e Run swift-format 2021-09-07 16:50:30 +00:00
Luke Redpath
e2795c1789 Conform BindableState to CustomDebugStringConvertible (#777)
This ensures that bindable state properties are displayed in a useful way when using
`.dump` snapshot tests on your app state.
2021-09-07 12:15:23 -04:00
Stephen Celis
aac63d7e18 Add documentation for BindingAction.pullback (#771)
* Add documentation for `BindingAction.pullback`

* wip

* motivate
2021-09-07 10:23:43 -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
stephencelis
3c51885b98 Run swift-format 2021-08-25 19:56:19 +00:00
Stephen Celis
bf9ab75f9d Add CI for DocC warnings (#750)
* Add CI for DocC warnings

* More specific grep
2021-08-25 15:39:36 -04:00
Adam Roben
d4b438a61f 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.
2021-08-23 14:03:39 -04:00
Stephen Celis
575d7c0d59 Use Custom Dump (#736)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* wip

* Model Tic-Tac-Toe board using proper type

* wip

* wip

* wip

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-08-22 22:45:27 -04:00
stephencelis
67ccab6bce Run swift-format 2021-08-11 16:13:31 +00:00
Stephen Celis
e73b36e2cb WithViewStore debug state diffs (#706)
* WithViewStore debug state diffs

* More debug checks

* fix

* wip
2021-08-11 11:55:08 -04:00
Stephen Celis
2d1e21b5aa Convert #file to #fileID for debug purposes (#708) 2021-08-11 11:54:36 -04:00
Stephen Celis
5209f47b03 Update AlertState.Button APIs for animation (#681)
* Update AlertState.Button APIs for animation

* fix

* wip

* deprecate
2021-07-28 12:10:15 -04:00
Bernhard Loibl
71be9d9676 Enables animations for alert button actions (#680)
* Enables animations for alert button actions.

* Updates alert button api and previews.

Co-authored-by: Bernhard Loibl <bernhard.loibl@intive.com>
2021-07-28 10:21:41 -04:00
konomae
60fbb66016 Fix minor typo (#671)
* Fix typo: iff → if

* Add missing `>`
2021-07-26 08:17:31 -04:00
Stephen Celis
0978dde24a Keep last non-nil value around for ForEachStore (#668) 2021-07-22 13:32:49 -04:00
Olli Tapaninen
30f3027cf7 Fix IfLetStore so that it does not replay first seen state on nil-value (#667) 2021-07-22 10:31:58 -04:00
Stephen Celis
ac7ea43ff2 Merge remote-tracking branch 'origin/main' into ia 2021-07-09 15:41:49 -04:00
Stephen Celis
e900d29765 Add Benchmarking Target (#643)
* Benchmarks

* CI

* test

* fix?

* Fix
2021-07-08 15:07:49 -04:00
Stephen Celis
50a16e072e Deprecate array-based forEach/ForEachStore (#641)
* Deprecate array-based forEach/ForEachStore

* Update tests
2021-07-08 10:49:13 -04:00
Brandon Williams
5f6d8a2538 Don't use CasePath in .binding (#632)
* Don't use CasePath in .binding

* wip

* wip

* wip
2021-07-07 18:05:43 -04:00
Stephen Celis
e1c7077cd1 wip 2021-06-25 16:42:22 -04:00
Stephen Celis
fab3510d54 wip 2021-06-25 13:06:45 -04:00
stephencelis
ed857eb61e Run swift-format 2021-06-21 19:10:36 +00:00
Stephen Celis
2444710eff Add more SwitchStore overloads (#607)
Goes up to 9 cases + 1 default = 10 views in a tuple.
2021-06-21 14:58:38 -04:00
Stephen Celis
d30336ca13 Clean-up pass for DocC (#599) 2021-06-16 08:48:14 -05:00
Brandon Williams
9716a3247a Improve some docs. (#597)
* Improve some docs.

* wip

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/Store.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* Update Sources/ComposableArchitecture/ViewStore.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>

* 110 column

* update link

* add docc to switchstore

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-06-15 10:33:52 -04:00
mbrandonw
e043226f3d Run swift-format 2021-06-14 18:15:34 +00:00
Wendy Liga
1a8bccc62e Support DocC Xcode 13 (#591)
* wip

* finish

* revert back code snippet identation to 5

* Update Sources/ComposableArchitecture/Effect.swift

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>

Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
2021-06-14 14:10:08 -04:00
Stephen Celis
c99a2f9636 Update Tic-Tac-Toe to use enum state (#595)
* Update Tic-Tac-Toe to use enum state

* wip

* more swift compatability changes

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-06-14 12:39:39 -04:00
mbrandonw
e1c0a52897 Run swift-format 2021-06-14 14:53:01 +00:00
Brandon Williams
3d8db944c7 Add SwitchStore and CaseLet (#594)
* wip

* ttt

* simplfiy

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* docs

* wip

* wip

* wip

* wip

* wip

* updates

* revert ttt stuff'

* xcode 11 fixes

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-06-14 10:46:36 -04:00
Stephen Celis
37537a5248 Fix ForEachStore (#528) 2021-05-05 07:57:37 -07:00
Brandon Williams
468ffaa9ea Fix typo in AlertState docs (#520) 2021-04-29 08:09:33 -05:00
Stephen Celis
0f026d395d Update Store.ifLet docs (#500)
* Update `Store.ifLet` docs

* More docs

* Update syntax for old CI

* fix
2021-04-20 11:36:14 -04:00
Stephen Celis
c53a961920 Add @ViewBuilder to ForEachStore and IfLetStore (#501)
* Add @ViewBuilder to ForEachStore and IfLetStore

* Update IfLetStore else branch to take view builder
2021-04-20 11:10:30 -04:00
stephencelis
dcf6b8f469 Run swift-format 2021-04-05 18:30:47 +00:00
Stephen Celis
4e2b27b492 Safely unwrap ForEachStore rows (#471)
* Safely unwrap ForEachStore rows

* Add feedback link
2021-04-05 14:15:36 -04:00
Stephen Celis
f1faccc3a2 Updated TestStore DSL (#454)
* Update TestStore to support imperative DSL

This gives us better XCTIssue-based error messaging since each line is
captured in the stack.

* Update examples to new testing DSL

* Fix

* Update README.md

* 11.3

* fix

* fix
2021-03-22 13:27:51 -04:00
stephencelis
9e50df4427 Run swift-format 2021-03-10 23:02:03 +00:00
Stephen Celis
cb080b7478 TextState: DebugOutputConvertible (#421)
* Fix debug text

* XML

* wip

* wip

* wip
2021-03-10 17:56:13 -05:00
Steven Sherry
a116fff6d4 Addresses a couple of documentation issues for IdentifiedArray (#414)
* Addresses a couple of documentation issues for IdentifiedArray:
1. The AppState example is missing a generic. Based on the context of the documentation, I filled that into what I thought would be appropriate.
2. The ForEachStore example was missing a colon and comma.

* Update Sources/ComposableArchitecture/SwiftUI/IdentifiedArray.swift

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2021-03-06 12:16:32 -05:00
Stephen Celis
f8608c7421 Breakpoint instead of assert in optional/forEach (#296)
* Breakpoint instead of assert in optional/forEach

* fix merge

Co-authored-by: Brandon Williams <mbw234@gmail.com>
Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-03-02 13:03:15 -05:00
Stephen Celis
caebd33686 Add ViewStore.send(_:animation:). (#392) 2021-02-22 15:31:25 -05:00