Commit Graph

57 Commits

Author SHA1 Message Date
Stephen Celis 712894cabc Update CoC 2023-01-30 12:25:05 -08:00
stephencelis a6a4236320 Run swift-format 2023-01-25 19:03:38 +00:00
Stephen Celis bf0fb9d530
Make `ButtonState` actions more flexible (#71)
* Allow alert state actions to be mapped

Co-authored-by: Skyler Smith <skylers@cricut.com>

* wip

* wip

* reorganize deprecations

* fix

Co-authored-by: Skyler Smith <skylers@cricut.com>
2023-01-25 10:49:28 -08:00
stephencelis a2154e67b6 Run swift-format 2023-01-24 01:00:41 +00:00
Stephen Celis 34af246f52
Support synchronous `ButtonState` action closures (#70)
* Support synchronous action closures

When we added async support for alert/dialog action closures, we broke
implicit animations, because it's impossible to run an async closure
inside `SwiftUI.withAnimation`. Let's bring back this functionality, and
runtime warn loudly whenever an animated action is emitted to an async
action handler.

* wip
2023-01-23 16:52:59 -08:00
Stephen Celis 2500304089
Alert/ConfirmationDialog updates (#68)
* Always open up closures with global actors

Going point-free style when `async` is involved can be problematic, and
lose things like the current actor.

* Support async confirmation dialog actions
2023-01-19 13:26:24 -08:00
mbrandonw 1db1bcfd1e Run swift-format 2023-01-18 22:07:57 +00:00
Brandon Williams 5e97ce7562
Small improvements (#67)
* wip

* wip

* wip

* simplfiy

* wip

* wip

* wip
2023-01-18 14:02:00 -08:00
유재호 45a77a21ba
Gardening some examples (#64)
* Gardening some examples

* Revert variable names
2023-01-18 10:47:31 -08:00
Marc Bauer f3ccc0b3a1
Add NSMicrophoneUsageDescription to allow running Standups example on device (#66) 2023-01-15 09:18:09 -08:00
Daeyoung Kim a7cd4275fb
Fix a code typo in DestructuringViews article (#63)
Signed-off-by: Daeyoung Kim <daykim22@gmail.com>

Signed-off-by: Daeyoung Kim <daykim22@gmail.com>
2023-01-13 06:13:10 -08:00
Brandon Williams 6155d6a77c
Update Readme.md 2023-01-12 14:55:39 -08:00
John Flanagan ddc01cdcdd
Fix typo (#62) 2023-01-09 13:06:17 -05:00
mbrandonw 83934f8649 Run swift-format 2023-01-09 17:19:30 +00:00
Brandon Williams 9e41fd55f9
New case study app showing off swift-dependencies (#61)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* lots of helpers

* added a ui test

* clean up

* wip

* wip

* clean up

* wip

* wip

* wip

* wip

* clean up

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* xcode 13 fix

* clean up

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2023-01-09 09:08:54 -08:00
Stephen Celis 14bb76a918
Update WithState.swift 2022-12-31 00:27:27 -05:00
유재호 c7891deeac
Fix typos in Articles (#60)
* Fix typos in Articles

* Update Sources/SwiftUINavigation/Documentation.docc/Articles/DestructuringViews.md

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
2022-12-25 09:07:07 -05:00
Stephen Celis 46acf5ecc1
Allow `Binding<Case?>` to write into `nil` (#54)
Fixes #53.
2022-12-14 16:26:08 -05:00
Yunosuke Sakai 949a90619d
Fix `Alert.Button.init` action (#50) 2022-12-14 09:50:43 -05:00
Stephen Celis b36d135f5e
Fix `ButtonState.init` ambiguity (#49)
Right now we have two overloads that specify optional `action`s, which means omitting the `action` parameter (or passing `nil`) is ambiguous.
2022-12-12 16:42:07 -05:00
Stephen Celis 54e000156a Typo fix 2022-12-12 15:53:43 -05:00
Stephen Celis 26e4de100f
Update Bindings.md 2022-12-07 13:12:45 -05:00
Thomas Grapperon a4a84e387c
Remove `Bindable` `DynamicProperty` inheritance. (#46) 2022-12-05 15:56:55 -05:00
Shinolr c374e21e19
Fix typo (#43) 2022-12-04 10:37:29 -06:00
유재호 2dbe77c11f
Gardening some examples (#42) 2022-11-28 09:56:29 -06:00
Stephen Celis 15b0477eaa Remove .spi.yml to restore watchOS builds 2022-11-24 09:39:24 -06:00
Stephen Celis 46641ea333
Update poster image to free recap 2022-11-24 09:30:16 -06:00
Quico Moya 753ae58ba4
Update dependency version (#34) 2022-11-23 07:00:04 -05:00
유재호 15644a3758
Change where confirmationDialog modifier applied (#38) 2022-11-23 06:59:41 -05:00
mbrandonw 2a16b53abc Run swift-format 2022-11-22 13:24:44 +00:00
konomae 4b666bcc59
Exclude `id` from `ButtonState`'s equatable conformance (#33) 2022-11-22 08:16:41 -05:00
mbrandonw ee78c0e69f Run swift-format 2022-11-21 20:21:46 +00:00
Brandon Williams 8db42e81f6
Some small fixes (#31)
* Some small fixes

* wip
2022-11-21 15:10:57 -05:00
mbrandonw 37eb93f853 Run swift-format 2022-11-21 18:42:28 +00:00
Stephen Celis 102ab45e10
Support navigationDestination, alerts, confirmation dialogs, and more! (#28)
* wip

* wip

* Update APIs

* wip

* wip

* docs

* wip

* readme tweaks

* TextState tests

* alert tests

* updates

* dont export swiftui

* wip

* wip

* update ci

* docc

* doc updates

* docs

* docs

* wip

* Update documentation.yml

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip;

* wip

* modernize inventory demo

* more modernization

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* bring back navigationDestination hack;

* wip

* wip

* wip

* wip

* wip;

* wip;

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Fix typos in README and CaseStudies (#30)

* Fix typos in README

* Fix mismatched navigation titles in CaseStudies

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* some <5.7 fixes

* another <5.7 fix

Co-authored-by: Brandon Williams <mbrandonw@hey.com>
2022-11-21 13:35:24 -05:00
유재호 5bf9dadd08
Fix typos in README and CaseStudies (#30)
* Fix typos in README

* Fix mismatched navigation titles in CaseStudies
2022-11-18 08:23:54 -05:00
stephencelis 8d1d922782 Run swift-format 2022-10-19 00:31:24 +00:00
Stephen Celis 8d9ac80c12
Update Package.resolved 2022-10-18 17:22:43 -07:00
Stephen Celis a974c35e3d
Update README.md 2022-10-18 17:18:13 -07:00
Stephen Celis 1276991597
NavigationLink updates; less escaping (#27) 2022-10-18 17:16:24 -07:00
Stephen Celis 128f264790
Runtime warn instead of breakpoint in `Switch` (#26)
* Runtime warn instead of breakpoint in `Switch`

* Bump swift tools version

* update CI

* wip
2022-10-18 17:16:18 -07:00
Stephen Celis 51c7b145a7
Fix CI (#25)
* Fix CI

* wip
2022-09-13 01:33:01 -04:00
Stephen Celis b137013389
Fix CI (#24) 2022-09-13 00:53:54 -04:00
Stephen Celis c3aff0f948 Git-ignore .swiftpm/ 2022-09-13 00:29:53 -04:00
stephencelis 7191be7095 Run swift-format 2022-06-15 00:43:51 +00:00
June Bash 75ad98cc91
Update IfCaseLet.swift (#22)
* Update IfCaseLet.swift

* Conform ElseContent to View
2022-06-14 20:36:50 -04:00
Stephen Celis f615959e71
Add `Binding.removeDuplicates()` (#11)
* Add `Binding.removeDuplicates()`

Because this library makes it easy to add logic around navigation, it's
probably also a good idea to ship with helpers that work around some
surprising bugs/behaviors that currently exist in SwiftUI. For example,
as noticed by #10, `NavigationLink` writes `nil` to its binding twice on
dismissal.

It's probably not appropriate for us to automatically filter duplicate
writes, but we can at least ship a `Binding.removeDuplicates()` that
makes it easy to achieve this behavior.

* wip
2022-01-27 11:25:57 -05:00
stephencelis 7a61fb4199 Run swift-format 2021-11-23 15:26:03 +00:00
Brandon Williams afa0ca9bac
Case study for list of navigation links. (#6)
* Case study for list of navigation links.

* renames

* wip

Co-authored-by: Stephen Celis <stephen@stephencelis.com>
2021-11-23 10:16:44 -05:00
Brandon Williams 7d396887e8
Use the alert(unwrapping:case:) API. (#5) 2021-11-23 09:21:09 -05:00