Skip to content

[DO NOT MERGE] Remove PresentableComponent from action presentation#2594

Draft
nauaros wants to merge 6 commits into
feature/remove_presentable_component_from_actionsfrom
chore/remove_presentable_component_from_actions_core_logic
Draft

[DO NOT MERGE] Remove PresentableComponent from action presentation#2594
nauaros wants to merge 6 commits into
feature/remove_presentable_component_from_actionsfrom
chore/remove_presentable_component_from_actions_core_logic

Conversation

@nauaros

@nauaros nauaros commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR removes the usage of PresentableComponent from action presentation by simplifying the PresentationDelegate protocol to accept UIViewController directly instead of PresentableComponent.

Changes

Protocol Changes

  • PresentationDelegate: Changed present(component: PresentableComponent) to present(viewController: UIViewController)
  • PresentableComponent: Removed navBarType property, NavigationBarType enum, and AnyNavigationBar protocol (dead code - never consumed)

Action Components Updated

  • VoucherComponent - Removed custom navBarType() method and PresentableComponentWrapper usage
  • DocumentComponent - Removed navBarType() method
  • QRCodeActionComponent - Simplified presentation
  • AwaitComponent - Simplified presentation
  • RedirectComponent / BrowserComponent - Simplified presentation
  • TwintSDKActionComponent - Simplified presentation
  • ThreeDS2PlusDAScreenPresenter - Removed EmptyNavigationBar class and simplified all 5 presentation methods

DropIn Updates

  • DropInComponentExtensions - Updated PresentationDelegate conformance
  • ActionPresentationHelper - Updated to work with UIViewController
  • ActionWrapperViewController - Updated initializer
  • All routers and view models updated to use new API

Demo App Updates

  • All PresentationDelegate implementations updated to new signature

Breaking Change

Public API change: PresentationDelegate.present(component:)present(viewController:)

Merchants implementing PresentationDelegate will need to update their implementation:

// Before
func present(component: PresentableComponent) {
    presenter.present(component.viewController, animated: true)
}

// After
func present(viewController: UIViewController) {
    presenter.present(viewController, animated: true)
}

Checklist

  • Tested changes locally
  • Added/updated unit tests (Follow up PR)
  • Verified against acceptance criteria

@nauaros nauaros self-assigned this Jun 12, 2026
@nauaros nauaros added the chore a pull request that has chore changes that shouldn't be in the release notes label Jun 12, 2026
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

ℹ️ No baseline data found for 'feature/remove_presentable_component_from_actions'.

Framework Size
AdyenComponents.framework 2506 KB
AdyenActions.framework 2330 KB
AdyenDropIn.framework 1390 KB
AdyenDelegatedAuthentication.framework 158 KB
AdyenAuthentication.framework 347 KB
AdyenWeChatPay.framework 274 KB
AdyenUI.framework 3271 KB
AdyenCardScanner.framework 689 KB
AdyenEncryption.framework 506 KB
AdyenSession.framework 674 KB
AdyenTwint.framework 263 KB
AdyenWeChatPayInternal.framework 4135 KB
AdyenCheckout.framework 2393 KB
AdyenCashAppPay.framework 1764 KB
AdyenCard.framework 1685 KB
TwintSDK.framework 97 KB
Adyen3DS2.framework 919 KB
Adyen.framework 5158 KB
total 28559 KB

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread AdyenDropIn/Modules/Common/Utilities/ActionPresentationHelper.swift
@nauaros nauaros requested a review from erenbesel June 15, 2026 10:48
nauaros and others added 3 commits June 16, 2026 12:19
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
… chore/remove_presentable_component_from_actions_core_logic
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ 1 public change detected ⚠️

Comparing chore/remove_presentable_component_from_actions_core_logic to feature/remove_presentable_component_from_actions
Platform: iOS

🔀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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore a pull request that has chore changes that shouldn't be in the release notes size:medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant