Skip to content

feat: migrate Accordion to Blend Design System#4405

Open
kanikabansal08 wants to merge 9 commits intoblend-phase2-rangesliderfrom
blend-phase2-accordion
Open

feat: migrate Accordion to Blend Design System#4405
kanikabansal08 wants to merge 9 commits intoblend-phase2-rangesliderfrom
blend-phase2-accordion

Conversation

@kanikabansal08
Copy link
Collaborator

@kanikabansal08 kanikabansal08 commented Mar 18, 2026

Type of Change

  • New feature
  • Enhancement

Description

Migrates the Accordion component to the Blend Design System as part of Phase 2 of the Blend migration. This PR introduces two new files and updates 15 call-site files:

New files:

  • src/blend/bindings/AccordionBinding.res — Raw external binding for Accordion and AccordionItem from @juspay/blend-design-system. Includes Value module with fromString/fromArray/toArray helpers to handle Blend's union type (string for single mode, array<string> for multi mode), accordionType (Border/NoBorder), and accordionChevronPosition (Left/Right).
  • src/blend/adapters/AccordionAdapter.res — Feature-flagged adapter that reads BlendContext.blendEnabledContext. When blend is enabled, renders the Blend accordion in controlled mode (using value + onValueChange). When disabled, passes all props through to the legacy Accordion unchanged.

Updated call sites (13 usages across 12 files):

  • ConnectorAuthKeysHelper.res — CashToCode country select accordion
  • OtherPaymentMethod.res — Payment method additional details accordion
  • WorkflowSideDrawer.res — Workflow steps side drawer
  • EditCheckoutDetails.res — Authorization & Capture Settings accordion
  • OrderUIUtils.res — Order details accordion
  • ReconEngineDataOverview.res / ReconEngineDataOverviewHelper.res — Recon data overview
  • ReconEngineDataSources.res — Recon data sources list
  • ReconEngineDataTransformation.res — Recon data transformation list
  • AcquirerConfigSettings.res / AcquirerConfigSettingsRevamp.res — Developer → Acquirer Config
  • ConnectorAccountDetailsHelper.res (2 usages) — Connector credentials accordion
  • PaymentMethod.res — Bank debit / wallet payment method accordion
  • SbxOnboardingSurvey.res — Sandbox onboarding business details

Example:
Before:
Screenshot 2026-03-18 at 1 44 09 PM

After:

Screenshot 2026-03-18 at 1 44 20 PM

Motivation and Context

Part of the Blend Design System Phase 2 migration. The adapter pattern keeps the legacy component untouched — toggling dev_blend_enabled=false in config instantly reverts to the legacy accordion with no code changes.

Accordion is classified as a complex component because several call sites use:

  • renderContentOnTop — custom JSX rendered in the accordion header
  • onItemExpandClick / onItemCollapseClick — per-item side-effect callbacks
  • closeAccordionFn — programmatic close from inside the content
  • singleOpen — only one item open at a time

All of the above are fully preserved in the Blend branch. The adapter uses controlled mode (value + onValueChange) so it can track open state, fire callbacks on diff, and pass a real closeAccordionFn that removes the item from state.

Props dropped in Blend branch (Blend handles styling internally): accordianTopContainerCss, accordianBottomContainerCss, contentExpandCss, titleStyle, accordionHeaderTextClass, expandedTitleStyle, arrowFillColor (already dead in legacy — accepted but never rendered).

How did you test it?

Tested manually by toggling dev_blend_enabled=true in config/config.toml:

Flow File What to verify
Connector setup → Credentials tab ConnectorAuthKeysHelper Country accordion renders, expands/collapses
Connector setup → Payment Methods tab PaymentMethod Single-open mode, expand/collapse callbacks fire
Connector setup → Auth Keys ConnectorAccountDetailsHelper Two separate accordions both work
Order details page OrderUIUtils Accordion with initialExpandedArray opens correctly
Developer → Acquirer Config Settings AcquirerConfigSettings Plain title accordion, no renderContentOnTop
Developer → Acquirer Config (Revamp) AcquirerConfigSettingsRevamp Same as above
SDK Checkout settings EditCheckoutDetails Authorization & Capture accordion pre-expanded
Workflow side drawer WorkflowSideDrawer First step pre-expanded
Recon → Data Sources ReconEngineDataSources renderContentOnTop custom header renders
Recon → Data Transformation ReconEngineDataTransformation Same as above
Sandbox onboarding survey SbxOnboardingSurvey Business details accordion pre-expanded

Also verified legacy branch is untouched by disabling the flag on each flow above.

Where to test it?

  • INTEG
  • SANDBOX
  • PROD

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

prajwalnl and others added 5 commits March 17, 2026 14:50
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Add AccordionBinding.res with Blend Accordion + AccordionItem bindings
- Add AccordionAdapter.res with feature flag (devBlendEnabled) support
- Preserve renderContentOnTop, onItemExpandClick, onItemCollapseClick,
  currentAccordianState, closeAccordionFn and initialOpenIndex in Blend branch
- Update all 13 call sites to use AccordionAdapter
- Update Accordion.accordion type annotations to AccordionAdapter.accordion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kanikabansal08 kanikabansal08 requested review from a team as code owners March 18, 2026 08:08
@semanticdiff-com
Copy link

semanticdiff-com bot commented Mar 18, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  .github/workflows/cypress-test.yml  34% smaller
  .github/workflows/ci-ai-generated-tests.yml  0% smaller
  .gitignore Unsupported file format
  .opencode/skills/cypress-test-gen/SKILL.md Unsupported file format
  .typos.toml Unsupported file format
  CHANGELOG.md Unsupported file format
  Dockerfile Unsupported file format
  cypress/e2e/4-connectors/connector.cy.js  0% smaller
  cypress/e2e/4-connectors/payinConnector.cy.js  0% smaller
  cypress/e2e/4-connectors/payoutConnector.cy.js  0% smaller
  cypress/fixtures/payinConnectorConfig.js  0% smaller
  cypress/fixtures/payoutConnectorConfig.js  0% smaller
  cypress/support/commands.js  0% smaller
  cypress/support/pages/connector/PaymentConnector.js  0% smaller
  cypress/support/pages/connector/PayoutConnector.js  0% smaller
  src/IntelligentRouting/IntelligentRoutingScreens/IntelligentRoutingAnalytics.res Unsupported file format
  src/Interface/ConnectorInterface/ConnectorInterfaceTableEntity.res Unsupported file format
  src/OrchestrationV2/OrchestrationV2Screens/Connectors/PaymentConnectorOnboarding.res Unsupported file format
  src/OrchestrationV2/OrchestrationV2Screens/Connectors/PaymentConnectors.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ReconExceptionsList.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ReconReports.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ReconReportsHelper.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ReconReportsList.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ReportsExceptionTableEntity.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ReportsTableEntity.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ShowAllReports.res Unsupported file format
  src/Recon/ReconScreens/ReconReports/ShowReconExceptionReport.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataOverview/ReconEngineDataOverview.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataOverview/ReconEngineDataOverviewComponents/ReconEngineDataOverviewTransformedEntries.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataOverview/ReconEngineDataOverviewHelper.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataSources/ReconEngineDataSources.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataSources/ReconEngineDataSourcesDetails/ReconEngineDataSourceDetailsHistory.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataSources/ReconEngineDataSourcesDetails/ReconEngineDataSourcesHistoryTableEntity.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataSources/ReconEngineDataSourcesEntity.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataTransformation/ReconEngineDataTransformation.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataTransformation/ReconEngineDataTransformationDetails/ReconEngineDataTransformationDetailsHistory.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataTransformation/ReconEngineDataTransformationDetails/ReconEngineDataTransformationHistoryTableEntity.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineData/ReconEngineDataTransformedEntries/ReconEngineDataTransformedEntries.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineExceptions/ReconEngineExceptionEntity.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineExceptions/ReconEngineExceptionTransaction/ReconEngineExceptionTransaction.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineExceptions/ReconEngineTransformedEntryExceptions/ReconEngineTransformedEntryExceptions.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineOverview/ReconEngineOverviewDetails/ReconEngineOverviewDetailsComponents/ReconEngineOverviewTransactions.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineRules/ReconEngineRule.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineTransactions/EntriesTableEntity.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineTransactions/HierarchicalTransactionsTableEntity.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineTransactions/ReconEngineTransactionsContent.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineTransactions/ReconEngineTransactionsHelper.res Unsupported file format
  src/ReconEngine/ReconEngineScreens/ReconEngineTransactions/TransactionsTableEntity.res Unsupported file format
  src/RevenueRecovery/RevenueRecoveryScreens/RecoveryProcessors/RecoveryProcessorsPaymentProcessors/RecoveryConnectorEntity.res Unsupported file format
  src/RevenueRecovery/RevenueRecoveryScreens/RecoveryProcessors/RecoveryProcessorsPaymentProcessors/RecoveryConnectorList.res Unsupported file format
  src/RevenueRecovery/RevenueRecoveryScreens/RecoveryProcessors/RecoveryProcessorsPaymentProcessors/RecoveryOnboardingPayments.res Unsupported file format
  src/RevenueRecovery/RevenueRecoveryScreens/RevenueRecoveryInvoices/InvoiceListPage/RevenueRecoveryInvoices.res Unsupported file format
  src/Themes/ThemeScreens/ThemeList/ThemeList.res Unsupported file format
  src/Vault/VaultScreens/VaultConnectors/VaultConfiguration.res Unsupported file format
  src/Vault/VaultScreens/VaultConnectors/VaultConnectorEntity.res Unsupported file format
  src/Vault/VaultScreens/VaultConnectors/VaultProcessorList.res Unsupported file format
  src/Vault/VaultScreens/VaultCustomersAndTokens/VaultCustomerSummary.res Unsupported file format
  src/Vault/VaultScreens/VaultCustomersAndTokens/VaultCustomersAndTokens.res Unsupported file format
  src/Vault/VaultScreens/VaultCustomersAndTokens/VaultPaymentMethodDetailsSidebar.res Unsupported file format
  src/Vault/VaultScreens/VaultOnboarding.res Unsupported file format
  src/blend/adapters/AccordionAdapter.res Unsupported file format
  src/blend/bindings/AccordionBinding.res Unsupported file format
  src/components/Accordion.res Unsupported file format
  src/components/CustomCharts/HighchartTimeSeriesChart.res Unsupported file format
  src/components/CustomCharts/LineChartUtils.res Unsupported file format
  src/components/CustomizeTableColumns.res Unsupported file format
  src/components/DateRangeCompareFields.res Unsupported file format
  src/components/DateRangeField.res Unsupported file format
  src/components/DateRangeHelper.res Unsupported file format
  src/components/DateRangePicker.res Unsupported file format
  src/components/DynamicChart.res Unsupported file format
  src/components/DynamicFilter.res Unsupported file format
  src/components/DynamicTable.res Unsupported file format
  src/components/DynamicTableUtils.res Unsupported file format
  src/components/DynamicTabs.res Unsupported file format
  src/components/Filter.res Unsupported file format
  src/components/FilterSelectBox.res Unsupported file format
  src/components/HSwitchSingleStatTableWidget.res Unsupported file format
  src/components/LoadedTable.res Unsupported file format
  src/components/LoadedTable.resi Unsupported file format
  src/components/LoadedTableWithCustomColumns/LoadedTableWithCustomColumns.res Unsupported file format
  src/components/MultipleFileUpload.res Unsupported file format
  src/components/OrderUtils.res Unsupported file format
  src/components/Paginator.res Unsupported file format
  src/components/ReactWindowTable.res Unsupported file format
  src/components/RemoteFiltersUtils.res Unsupported file format
  src/components/SelectBox.res Unsupported file format
  src/components/Table.res Unsupported file format
  src/components/Table.resi Unsupported file format
  src/components/form/PasswordStrengthInputAsChips.res Unsupported file format
  src/context/ChartContext.res Unsupported file format
  src/context/ThemeProvider.res Unsupported file format
  src/entryPoints/AuthModule/TwoFaAuth/TwoFaAuth.res Unsupported file format
  src/fragments/ConnectorFragments/ConnectorAuthKeys/ConnectorAuthKeysHelper.res Unsupported file format
  src/fragments/ConnectorFragments/ConnectorPaymentMethodv2/ConnectorPaymentMethodV2.res Unsupported file format
  src/fragments/ConnectorFragments/ConnectorPaymentMethodv2/Sections/OtherPaymentMethod.res Unsupported file format
  src/hooks/MixpanelHook.res Unsupported file format
  src/libraries/MixPanel.res Unsupported file format
  src/screens/Analytics/Analytics.res Unsupported file format
  src/screens/Analytics/AnalyticsNew.res Unsupported file format
  src/screens/Analytics/AnalyticsTypes.res Unsupported file format
  src/screens/Analytics/AnalyticsUtils.res Unsupported file format
  src/screens/Analytics/ErrorReasons.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/GlobalSearchTables/Disputes/DisputeTable.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/GlobalSearchTables/PaymentAttempt/PaymentAttemptTable.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/GlobalSearchTables/PaymentIntent/PaymentIntentTable.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/GlobalSearchTables/PayoutAttempts/PayoutAttemptTable.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/GlobalSearchTables/Payouts/PayoutTable.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/GlobalSearchTables/Refunds/RefundsTable.res Unsupported file format
  src/screens/Analytics/GlobalSearchResults/SearchResultsPage.res Unsupported file format
  src/screens/Analytics/HSAnalyticsUtils.res Unsupported file format
  src/screens/Analytics/Logs/LogUtils/AuditLogUI.res Unsupported file format
  src/screens/Analytics/PerformanceMonitor/TablePerformance/TablePerformance.res Unsupported file format
  src/screens/ConfigurePMTs/paymentMethodList.res Unsupported file format
  src/screens/Connectors/BillingProcessor/BillingProcessorList.res Unsupported file format
  src/screens/Connectors/BillingProcessor/BillingProcesssorEntity.res Unsupported file format
  src/screens/Connectors/FraudAndRisk/FRMSelect.res Unsupported file format
  src/screens/Connectors/FraudAndRisk/FRMTableUtils.res Unsupported file format
  src/screens/Connectors/PMAuthenticationProcessor/PMAuthenticationConnectorList.res Unsupported file format
  src/screens/Connectors/PMAuthenticationProcessor/PMAuthenticationTableEntity.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorAccountDetailsHelper.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorList.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorMetaData/ApplePay/ApplePayManualFlow.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorMetaData/ApplePay/ApplePaySimplifiedFlow.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorMetaData/ApplePay/ApplePayZen.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorTableUtils.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorUIUtils/PaymentMethod.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorWalletDetails/Paze/PazeIntegration.res Unsupported file format
  src/screens/Connectors/PaymentProcessor/ConnectorWalletDetails/SamsungPay/SamsungPayIntegration.res Unsupported file format
  src/screens/Connectors/PayoutProcessor/PayoutProcessorList.res Unsupported file format
  src/screens/Connectors/PayoutProcessor/PayoutProcessorTableEntity.res Unsupported file format
  src/screens/Connectors/TaxProcessor/TaxProcessorList.res Unsupported file format
  src/screens/Connectors/TaxProcessor/TaxProcessorTableEntity.res Unsupported file format
  src/screens/Connectors/ThreeDsProcessors/ThreeDsConnectorList.res Unsupported file format
  src/screens/Connectors/ThreeDsProcessors/ThreeDsTableEntity.res Unsupported file format
  src/screens/Connectors/VaultProcessors/VaultProcessorsEntity.res Unsupported file format
  src/screens/Connectors/VaultProcessors/VaultProcessorsList.res Unsupported file format
  src/screens/Customers/CustomerV2.res Unsupported file format
  src/screens/Customers/Customers.res Unsupported file format
  src/screens/Customers/ShowCustomers.res Unsupported file format
  src/screens/Developer/APIKeys/KeyManagementHelper.res Unsupported file format
  src/screens/Developer/PaymentSettings/AcquirerConfigSettings/AcquirerConfigSettings.res Unsupported file format
  src/screens/Developer/PaymentSettingsRevamped/AcquirerConfigSettingsRevamp/AcquirerConfigSettingsRevamp.res Unsupported file format
  src/screens/Developer/Webhooks/Webhooks.res Unsupported file format
  src/screens/Developer/Webhooks/WebhooksDetails.res Unsupported file format
  src/screens/ExploreWorkflows/WorkflowSideDrawer.res Unsupported file format
  src/screens/HSwitchUtils.res Unsupported file format
  src/screens/NewAnalytics/Insights/InsightsRefundsAnalytics/FailedRefundsDistribution/FailedRefundsDistribution.res Unsupported file format
  src/screens/NewAnalytics/Insights/InsightsRefundsAnalytics/FailureReasonsRefunds/FailureReasonsRefunds.res Unsupported file format
  src/screens/NewAnalytics/Insights/InsightsRefundsAnalytics/RefundsProcessed/RefundsProcessed.res Unsupported file format
  src/screens/NewAnalytics/Insights/InsightsRefundsAnalytics/RefundsReasons/RefundsReasons.res Unsupported file format
  src/screens/NewAnalytics/Insights/InsightsRefundsAnalytics/SuccessfulRefundsDistribution/SuccessfulRefundsDistribution.res Unsupported file format
  src/screens/NewAnalytics/Insights/NewAuthenticationAnalytics/AuthenticationSummary/AuthenticationSummary.res Unsupported file format
  src/screens/NewAnalytics/Insights/PaymentAnalytics/FailedPaymentsDistribution/FailedPaymentsDistribution.res Unsupported file format
  src/screens/NewAnalytics/Insights/PaymentAnalytics/FailureReasonsPayments/FailureReasonsPayments.res Unsupported file format
  src/screens/NewAnalytics/Insights/PaymentAnalytics/PaymentsProcessed/PaymentsProcessed.res Unsupported file format
  src/screens/NewAnalytics/Insights/PaymentAnalytics/SuccessfulPaymentsDistribution/SuccessfulPaymentsDistribution.res Unsupported file format
  src/screens/NewAnalytics/Insights/SmartRetryAnalytics/FailureSmartRetryDistribution/FailureSmartRetryDistribution.res Unsupported file format
  src/screens/NewAnalytics/Insights/SmartRetryAnalytics/SmartRetryPaymentsProcessed/SmartRetryPaymentsProcessed.res Unsupported file format
  src/screens/NewAnalytics/Insights/SmartRetryAnalytics/SuccessfulSmartRetryDistribution/SuccessfulSmartRetryDistribution.res Unsupported file format
  src/screens/NewAnalytics/RoutingAnalytics/LeastCostRoutingAnalytics/LeastCostRoutingSummary/LeastCostRoutingAnalyticsSummaryTable.res Unsupported file format
  src/screens/NewAnalytics/RoutingAnalytics/OverallRoutingAnalytics/RoutingAnalyticsSummary/RoutingAnalyticsSummary.res Unsupported file format
  src/screens/PayoutRouting/PayoutHistoryTable.res Unsupported file format
  src/screens/PayoutRouting/PayoutRoutingStack.res Unsupported file format
  src/screens/Payouts/PayoutsList.res Unsupported file format
  src/screens/Payouts/ShowPayout.res Unsupported file format
  src/screens/Routing/History.res Unsupported file format
  src/screens/Routing/RoutingStack.res Unsupported file format
  src/screens/SDKPayment/FormSection/EditCheckoutDetails.res Unsupported file format
  src/screens/SDKPayment/SDKUtils/SDKPaymentUtils.res Unsupported file format
  src/screens/SbxOnboardingSurvey/SbxOnboardingSurvey.res Unsupported file format
  src/screens/Transaction/Disputes/Disputes.res Unsupported file format
  src/screens/Transaction/Disputes/ShowDisputes.res Unsupported file format
  src/screens/Transaction/Order/OrderUIUtils.res Unsupported file format
  src/screens/Transaction/Order/Orders.res Unsupported file format
  src/screens/Transaction/Order/ShowOrder.res Unsupported file format
  src/screens/Transaction/Refunds/Refund.res Unsupported file format
  src/screens/Transaction/Refunds/ShowRefund.res Unsupported file format
  src/screens/UserManagement/UserRevamp/CreateCustomRole.res Unsupported file format
  src/screens/UserManagement/UserRevamp/CreateCustomRoleUtils.res Unsupported file format
  src/screens/UserManagement/UserRevamp/CreateCustomRoleV2.res Unsupported file format
  src/screens/UserManagement/UserRevamp/ListRoles.res Unsupported file format
  src/screens/UserManagement/UserRevamp/ListUsers.res Unsupported file format
  src/utils/CountryUtils.res Unsupported file format
  src/utils/LogicUtils.res Unsupported file format

@kanikabansal08 kanikabansal08 self-assigned this Mar 18, 2026
@kanikabansal08 kanikabansal08 added C-feature Category: Feature request or enhancement blend-design-system labels Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blend-design-system C-feature Category: Feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants