Commit Graph

712 Commits

Author SHA1 Message Date
Oron Ben Zvi
f0a48dd693 Fix ContactDetailFeature file name in navigation tutorial (#2175) 2023-06-05 09:30:14 -04:00
Daiki Matsudate
b4a3420ded Fix docs (#2174) 2023-06-04 11:45:44 -07:00
Nick Kohrn
f16e7751dd Update StackBasedNavigation Documentation (#2169) 2023-06-02 10:50:35 -07:00
Nick Kohrn
da9d3503a5 Update PresentationReducer Documentation (#2168) 2023-06-02 11:37:59 -04:00
Takehiro Kaneko
570fa26843 fix ViewStore binding doc comment (#2165) 2023-06-01 10:04:50 -07:00
Brandon Williams
d52a88d17e Add testing gotcha about double linking. (#2161)
* Add testing gotcha about double linking.

* clean up
2023-05-31 18:01:18 -04:00
Jaesung
9f2f526408 Update StackBasedNavigation.md to use .run instead using .fireAndForget (#2160)
* Update StackBasedNavigation.md

* Apply suggestions from code review

---------

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2023-05-31 13:51:56 -07:00
Kristoffer Johansson
f9161dbfcf Fix typo in PresentationAction documentation (#2159) 2023-05-31 15:51:15 -04:00
Maciek Czarnik
d8913b3f97 Small fixes in the DocC (#2157)
* Fix some typos and minor errors

* Multiple presentation destinations and navigation stacks fixes

* Some more small fixes
2023-05-31 15:15:44 -04:00
Ryu
a70d02159a Effect.fireAndForget is deprecated, so rewrote it to run instead (#2153) 2023-05-31 10:08:59 -07:00
Sebastian Nicklas
29b5900836 Update StackBasedNavigation.md (#2154)
Fix some typos in StackBasedNavigation documentation
2023-05-31 09:04:26 -04:00
hmhv
8dfe7d6e0c Fix typo (#2152)
* Update 02-03-01-code-0001.swift

* Update 02-03-01-code-0002.swift

* Update 02-03-01-code-0003.swift

* Update 02-03-01-code-0004.swift

* Update 02-03-01-code-0005.swift

* Update 02-03-01-code-0008-previous.swift

* Update 02-03-01-code-0008.swift

* Update 02-03-01-code-0009.swift

* Update 02-03-01-code-0010.swift

* Update 02-03-01-code-0011.swift

* Update 02-03-01-code-0012.swift

* Update 02-03-01-code-0013.swift

* Update 02-03-01-code-0014.swift

* Update 02-03-01-code-0015.swift
2023-05-31 09:03:52 -04:00
Tatsuzo Araki
a5eb99fe1b Fix typos (#2155) 2023-05-31 09:03:09 -04:00
Alexander Cyon
166f418696 fix wrong state in navigation doc (#2150) 2023-05-30 11:11:54 -07:00
mbrandonw
8b98ba40a2 Run swift-format 2023-05-30 16:25:21 +00:00
Stephen Celis
c432a76b5b Navigation (#1945)
* wip

* fix

* wip

* wip

* move

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Fix

* wip

* wip

* Renamed action to onTap in NavigationLinkStore (#2043)

Renamed the `action` parameter to mirror other inits and differentiate itself from `action fromDestinationAction`

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Tie view identity to stack element identity

* Tie item identity to case

* wip

* wip

* cleanup

* fix

* fix

* Add warning to nav link

* wip

* wip

* Rename FullscreenCover.swift to FullScreenCover.swift (#2062)

* wip

* fix isDetailLink on non-iOS platforms

* Correct some comments in Effect.swift (#2081)

* add integration tests for showing alert/dialog from alert/dialog.

* copy StackElementIDGenerator dependency before running TestStore receive closure.

* Removed some unneeded delegate actions.

* wip

* clean up

* lots of clean up

* 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

* docs

* wip

* wip

* Catch some typos in Articles (#2088)

* 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

* fix

* 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

* 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

* move docs around

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add case subscripts

* wip

* wip

* 5.7-only

* wip

* wip

* wip

* wip

* 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

* updated presentation scope test

* sytnax update

* clean up

* fix test

* wip

* wip

* wip

* wip

* wip

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: Martin Václavík <mvaclavik96@icloud.com>
Co-authored-by: 유재호 <y73447jh@gmail.com>
Co-authored-by: Jackson Utsch <jutechs@gmail.com>
Co-authored-by: Dmytro <barabashdmyto@gmail.com>
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
Co-authored-by: mbrandonw <mbrandonw@users.noreply.github.com>
2023-05-30 12:22:00 -04:00
Jaesung
c6cad7e660 [FIX] Fixed type: struct action to enum action (#2144) 2023-05-30 07:56:42 -07:00
Tomáš Slíž
4aab2176b5 Fix assertion values (#2128) 2023-05-22 10:50:57 -04:00
Tomáš Slíž
40d1f53cc6 Fix usage of static storage property (#2124)
* Fix usage of static storage property

* Remove irrelevant timeout parameter

* Add missing import
2023-05-22 07:57:09 -04:00
Brandon Williams
b075eb14d0 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>
2023-05-19 16:15:12 -04:00
Brandon Williams
66013eaf65 Revert "Add TestStore.assert."
This reverts commit a892cccc66.
2023-05-19 13:38:40 -04:00
Brandon Williams
a892cccc66 Add TestStore.assert. 2023-05-19 13:37:48 -04:00
Stephen Celis
dae66e4248 DocC organization (#2118)
* DocC organization

* wip
2023-05-18 11:05:36 -07:00
Brandon Williams
6c94563494 Some small tutorial fixes. 2023-05-18 09:33:16 -04:00
Brandon Williams
db103c423f Make internal helper @MainActor. (#2117) 2023-05-17 20:15:31 -04:00
HanjunYu
b6559103c7 fix DebugReducer (#2115)
@_docmentation is available in 5.8 and later
2023-05-17 08:44:32 -04:00
Yuki Yamamoto
fdb6fbe4da Fix typo in the "Meet the Composable Architecture" tutorial (#2114)
* Fix typo

* Update Sources/ComposableArchitecture/Documentation.docc/Tutorials/01-YourFirstFeature.tutorial

* Update Sources/ComposableArchitecture/Documentation.docc/Tutorials/03-TestingYourFeature.tutorial

---------

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2023-05-16 16:48:18 -07:00
alex-reilly-pronto
b017871ab7 When exhaustivity is off receive now waits for the expected action rather than the first action (#2100)
* Tests passing

* cleanup

* Add tests

* cleanup

* rollback package resolved

* Clean up

* wip

* Bump up timeouts in tests from hundredths to tenths of a second

* bump timeouts

* fix test

---------

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com>
2023-05-16 17:45:00 -04:00
Brandon Williams
3688b3d485 Make Send sendable (#2112)
* Make Send wrap a sendable closure.

* Move Send under the effects docs.

* Fixed a bunch of doc references.

* wip

* wip

* fix

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2023-05-16 16:01:21 -04:00
Brandon Williams
5224148c83 Call prepareDependencies once when initializing TestStore. (#2111)
* Call prepareDependencies once when initializing TestStore.

* clean up
2023-05-16 11:28:50 -04:00
Ryu
42702308fe Fix Document in Testing.md (#2110) 2023-05-16 09:40:40 -04:00
Brandon Williams
4d07372c6b Some tutorial fixes. (#2109)
* Some tutorial fixes.

* wip

* wip

* wip
2023-05-15 17:56:53 -04:00
Stephen Celis
2ff0e5d0be Fix 2023-05-15 14:55:15 -07:00
mbrandonw
2298702e02 Run swift-format 2023-05-15 21:12:17 +00:00
Brandon Williams
28ba78ccfd "Meet the Composable Architecture" tutorial (#2107)
* A 'meet TCA' tutorial

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* static let instead of state

* wip

* wip

* fix swift 5.6

* small fixes

* fixes

* wip

* typo fixes

* small fixes

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2023-05-15 17:09:22 -04:00
Stephen Celis
83efc53258 Remove outdated docs 2023-05-12 14:24:10 -07:00
Stephen Celis
79307e939f Rename WithViewStore.debug to WithViewStore._printChanges (#2101) 2023-05-12 10:06:18 -07:00
stephencelis
4c8e80caa6 Run swift-format 2023-05-12 16:27:59 +00:00
Stephen Celis
5d4f96ddbe Soft-deprecate Effect.task and Effect.fireAndForget (#2099)
* Soft-deprecate `Effect.task` and `Effect.fireAndForget`

See https://github.com/pointfreeco/swift-composable-architecture/discussions/1520

* wip

* wip

* wip
2023-05-12 09:13:37 -07:00
stephencelis
8c691c1ae6 Run swift-format 2023-05-11 19:33:16 +00: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
stephencelis
c096892cad Run swift-format 2023-05-11 15:20:49 +00:00
Stephen Celis
da205c71ae Deprecate Store.scope(state:) for view store observe (#2097)
* Deprecate `Store.scope(state:)` for view store `observe`

Explicit scoping is most appropriate for transforming domains, which
almost always requires an action transform. In the rare case it doesn't,
we should prefer an explicit `{ $0 }`.

Scoping for the view has been deprecated for awhile for the `observe`
parameter when creating view stores, so let's lead folks that direction.

* wip

* wip
2023-05-11 08:17:54 -07:00
Brandon Williams
847d5edf3f Improve docs on how exhaustive vs non-exhaustive test stores work (#2096)
* Improved docs for non-exhaustive test stores.

* wip

* wip

* update test

* wip

---------

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2023-05-11 10:29:33 -04:00
stephencelis
a4c34bf069 Run swift-format 2023-05-10 20:36:48 +00:00
Stephen Celis
b7c5a40ce2 Deprecate type-based cancel IDs (#2091)
* Deprecate type-based cancel IDs

Swift may aggressively compile types out of release mode, including
types defined for cancellation. Because of this, folks should migrate to
use value-based identifiers and avoid any potential bugs.

* wip

* wip
2023-05-10 13:20:16 -07:00
Stephen Celis
04607631de Fix ordered set comparison check (#2082)
For some reason, using `memcmp` with an empty ordered set and a
non-empty ordered set returns true:

```swift
areOrderedSetsDuplicates([1, 2, 3], [])  // true
```

Because of this, we should always check the count before delegating to
`memcmp`. We should also be on the lookout for other exceptions in case
`memcmp` is not appropriate to use here.
2023-05-04 15:09:35 -07:00
Stephen Celis
8330f534c6 Make mega yield configurable by environment variable (#2064) 2023-04-27 13:43:32 -07:00
Stephen Celis
e7aa7301b5 Fix message to refer to clocks in addition to schedulers 2023-04-27 10:19:32 -07:00
stephencelis
b7b505749c Run swift-format 2023-04-26 16:13:06 +00:00