NT-1910: UX β Not logged in / Not backer for Comment Composer #1271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π² What
This change handles the different states of the comment composer in relation to the user state i.e. logged out, not backing, etc.
Also had to update the UI to make the separator disappear as it was still appearing when the composer was gone.
π€ Why
There are three states ->
ENABLED, DISABLED, GONE
GONE
-> The comment composer should be completely gone if the user is not logged in.ENABLED
-> If the user is logged in and a backer, or is the creator, the comment composer is enabled.DISABLED
-> If the user is logged in but not a backer, then the comment composer should be in the disabled stateπ How
Created an enum that holds these three states, and when the comment view model is initiated, it emits this state to the activity and the view responds accordingly.
π See
Logged in: Backing and not backing
Logged out:
π 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. Test going to the comments directly from the project page, as well as from the updates page. Then test the different states listed below.
π΄ = no comment composer
π‘ = comment composer disabled
π’ = comment composer enabled
These are the different states to test:
Logged out = π΄
Logged in and not backing = π‘
Logged in and backing = π’
Logged in and creator = π’
Story π
NT-1910: UX β Not logged in / Not backer for Comment Composer