Skip to content

Conversation

@fernandacerezog
Copy link
Contributor

@fernandacerezog fernandacerezog commented Dec 23, 2025

📲 What

We are updating the close button in the navigation to standardize the visual experience and ensure that the application has a polished look.

🤔 Why

The styles of the navigation buttons have been adjusted to ensure visual consistency. The appearance has been updated to make the component look integrated.

🛠 How

  1. SwiftUI view: CloseButtonView (SwiftUI) was created, which applies .glassedEffect(in: Circle(), interactive: true) to the close button.
  2. Host controller: The SwiftUI view was integrated using UIHostingController, and navigationCloseButton returns the host controller view using guard let instead of force unwrap.
  3. Extensions for Liquid Glass: Backward-compatible extensions were added:
  • iOS 26+ Native API: The glassEffect() modifier (iOS 26+) is SwiftUI-exclusive with no UIKit equivalent. Migrating to UIKit would force us to use a fallback for all versions, losing the native iOS 26+ liquid glass effect.
  • Code Organization: We've addressed organization concerns by extracting this component and the glassedEffect helper into separate files (SwiftUIHelpers/), keeping UIKit files clean.
  • Future-Ready: Keeping this in SwiftUI allows us to leverage iOS-exclusive SwiftUI features while maintaining backward compatibility through our fallback implementation.

👀 See

| Before 🐛 | After 🦋 |
| simulator_screenshot_B990FD8A-27C6-4E25-A2F0-1ECF717A628D | simulator_screenshot_CC301DC4-0FC9-4EDA-A273-94776E3187AB |

✅ Acceptance criteria

  • All navigation buttons match the design standard.
  • No visual regressions in navigation bars.

Copy link
Contributor

@amy-at-kickstarter amy-at-kickstarter left a comment

Choose a reason for hiding this comment

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

While we do write new code in SwiftUI, our team standards are to move views over at the level of an entire feature or entire screen. Because this is a single button in an existing UIKit view, it should be written in UIKit.

I would also recommend moving the glassedEffect into its own helper file, since it looks like you'll be using it in more than one place.

@@ -1,8 +1,10 @@
import Combine
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see Combine being used, this import should be deleted.

|> UIButton.lens.accessibilityHint %~ { _ in Strings.Closes_project() }

return buttonView
private lazy var closeButtonHostingController: UIHostingController<CloseButtonView> = {
Copy link
Contributor

Choose a reason for hiding this comment

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

This view is very small. Because it is a small component of a UIKit view, it should be written in UIKit.

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