-
Notifications
You must be signed in to change notification settings - Fork 989
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
Migrate Horizontal rewards into the Project Page #504
Conversation
…different type of buttons
…ndroid-oss into horizontal-rewards
…n isHorizontalRewardsEnabled = true
…ss into horizontal-rewards
Great job, y'all! Can't wait to dig into this 🕵️♀️ |
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.
Great job! I did a first pass. I noticed we're missing a lot of this.
but didn't want to have too many comments. Let's add those in.
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/adapters/HorizontalRewardsAdapter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/fragments/RewardsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/fragments/RewardsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/viewmodels/RewardFragmentViewModelTest.kt
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.
Did another pass on the updates! I'm glad we moved to just having the fragment live in the activity but rotations still aren't handled correctly. If the rewards are visible and you rotate, they should still be visible (but the animation should not repeat).
app/src/main/java/com/kickstarter/ui/fragments/RewardsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/ProjectViewHolder.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/ProjectViewHolder.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/viewmodels/ProjectHolderViewModel.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/viewmodels/ProjectViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/viewmodels/ProjectViewModel.kt
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.
Alright, I think the major parts are good to go so here's some clean up comments
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/viewmodels/RewardFragmentViewModel.kt
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.
there's some feedback that still has not been addressed
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/viewmodels/ProjectViewModel.kt
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.
Alright, did another sweep 🐣 I found some strange rotation behavior:
- In landscape, idk what the view is but there's something behind the card sheet so the curved card corners don't show.
- The position of the reward i'm viewing is not maintained. If I scroll to the last reward and rotate, I see the first reward.
app/src/main/java/com/kickstarter/ui/fragments/RewardsFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/ui/viewholders/HorizontalRewardViewHolder.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/kickstarter/viewmodels/RewardFragmentViewModel.kt
Outdated
Show resolved
Hide resolved
…ss into horizontal-rewards
# Conflicts: # app/src/main/java/com/kickstarter/ui/activities/ProjectActivity.kt # app/src/main/java/com/kickstarter/viewmodels/ProjectViewModel.kt # app/src/main/res/layout/project_layout.xml # app/src/main/res/values/dimens.xml # app/src/test/java/com/kickstarter/viewmodels/ProjectViewModelTest.kt
…onger handle clicks
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.
WE DID IT
٩( ᐛ )و
What ❓
Checkout POC
into the KSR codebase for the first step towardsHorizontal Rewards
. Oninternal
builds user's have the ability to toggle on/off the horizontal rewards from theInternalToolsActivity
.RewardFragment
,RewardFragmentViewModel
,HorizontalRewardViewHolder
,HorizontalRewardAdapter
,RewardFragmentViewModelTest
. Also we updated the tests forProjectViewModelTest
How to QA? 🤔
open the navigation drawer -> InternalTools -> FeatureFlagActivity -> Toggle on or off
.Story 📖
Migrate Horizontal Rewards
See 👀