-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rewards Collection View Footer #786
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty legit! Did an first pass on the code and had some minor comments.
Unfortunately this does also make the transition look a little weird for long rewards, but we can fix that separately, it's also looking a little strange since the gradient was added π€¦ββ All those things need to be accounted for during the animation.
self.viewModel.outputs.configureRewardsCollectionViewFooterWithCount | ||
.observeForUI() | ||
.observeValues { [weak self] count in | ||
self?.updateRewardsCollectionFooterView(with: count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we match this function name to the output name? Just for consistency and easier to find things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
Kickstarter-iOS/Views/Controllers/RewardsCollectionViewFooter.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
π² What
Adds a footer below the rewards collection view that shows the total number of rewards.
π€ Why
To help users orient themselves within the rewards browsing experience.
π How
My first instinct was to try to use
supplementaryView
s which come for free withUICollectionView
. Unfortunately though I quickly realized that this wouldn't work becauseUICollectionView
only supportssection
footer/header "supplementary" views - because we have a horizontally scrolling collection view, it was then showing the footer at the "end" of the section of rewards, which is basically on the right side of the last reward. This wasn't want we wanted.The current approach is to add a footer view as a subview of the
RewardCollectionViewController
'sview
. The footer view is configured with the number of rewards to display, and is shown/hidden depending on whether the currenttraitCollection.verticalSizeClass
is.regular
or.compact
.π See
Trello, screenshots, external resources?
iPhone Landscape:
βΏοΈ Accessibility
π Performance
β Acceptance criteria
On iPhone 5, 6, 7, 8, X
On iPhone XS max, iPad
β° TODO