Skip to content
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

Fix dismissal in UIKit demos. #2986

Merged
merged 2 commits into from
Apr 14, 2024
Merged

Fix dismissal in UIKit demos. #2986

merged 2 commits into from
Apr 14, 2024

Conversation

mbrandonw
Copy link
Member

This was brought up by @acosmicflamingo in Slack. We should be checking that the state that drives navigation is nil/false before sending the .dismiss action so that we don't accidentally send it twice. This will cause a runtime warning if the child feature programmatically dismissed itself, causing the parent to then dismiss again.

Copy link
Contributor

@acosmicflamingo acosmicflamingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah I forgot about that! Lg2m 🥇

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small things.

@@ -57,6 +58,8 @@ public struct TwoFactor: Sendable {
return .none

case .view(.submitButtonTapped):
return .run { _ in await self.dismiss() }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops yes, just test code. reverted this and the stuff below.

@@ -63,7 +63,7 @@ public final class TwoFactorViewController: UIViewController {
guard let self else { return }
activityIndicator.isHidden = store.isActivityIndicatorHidden
codeTextField.text = store.code
loginButton.isEnabled = store.isLoginButtonEnabled
//loginButton.isEnabled = store.isLoginButtonEnabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment back in?

@mbrandonw mbrandonw merged commit 640a72e into main Apr 14, 2024
7 checks passed
@mbrandonw mbrandonw deleted the fix-uikit-nav branch April 14, 2024 19:55
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request Apr 22, 2024
…ure to from: "1.9.3" (#1020)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[pointfreeco/swift-composable-architecture](https://github.com/pointfreeco/swift-composable-architecture)
| patch | `from: "1.9.2"` -> `from: "1.9.3"` |

---

### Release Notes

<details>
<summary>pointfreeco/swift-composable-architecture
(pointfreeco/swift-composable-architecture)</summary>

###
[`v1.9.3`](https://github.com/pointfreeco/swift-composable-architecture/releases/tag/1.9.3)

[Compare
Source](https://github.com/pointfreeco/swift-composable-architecture/compare/1.9.2...1.9.3)

#### What's Changed

- Added: Added missing `StackActionOf<R>` type alias (thanks
[@&#8203;d-date](https://github.com/d-date),
[pointfreeco/swift-composable-architecture#2906).
- Fixed: Cache scoped presentation stores where possible (thanks
[@&#8203;lukeredpath](https://github.com/lukeredpath),
[pointfreeco/swift-composable-architecture#2908).
- Fixed: Allow "inert" enum state to be observed by having an
ever-changing ID
([pointfreeco/swift-composable-architecture#2910).
- Fixed: Silence SwiftSyntax 510 / Xcode 15.3 warnings
([pointfreeco/swift-composable-architecture#2909).
- Fixed: Restore `TestStore` autocompletion
([pointfreeco/swift-composable-architecture#2923).
- Fixed: It is now possible to scope bindings of enum stores to
non-reducer cases for sheets and other navigation
([pointfreeco/swift-composable-architecture#2943).
- Fixed: `package` access modifier support in enum `@Reducer` macro
(thanks [@&#8203;samrayner](https://github.com/samrayner),
[pointfreeco/swift-composable-architecture#2939).
- Fixed: `Effect.publisher` is no longer escaping
([pointfreeco/swift-composable-architecture#2968).
- Fixed: Add runtime warning diagnostic to catch nested calls to
`observe`
([pointfreeco/swift-composable-architecture#2996).
- Infrastructure: Fix documentation typos (thanks
[@&#8203;takehilo](https://github.com/takehilo),
[pointfreeco/swift-composable-architecture#2898;
[pointfreeco/swift-composable-architecture#2944);
tutorial fixes (thanks [@&#8203;LRSnowX](https://github.com/LRSnowX),
[pointfreeco/swift-composable-architecture#2808);
test store tutorial/documentation fixes
([pointfreeco/swift-composable-architecture#2912);
fix favorites case study mocks (thanks
[@&#8203;beribas](https://github.com/beribas),
[pointfreeco/swift-composable-architecture#2962);
improve docs for stack-based navigation
([pointfreeco/swift-composable-architecture#2967);
fix dismissal in UIKit demos
([pointfreeco/swift-composable-architecture#2986)
fix shared state case study (thanks
[@&#8203;eltociear](https://github.com/eltociear),
[pointfreeco/swift-composable-architecture#2994).

#### New Contributors

- [@&#8203;LRSnowX](https://github.com/LRSnowX) made their first
contribution in
[pointfreeco/swift-composable-architecture#2808
- [@&#8203;beribas](https://github.com/beribas) made their first
contribution in
[pointfreeco/swift-composable-architecture#2962
- [@&#8203;samrayner](https://github.com/samrayner) made their first
contribution in
[pointfreeco/swift-composable-architecture#2939
- [@&#8203;eltociear](https://github.com/eltociear) made their first
contribution in
[pointfreeco/swift-composable-architecture#2994

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.9.2...1.9.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants