Commit Graph

242 Commits

Author SHA1 Message Date
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
filblue
0715ba0c61 Fix unfunctional cancel button handlers in AlertsAndActionSheets case study (#779)
* Fix unfunctional cancel button handlers in AlertsAndActionSheets case study

* Fix tests

* Removes *CancelTapped actions from AlertsAndActionSheets case study
2021-09-08 12:10:01 -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
filblue
dacd3de63f NavigateAndLoad: Cancel loading on dismiss (#757)
* NavigateAndLoad: Cancel loading on dismiss

* Update Examples/CaseStudies/SwiftUICaseStudies/03-Navigation-NavigateAndLoad.swift

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

* Update Examples/CaseStudies/SwiftUICaseStudies/03-Navigation-Sheet-PresentAndLoad.swift

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

* Add cancellation to UIKitCaseStudies/NavigateAndLoad.swift

* Add cancellation to LoadThenNavigate studies

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2021-09-01 17:25:54 -04:00
Stephen Celis
83e7557d7b Simplify Reusable Download Component (#756) 2021-08-30 20:20:40 -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
Stephen Celis
96cdc7e38e Add Effect.task for wrapping units of async/await work (#715)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* docs

* clean up

* Remove bad test

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-08-16 09:32:58 -04:00
Brandon Williams
a38e04da7d Modernize some things (#713)
* Modernize some things.

* clean up

* wip

* wip

* clean up

* wip

* wip
2021-08-12 18:13:40 -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
Stephen Celis
026482d270 tic-tac-toe package (#684)
* tic-tac-toe package

* Update Package.swift

* Tests

* wip

* wip

* wip

* Update Package.swift
2021-07-29 09:18:49 -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
stephencelis
14ced811f8 Run swift-format 2021-07-28 14:29:31 +00: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
Stephen Celis
1b8c019e32 Update swift-format for Swift 5.5 (#677)
* wip

* Update format.yml

* wip

* Fix

* wip
2021-07-27 12:02:39 -04:00
stephencelis
4223ffbf97 Run swift-format 2021-07-26 19:16:30 +00:00
Brandon Williams
d4c0ff35de Add an async/await aware .send method to View Store. (#673)
* wip

* case study

* docs

* clean up

* more compiler directives.

* xcode 12 fixes

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-07-26 10:10:35 -04:00
Stephen Celis
cd76e31ef6 Update demos to use failing environments (#650) 2021-07-12 17:36:40 -04:00
Stephen Celis
5664c9bfe5 Prep 2021-07-11 22:56:18 -04:00
Stephen Celis
ac7ea43ff2 Merge remote-tracking branch 'origin/main' into ia 2021-07-09 15:41:49 -04:00
stephencelis
b931cece42 Run swift-format 2021-07-08 15:02:03 +00: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
Stephen Celis
fd3beef833 Fix recursive case study (#640)
* Fix recursive case study

Relying on the array-based ForEachStore means potential crashes when
SwiftUI evaluates views that it shouldn't. We always prefer using
IdentifiedArray, so let's update this example accordingly.

* Use forEach under the hood
2021-07-08 10:38:24 -04:00
mbrandonw
7bda33df27 Run swift-format 2021-07-08 14:26:10 +00:00
Brandon Williams
50dc37e8d2 Fix websocket case study and FactClient. (#639)
* Fix websocket case study and FactClient.

* Rename unimplemented to failing.

* Update Examples/CaseStudies/SwiftUICaseStudies/FactClient.swift

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

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-07-08 10:13:31 -04:00
Stephen Celis
ef45d038fc Revert code that snuck in #267 (#635)
Had some debug code that puzzled me while testing some of the Case Path
changes today.
2021-07-07 15:35:38 -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
fdd1fb2562 Run swift-format 2021-06-21 14:44:11 +00:00
Brandon Williams
14c6b5b218 Extract number fact dependency to a FactClient. (#600)
* Extract number fact dependency to a FactClient.

* wip
2021-06-21 10:36:51 -04:00
filblue
7b42aaced0 Delete unused liveTrivia(for:) and corresponding TriviaApiError (#583) 2021-06-02 17:51:05 -07:00
Yoshinori Imajo
f93f13febd Fix closure parameter. (#576) 2021-05-31 07:39:51 -05:00
Brandon Williams
6f1bc259e4 Modernize examples (#525)
* Refactor some of the example code.

* wip

* wip

* wip

* lots more updates

* fixes

* another fix

* todo simplification

* fix compiler issue in 11.7

* Update Examples/Todos/Todos/Todos.swift

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

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-05-04 09:17:21 -05: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
Hung Truong
1a7b69cdb5 Fix background colors in UIKit demos to work in light and dark mode (#482) 2021-04-07 17:51:30 -07:00
stephencelis
fcb84e1d1a Run swift-format 2021-03-22 17:40:03 +00: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
Stephen Celis
86d6e35514 Update case study README 2021-02-22 15:34:37 -05:00
Stephen Celis
caebd33686 Add ViewStore.send(_:animation:). (#392) 2021-02-22 15:31:25 -05:00
Stephen Celis
0fb6c9bfc3 Fix root reducer (#374) 2021-02-01 17:21:03 -05:00
Stephen Celis
5bdf0bc904 FormAction → BindingAction (#372)
* Rename FormAction to BindingAction

* Deprecations

* Fix test

* Update 01-GettingStarted-Bindings-Forms.swift
2021-02-01 16:41:36 -05:00
Stephen Celis
e51fb00d1f Remove type alias for Xcode 12.5 compatibility (#371)
* Remove type alias

* Fix a few warnings
2021-02-01 14:55:29 -05:00
Stephen Celis
ff57565322 Forms (#367)
* Forms

* wip

* wip

* Basics

* Fix

* Apply .textCase(.none) to section headeres.

* Small tweaks do docs and case study readme.

* Update Forms.swift

* Fix warnings

* Revert "Apply .textCase(.none) to section headeres."

This reverts commit f535a75eb9.

* fix

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2021-02-01 13:34:55 -05:00
Stephen Celis
b692a6deaf Simplify UIKit list case study (#365)
Suggestion from @ryanbooker: https://github.com/pointfreeco/swift-composable-architecture/discussions/351
2021-01-26 10:50:29 -05:00
Stephen Celis
4449bc2e24 Add TextState (for AlertState, ActionSheetState, etc.) (#359)
* Use SwiftUI.Text with {Alert,ActionSheet}State

Fix #293, #318.

* Use public interface

* Availability

* TextState

* Note

* Simplify

* Update LocalizedStringTests.swift

* Fix warnings

* Fix docs
2021-01-21 17:50:34 -05:00
Stephen Celis
5171335620 Localizable Alerts and Action Sheets (#275)
* Localizable Alerts and Action Sheets

Fixes #237.

* Tests/fixes

* Update LocalizedStringKey.swift

* Fix
2020-08-31 16:31:34 -04:00
mbrandonw
6db4cf39e0 Run swift-format 2020-08-27 15:08:49 +00:00
nmccann
66d19499bc Added some tests for Shared State case study. (#262)
* Added some tests for Shared State case study.

* Expanded upon tests by also validating that state is mirrored

State is expected to be mirrored (or shared) between the Counter and
Profile - the tests have been updated to verify this.

* Modified tests to focus more on what is changing between steps

Co-authored-by: Noah McCann <>
2020-08-27 10:49:12 -04:00
Brandon Williams
0bf4b25a2e Better error messages for uncompleted effects. (#270) 2020-08-27 10:48:22 -04:00