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
NT-1977: UX β Not logged in / not backer for Comment Card #1269
Conversation
β¦heck if the user is a backer, creator, logged in or out, to toggle action view group visibility
# Conflicts: # app/src/main/java/com/kickstarter/ui/adapters/CommentsAdapter.kt # app/src/main/java/com/kickstarter/viewmodels/CommentsViewModel.kt # app/src/test/java/com/kickstarter/viewmodels/CommentsViewModelTest.kt
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.
Lgtm!
Codecov Report
@@ Coverage Diff @@
## master #1269 +/- ##
=========================================
Coverage 74.34% 74.34%
Complexity 739 739
=========================================
Files 221 221
Lines 6646 6646
Branches 405 405
=========================================
Hits 4941 4941
Misses 1569 1569
Partials 136 136 Continue to review full report at Codecov.
|
β¦tin/NT-1984-feature-flags * 'master' of github.com:kickstarter/android-oss: NT-1977: UX β Not logged in / not backer for Comment Card (#1269)
π² What
We want to disable the reply/comment card action buttons in different user states i.e. logged in or out, backing or not backing, etc.
I also renamed a few variables to be clearer and extracted some functionality into individual methods, for readability and all that good stuff π
π€ Why
π How
CommentCardData
model that holds thecomment
, theproject
the comment is from, and the state of the card (for future use when replying, errored, etc).CommentCardData
, which is passed to the adapter and eventually theCommentsViewHolderViewModel
CommentsViewHolderViewModel
view model then performs a check when initialized that returns true or false depending on if the user should see the reply button. This boolean is passed to theCommentViewModel
, which toggles the visibility of the action group on the comment card, which holds the reply button as well as the flag comment button.π See
No reply/action buttons: Logged out and logged in and NOT backing, respectively:
Reply/Action buttons visible: Logged in and backing
π QA
Make sure you have a project that you are not backing, a project that you are backing, and a project that you created, and all projects must have comments. Then test the different states listed below.
β = no reply or action buttons
β = reply and action buttons visible
These are the different states to test:
Logged out = β
Logged in and not backing = β
Logged in and backing = β
Logged in and creator = β
Story π
NT-1977: UX β Not logged in / not backer for Comment Card