Refactor Thanks page to use a standard navigation bar#2854
Merged
Conversation
| import Library | ||
| import UIKit | ||
|
|
||
| /// A UIKit close button with liquid glass effect using iOS 26+ native APIs. |
Contributor
Author
There was a problem hiding this comment.
This class existed to add Liquid Glass styling to our custom close button. But with no custom close button, we get liquid glass styling for free 😎
|
|
||
| if let navigationController = self.navigationController { | ||
| _ = navigationController | ||
| |> UINavigationController.lens.isNavigationBarHidden .~ true |
Contributor
Author
There was a problem hiding this comment.
Instead of hiding the navigation bar, I just make it an opaque white so it blends in. This makes it look essentially the same as it was before (including while scrolling).
86152d1 to
3ae45ea
Compare
aa6ace2 to
de0ed51
Compare
| </constraints> | ||
| </view> | ||
| </tableView> | ||
| <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I5Z-r3-uNR" userLabel="Close button container"> |
Contributor
Author
There was a problem hiding this comment.
This was the close button view we don't need any more.
| <constraints> | ||
| <constraint firstItem="WMM-y8-QSH" firstAttribute="bottom" secondItem="K36-s7-mGm" secondAttribute="bottom" constant="12" id="0N8-cc-Ig3"/> | ||
| <constraint firstItem="K36-s7-mGm" firstAttribute="top" secondItem="I5Z-r3-uNR" secondAttribute="bottom" constant="8" id="T7f-bX-4fo"/> | ||
| <constraint firstItem="K36-s7-mGm" firstAttribute="top" secondItem="WMM-y8-QSH" secondAttribute="top" constant="8" id="T7f-bX-4fo"/> |
Contributor
Author
There was a problem hiding this comment.
Hard to read, but this is the constraint that used to pin the table view to the bottom of the close button. Now it's pinned to the safe area insets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📲 What
Refactor the Thanks page so that it uses the standard navigation bar, instead of hiding the bar and using custom code that looks like a navigation bar.
CloseButtonViewon Thanks page with a standardUIBarButtonItem🤔 Why
I'm adding an experiment that changes how we present pages in the Checkout flow. Instead of presenting the checkout flow modally, it will be pushed into the navigation stack with the Project page.
Originally, the Thanks page hides the navigation bar to show its own custom close button on the top left. However, in the new flow, we'll need to pop you back to the Project page - and we'll need the navigation bar back.
I could add more code to hide/show the navigation bar to deal with this case... but it made more sense to me to clean up this custom implementation instead. I refactored the Thanks page to remove the nav bar hiding/showing, and to just use a standard UIBarButtonItem and navigation bar appearance configuration.
Conveniently, this also let me delete a file we no longer need.
👀 Screenshots
iOS 18 iPhone
iOS 26 iPhone
iPad (iOS 18)
iPad (iOS 26)