Skip to content

Refactor collapsing list view to be reusable. #5048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nschris-stripe
Copy link
Contributor

Summary

This change refactors the collapsing list functionality to be reusable. This is in preparation to display shipping addresses in the native link view.

Demo

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-06-25.at.15.35.26.mp4

@nschris-stripe nschris-stripe requested review from a team as code owners June 25, 2025 19:36
Copy link

github-actions bot commented Jun 25, 2025

🚨 New dead code detected in this PR:

LinkCollapsingListView.swift:98 warning: Parameter 'sender' is unused
LinkPaymentMethodListView-Cell.swift:252 warning: Parameter 'sender' is unused
LinkPaymentMethodListView.swift:132 warning: Parameter 'animated' is unused
PayWithLinkViewController-WalletViewModel.swift:25 warning: Property 'shippingAddresses' is assigned, but never used

Please remove the dead code before merging.

If this is intentional, you can bypass this check by adding the label skip dead code check to this PR.

ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with master.

@nschris-stripe nschris-stripe force-pushed the nschris/shippingAddressSelection branch from df2b246 to 79e8b9d Compare June 25, 2025 20:31
updateAccessibilityContent()
}
}

// Indicates whether the header should appear collapsable or not.
// The header is collapsable when the currently selected payment method is supported.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to change this comment?

Suggested change
// The header is collapsable when the currently selected payment method is supported.
// The header is collapsable when the currently selected item is supported.

Comment on lines +40 to +41
let stackView = UIStackView(arrangedSubviews: [
])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let stackView = UIStackView(arrangedSubviews: [
])
let stackView = UIStackView()

override func updateAccessibilityContent() {
super.updateAccessibilityContent()
if isExpanded {
accessibilityLabel = collapsedLabel.text
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should it not be headingLabel?

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