humanmade / humanmade/h2

10 Reaction Limit Erroneously Prevents incrementing Existing Reaction

Open
#390 1 comment 0 reactions 0 assignees View on GitHub
Bug Low priority
Dominant language
JavaScript
Stars
8
Forks
1
Avg merge
1d 9h
Merged PRs (30d)
7

Description

## Issue Description
The check that prevents users from adding more than 10 types of reactions on a post also prevents a user from incrementing an existing type of reaction. I cannot react to the post at all, even on existing reaction types.

https://github.com/humanmade/H2/blob/695cb2a1f5ec3834d0608d0bc6ca4976e489761a/src/plugins/reactions/Reactions.js#L166-L169

## Steps to reproduce:
1. Navigate to https://updates.hmn.md/2019/09/17/introducing/
1. Attempt to increment an existing reaction on the post (the wine glass, for example)
1. Observe the error
1. Observe, also, that the "add new reaction" icon is still available

![Screen Shot 2019-10-01 at 10 32 12 AM](https://user-images.githubusercontent.com/3021494/65987830-d93b6180-e443-11e9-8741-5df4e53ab68d.png)

![Screen Shot 2019-10-01 at 12 08 48 PM](https://user-images.githubusercontent.com/3021494/65988004-3df6bc00-e444-11e9-88f0-4f1578d3f391.png)

## Expected Result:
I should be able to increment a current reaction type without error. I would expect to only see the error seen above if I were trying to add a new type of emoji reaction.

Additionally, I should not see the "add new reaction" icon if the maximum has been reached.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.