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

hide navigation bar when web modals are displayed #23

Merged
merged 4 commits into from
Oct 27, 2023

Conversation

kiftio
Copy link
Contributor

@kiftio kiftio commented Oct 18, 2023

What are you trying to accomplish?

Listen to checkoutBlockingEvents sent from web, and blur the navigation bar, so that we can avoid double headers / close buttons.

I'm very open to better options for the blur effect

Video

updated.mp4

Example of Current Header

Screenshot 2023-10-18 at 15 20 01

Before you deploy

  • I have added tests to support my implementation
  • I have read and agree with the contributing documentation readme
  • I have read and agree with the code of conduct documentation readme
  • I have updated any documentation related to these changes.
  • I have updated the README (if applicable).

@kiftio kiftio marked this pull request as ready for review October 18, 2023 14:26
@kiftio kiftio changed the title listen for checkout blocking events [Exploratory] listen for checkout blocking events Oct 19, 2023
@kiftio kiftio changed the title [Exploratory] listen for checkout blocking events [Exploratory] blur menu actions when web modals are displayed Oct 19, 2023
@looouise
Copy link

For some reason I can't see the videos you posted 🙃 But I'd love to see what you were able to do and finesse it!

Comment on lines 155 to 156
func checkoutViewDidToggleModal() {
if blurVisualEffect.superview == nil {
let bounds = self.navigationController?.navigationBar.bounds
blurVisualEffect.frame = bounds ?? CGRect.zero
blurVisualEffect.autoresizingMask = [.flexibleWidth, .flexibleHeight]
self.navigationController?.navigationBar.addSubview(blurVisualEffect)
} else {
blurVisualEffect.removeFromSuperview()
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll have to account for the transition time here

@kiftio kiftio requested a review from a team as a code owner October 20, 2023 09:42
@kiftio
Copy link
Contributor Author

kiftio commented Oct 20, 2023

For some reason I can't see the videos you posted 🙃 But I'd love to see what you were able to do and finesse it!

It seems like we lost access to the assets we'd uploaded to GitHub when we made the repo public. I've re-uploaded, and also changed the approach a bit to hide the header instead of blurring it.

@kiftio kiftio changed the title [Exploratory] blur menu actions when web modals are displayed [Exploratory] hide navigation bar when web modals are displayed Oct 20, 2023
@kiftio kiftio force-pushed the dk/listen-for-checkout-blocking-event branch from 261a85e to faeda12 Compare October 20, 2023 11:02
@kiftio kiftio changed the title [Exploratory] hide navigation bar when web modals are displayed hide navigation bar when web modals are displayed Oct 27, 2023
@kiftio kiftio merged commit 953efd4 into main Oct 27, 2023
4 checks passed
@kiftio kiftio deleted the dk/listen-for-checkout-blocking-event branch October 27, 2023 13:46
markmur pushed a commit that referenced this pull request Nov 7, 2023
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.

3 participants