pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
11.91k stars 1.37k forks source link

Add ConfirmationDialogState support to UIBindable via UIAlertController(store:) initializer #3190

Closed acosmicflamingo closed 2 days ago

acosmicflamingo commented 3 weeks ago

RIP Point-Free repo subscriber inboxes

acosmicflamingo commented 3 weeks ago

Converted to draft since I'm debugging an issue where state.destination seems to be nil-ed out earlier than expected, resulting in a purple runtime warning.

stephencelis commented 1 week ago

@acosmicflamingo Just curious if you have any update here? Still troubleshooting anything or is this ready for review?

acosmicflamingo commented 1 week ago

@stephencelis uh oh, looks like we both thought the other was working on fixing this LOL in Slack, I had said "So, if the logic here is going to handle presenting and dismissing modal view controllers, then AlertState and ConfirmationDialogState no longer have to conform to _EphemeralState , which explains the purple runtime warnings I was seeing in this reproducer", and then you said "We still need those conformances for SwiftUI, but we should avoid emitting those warnings on UIKit bindings. Thanks for the repro". I haven't touched it since then.

acosmicflamingo commented 1 week ago

So in other words, I stopped because this seems like the kind of thing that requires refactoring how some models will conform to _EphemeralState, and thought it'd be best to leave it to you to handle the refactor while using my provided reproducer to validate your solution.