[DO NOT MERGE] Remove PresentableComponent from action presentation#2594
Conversation
|
ℹ️ No baseline data found for 'feature/remove_presentable_component_from_actions'.
|
There was a problem hiding this comment.
Code Review
This pull request refactors the PresentationDelegate protocol to accept a UIViewController directly instead of a PresentableComponent, simplifying the presentation flow across various payment and action components. It also removes custom navigation bar types and renames PresentableComponentWrapper to ActionViewWrapper. The review feedback highlights that this refactoring broke the presentation behavior in IssuerListComponentAdvancedFlowExample and IssuerListComponentExample by leaving viewController(for:) as dead code and failing to wrap the presented view controller in a UINavigationController. Additionally, the reviewer suggests adding a check in ActionPresentationHelper to prevent nested navigation controllers when the view controller is already a UINavigationController.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
… chore/remove_presentable_component_from_actions_core_logic
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
… chore/remove_presentable_component_from_actions_core_logic
|
| 🔀 | 1 Modification |
Adyen
PresentationDelegate
🔀 Modified
// From
@_Concurrency.MainActor
func present(component: any Adyen.PresentableComponent) -> Swift.Void
// To
@_Concurrency.MainActor
func present(viewController: UIKit.UIViewController) -> Swift.Void
/**
Changes:
- Added parameter `viewController: UIKit.UIViewController`
- Removed parameter `component: any Adyen.PresentableComponent`
*/Analyzed targets: Adyen, AdyenActions, AdyenCard, AdyenCardScanner, AdyenCashAppPay, AdyenCheckout, AdyenComponents, AdyenDelegatedAuthentication, AdyenDropIn, AdyenEncryption, AdyenSession, AdyenSwiftUI, AdyenTwint, AdyenUI, AdyenWeChatPay
Summary
This PR removes the usage of
PresentableComponentfrom action presentation by simplifying thePresentationDelegateprotocol to acceptUIViewControllerdirectly instead ofPresentableComponent.Changes
Protocol Changes
PresentationDelegate: Changedpresent(component: PresentableComponent)topresent(viewController: UIViewController)PresentableComponent: RemovednavBarTypeproperty,NavigationBarTypeenum, andAnyNavigationBarprotocol (dead code - never consumed)Action Components Updated
VoucherComponent- Removed customnavBarType()method andPresentableComponentWrapperusageDocumentComponent- RemovednavBarType()methodQRCodeActionComponent- Simplified presentationAwaitComponent- Simplified presentationRedirectComponent/BrowserComponent- Simplified presentationTwintSDKActionComponent- Simplified presentationThreeDS2PlusDAScreenPresenter- RemovedEmptyNavigationBarclass and simplified all 5 presentation methodsDropIn Updates
DropInComponentExtensions- UpdatedPresentationDelegateconformanceActionPresentationHelper- Updated to work withUIViewControllerActionWrapperViewController- Updated initializerDemo App Updates
PresentationDelegateimplementations updated to new signatureBreaking Change
Public API change:
PresentationDelegate.present(component:)→present(viewController:)Merchants implementing
PresentationDelegatewill need to update their implementation:Checklist