Details
Please to look at the screenshots to see that the reactions are still being rendered correctly
Native:
One reaction:
Multiple reactions:
Web:
One reaction:
Multiple reactions:
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/shared/reaction-utils.js | ||
---|---|---|
16 | Is index > 0 going to only occur when there are multiple reactions? So if we have something like {"👍": reactionInfo, "👎": reactionInfo}, on the second iteration with the key being 👎, we'll append a space when displaying? I'm reviewing this a little out of context so feel free to correct me if I'm wrong! |
lib/shared/reaction-utils.js | ||
---|---|---|
16 | Yup that is correct! Right now this if statement will always return false since we only have one reaction (👍), but when we start introducing more reactions we will want to place a space in between each reaction |
This function seems like it'd be a great candidate for some unit testing + it would make it easier to review since there'd be example usages to step through
I think it'd be cleaner to construct an array with all the elements and then use blah.join(' ') instead of having to add spaces manually
Much cleaner, thanks!
Makes sense, in the future it'd actually be helpful to include in the diff that introduces the function to make things easier to review.
lib/shared/reaction-utils.js | ||
---|---|---|
12 ↗ | (On Diff #19565) | I think reaction instead of key would be more descriptive: for (const reaction of reactions.keys()) { Not a blocker though, whatever you prefer. |
Makes sense, in the future it'd actually be helpful to include in the diff that introduces the function to make things easier to review.
Gotcha in the future when I need to write more tests, I will keep this in mind