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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't display '0 reactions' on article feed #12425
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.
The tests seem fine!
<span className="hidden s:inline"> | ||
| ||
{`${totalReactions == 1 ? 'reaction' : 'reactions'}`} | ||
if (totalReactions > 0) { |
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.
I might be wrong here but I think you can return nothing immediately at the top of the function if the count is 0 because the rest of the component is just about rendering 1 or plus as the 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.
makes sense 馃槃 I will modify
import '../../../../assets/javascripts/lib/xss'; | ||
import '../../../../assets/javascripts/utilities/timeAgo'; |
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.
are these needed?
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.
馃槄 you're right. I copied my test from the Article.test.jsx
; these imports are the remnants of that move. I shall delete.
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.
Works well!
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.
馃殌 AWESOME!
What type of PR is this? (check all applicable)
Description
View updated RRC here.
Do not display
0 reactions
on the article feed card, when that article has zero reactions.Related Tickets & Documents
None
QA Instructions, Screenshots, Recordings
=> Implemented this change in 3 views; be sure to QA them all 馃檹馃従
UI accessibility concerns?
None
Added tests?
have not been included
Added to documentation?
Admin Guide
[optional] Are there any post deployment tasks we need to perform?
None
[optional] What gif best describes this PR or how it makes you feel?