Skip to content
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

πŸ’²[Native Checkout] Pledge button cell reuse bugfix #789

Merged
merged 4 commits into from Aug 9, 2019

Conversation

justinswart
Copy link
Contributor

πŸ“² What

Fixed a minor issue from #779 in that the pledge button sometimes appears on a recycled cell.

πŸ€” Why

We don't want to see a strange empty button on a reward cell.

πŸ›  How

For the hiding and showing of the button we were activating and deactivating constraints to allow the card view to stretch all the way to the bottom of the cell. In addition to this we also need to hide the button in case it was previously visible on the cell before being recycled.

πŸ‘€ See

Trello, screenshots, external resources?

Before πŸ› After πŸ¦‹
image image

βœ… Acceptance criteria

  • Navigate to a non-live project that you've backed, observe the cell with the View your pledge button, keep scrolling and there shouldn't be any other cells containing and empty button as in the screenshot.

@@ -89,12 +89,14 @@ public final class RewardCardContainerView: UIView {
self.viewModel.outputs.pledgeButtonHidden.observeValues { [weak self] hidden in
guard let self = self else { return }

self.pledgeButton.isHidden = hidden
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the reactive binding for this? self.pledgeButton.rac.hidden = self.viewModel.outputs.pledgeButtonHidden

Copy link
Contributor

@ifbarrera ifbarrera left a comment

Choose a reason for hiding this comment

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

βœ…

@justinswart justinswart merged commit f615475 into master Aug 9, 2019
@justinswart justinswart deleted the reward-carousel-fix-cell-reuse-bug branch August 9, 2019 21:44
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.

None yet

2 participants