Commit Graph

305 Commits

Author SHA1 Message Date
Stephen Celis
c8a2e9490a Test Store documentation updates (#1129) 2022-06-03 17:02:38 -04:00
Thomas Grapperon
37d05164c3 Conform WithViewStore to Commands (#1113)
* Conform `WithViewStore` to `Commands`

* Fix typo

* Add coverage for `Commands`

* Fix documentation

* Conform `WithViewStore` to `AccessibilityRotorContent` and `ToolbarContent`

* Conform `WithViewStore` to `TableColumnContent`

* Fix indentation

* Conform `WithViewStore` to `TableRowContent`

* Fix Typo

* Conform `WithViewStore` to `DynamicTableRowContent`

* Reorder declarations according to the protocol name

* Add coverage for `WithViewStore` new conformances

* Remove Table-related conformances

* Rearrange extensions for better autocomplete.

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-06-03 11:53:54 -04:00
Brandon Williams
24548d000d Make TestStore.state public (#1127)
* Make TestStore.state public.

* wip
2022-06-03 08:21:34 -07:00
Stephen Celis
fb0d371e14 Use eraseToEffect mapping functions (#1102) 2022-05-27 10:41:57 -04:00
konomae
1ddfab852d Fix minor typo (#1109) 2022-05-26 07:20:30 -07:00
Stephen Celis
dc9dd315ee Cleanup (#1107) 2022-05-24 15:15:57 -04:00
Cristian Díaz
99da71ff51 Add throttle overloads that take types (#1101)
Co-authored-by: Cristian Díaz <cristian.diaz@monstar-lab.com>
2022-05-19 11:01:29 -04:00
Stephen Celis
c307541328 Allow synchronous fireAndForget to throw (#1092) 2022-05-16 12:40:28 -04:00
Ryan Carver
f00277ac64 Tighten TestStore equality expectations (#1091)
* Add tests for TestStore equality assertions

* Change TestStore to require a state change if a closure is given

* Update a use of TestStore that described a change unnecessarily

* Remove unused mainQueue
2022-05-13 14:20:01 -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
Brandon Williams
79e44cebd4 Ignore errors thrown in fireAndForget. (#1088)
* Ignore errors throw in fireAndForget.

* Update Sources/ComposableArchitecture/Effects/Concurrency.swift

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

* Update Sources/ComposableArchitecture/Effects/Concurrency.swift

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2022-05-10 10:24:59 -07:00
Brandon Williams
07cd0c2cf3 Add priority to async fireAndForget. (#1084)
* Add priority to async fireAndForget.

* actually use priority
2022-05-06 18:58:04 -07:00
Brandon Williams
1fe9fb7e95 Async fire-and-forget (#1083)
* Make fireAndForget async.

* wip

* tests
2022-05-06 13:30:23 -07:00
Stephen Celis
f0098d8232 Add cancel overloads that take types (#1078)
* Add cancel overloads that take types

* wip
2022-05-03 21:00:24 -04:00
Stephen Celis
bf521e9e5d Improve performance of type-safe effect cancel token lookup (#1077)
* Add type discriminator to effect cancel id hashing

* wip
2022-05-03 17:35:09 -04:00
Brandon Williams
e0b7206202 Rename longLivingEffects to inFlightEffects. (#1076) 2022-05-03 11:07:36 -07:00
Stephen Celis
1d6f65c692 Fix docs 2022-05-03 08:55:13 -04:00
Brandon Williams
af3eed801a Move send(_:animation:) to ViewStore.swift. (#1075) 2022-05-02 17:44:45 -07:00
Thomas Grapperon
007c857bde Fix references to swift-parsing (#1071) 2022-04-30 19:32:00 -07:00
mbrandonw
96f47fbe85 Run swift-format 2022-04-08 16:57:56 +00:00
Brandon Williams
c8482eb61b Move DEBUG check to runtimeWarning function. (#1056)
* Move DEBUG check to runtimeWarning function.

* wip
2022-04-08 09:48:35 -07:00
Kevin Lundberg
1a2dd2d505 Add a map-style overload to eraseToEffect (#1050) 2022-04-07 09:40:52 -04:00
Stephen Celis
1bb0ad7c46 CI: macOS 12 + DocC (#1047)
* macOS 12

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* basics

* wip

* wip

* wip

* wip

* wip
2022-04-07 09:40:23 -04:00
stephencelis
ea07f63f3d Run swift-format 2022-03-29 21:17:14 +00:00
Pat Brown
5da277f16f Effect.cancel(ids:) prefer array of ids and deprecate variadic overload (#1041)
* Use array of ids and deprecate variadic overload

* Update Sources/ComposableArchitecture/Internal/Deprecations.swift

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2022-03-29 17:09:22 -04:00
Brandon Williams
d1d71606a4 Update failure message for better order. (#1025) 2022-03-16 12:51:46 -07:00
Pat Brown
02ac00d4ed Add transparent attribute to runtimeWarning (#1024) 2022-03-15 20:18:17 -04:00
Stephen Celis
2828dc44f6 Runtime Warning Finesse (#1023) 2022-03-15 16:21:13 -04:00
Thomas Grapperon
85050a28a9 Fix WithViewStore issues with Views using escaping closures (#1015)
* Use a new instance of `ViewStore` in `WithViewStore`'s `body`

* Use explicit `self` for style coherence

* Remove `viewCancellable` additional reference in `newInstance()`

* Revert "Remove `viewCancellable` additional reference in `newInstance()`"

This reverts commit cb6a22ae4f.

* Change `viewCancellable` capture list

* Update `GeometryReader`'s workarounds
2022-03-11 15:23:42 -05:00
Pat Brown
e828aeb496 Effect.cancel(ids:) prefer sequence of ids over variadic list. (#1009)
* Disfavor variadic cancellation

* Changed ids paramter from array to sequence

* Small typo
2022-02-24 10:23:26 -08:00
Pat Brown
ed4c236973 Send completion for cancellation subject (#997) 2022-02-07 09:34:19 -05:00
Omar Albeik
620ec5c6d9 Fix a typo in Store docs (#998) 2022-02-07 09:32:02 -05:00
Stephen Celis
3cbc9d7daf Don't consider an effect in-flight till it's kicked off (#977) 2022-01-21 16:20:35 -05:00
stephencelis
1ab5bb151a Run swift-format 2022-01-21 18:30:06 +00:00
iampatbrown
a9265d435a Cancel in flight effects inline instead of returning concatenated effect (#976) 2022-01-21 13:11:14 -05:00
Stephen Celis
365d141689 Fix docs (#975)
* Fix docs

Fixes #974.

* Update ci.yml
2022-01-18 10:02:36 -05:00
mcfans
ba9c626ab1 Improved way to get SwiftUI image handle (#945)
* Improved way to get SwiftUI image handle

* Use #dsohandle instead of fatalerror

* Search /SwiftUI instead and use dyld image header pointer instead of convert it

Previous approch will crash on mac platform but ok with iOS simulator
2022-01-11 10:04:27 -05:00
stephencelis
2975d410d6 Run swift-format 2022-01-07 21:19:35 +00:00
iampatbrown
e5e10d8e87 Update .cancellable implementation to fix #946 (#949)
* Subscribe to upstream publisher instead of PassthroughSubject

* Fixed operator order

* Replaced RunLoop.immediate with RunLoop.test
2022-01-07 16:10:42 -05:00
Stephen Celis
313dd217dc Improving developer experience with runtime warnings (#943)
* Perform thread check only when store is created on main thread.

* clean up

* Update Sources/ComposableArchitecture/Store.swift

* clean up

* Update Sources/ComposableArchitecture/Store.swift

* clean up

* execute setSpecific only once.

* logic fix

* added a test

* typo

* wip

* wip

* wip

* clean up

* language

* wip

* note

* wip

* wip

* wip

* wip

* wip

* fix closing quote

* wip

* fix merge

* Deprecations

* Fix docs

* wip

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-01-03 10:55:13 -06:00
Stephen Celis
9c162f485b Fix iOS 14 alert/confirmationDialog runtime crash (#931)
* Fix iOS 14 alert/confirmationDialog runtime crash

* wip

* wip
2021-12-20 16:38:09 -05:00
Stephen Celis
ff41e51a4e Limit async/await to Swift 5.5.2 (Xcode 13.2) (#923) 2021-12-16 16:32:02 -05:00
Stephen Celis
35ca967042 Don't use Store.scope or ViewStore.send in TestStore (#921) 2021-12-15 12:05:10 -05:00
stephencelis
b85fb40057 Run swift-format 2021-12-13 19:12:18 +00:00
Stephen Celis
23155a04fe Support concurrency backdeployment (#916) 2021-12-13 14:03:15 -05:00
Stephen Celis
87f388bedb Further Modernize Demos (#914)
* Modernize Demos

* wip
2021-12-09 22:41:58 -05:00
Stephen Celis
25f943cf3c Deprecate TestStore.assert (#912) 2021-12-07 21:10:02 -05:00
stephencelis
d992e4c775 Run swift-format 2021-12-03 21:11:01 +00:00
Fero
921272e329 Add support for accessibility modifiers on TextState (#863)
* wip

* wip2

* fix unsupported builds

* handle custom dump

* alphabetize

* use TextState for .accessibilityLabel associated value
2021-12-03 16:04:01 -05:00
Thomas Visser
068333afdc Make AlertState.ButtonAction.type public (#871) 2021-10-25 16:16:06 -04:00