-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alert with binding #145
Alert with binding #145
Conversation
- Deprecated the `alert(title:unwrapping:...)` and `confirmationDialog(title:unwrapping:...)` functions in `SwiftUINavigation` - Deprecated the read-only `Bindable.isPresent()` in `SwiftUINavigation. - Added `alert(_:title:actions:message)` functions to `SwiftUINavigationCore` to expose them to TCA. - Added `confirmationDialog(_:title:titleVisibility:actions:message)` functions to `SwiftUINavigationCore` to expose them to TCA. - Added read/write `Bindable.isPresent()` in `SwiftUINavigationCore`. - Added/updated documentation
- Reordered parameters to more closely match the built-in ones. - Added overloads without `message` closures. - Updated documentation
Feedback wanted, particularly on: Parameter OrderShould
This applies across the isPresent()Currently, I've deprecated the old read-only Not sure if this is the right approach, of if we should just have a new, differently-named (maybe private?) func/var for use by Thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @randomeizer! Thanks for taking this on! A few comments below that should be easy to tackle, and then I think it'll be good to merge!
Sources/SwiftUINavigationCore/Documentation.docc/Articles/Dialogs.md
Outdated
Show resolved
Hide resolved
@stephencelis I believe I've addressed your comments. Maybe double-check the Binding migration - I wasn't 100% certain that I extracted all the relevant elements of |
@@ -1,12 +0,0 @@ | |||
# ``SwiftUINavigationCore`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this file got deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I assumed that I had added all the documentation, my bad.
Created
alert(item:...)
method overloads forView
. These allow providing an optionalBindable<Item?>
value to thealert(item: ...)
parameter, then providing other closures for the title, actions, and message, each passed an honest item, if it's notnil
.For example, a model:
...and a View: