Uncaught ReferenceError: awards_handler is not definedapplication-3f06907660dd7f5126c13c5f28ac11bd.js:43 Failed to load resource: the server responded with a status of 500 (Internal Server Error)https://gitlab.com/gitlab-com/www-gitlab-com/notesFailed to load resource: the server responded with a status of 500 (Internal Server Error)https://gitlab.com/gitlab-com/www-gitlab-com/notes/2803949
I think we should unify the two ways to add emoji. When using the newly introduced award button, a comment should be posted, only containing the selected emoji, which I think is currently implemented. These comments are hidden from the feed. Alternatively, they could be shown as a .system-note. Posting a comment containing only an emoji has the same effect.
On the other hand, all comments containing an emoji at the beginning followed by some other text should be counted as awards. This is currently not the case.
Also, editing a comment and replacing its content with an emoji currently does not have any effect on the awards.
I talked with @vsizov and @JobV about this feature (possibility to add award-emoji by adding single-emoji comment). User adds a comment with single-emoji but instead of appearing as a subsequent comment, award-emoji is added in awards-bar at the top of the issues page.
Valery and Job suggested that this is a good feature, as it decreases clutter. My suggestion was that adding comment with single emoji is also something stronger than award-emoji, and having those two mechanisms separated is in fact additional feature (multiple people can express opinion using award emoji, but other people - e.g. someone who is authorized to or has higher rank in an organisation - can add comments also; such comments will be more visible and, above all, will be tighter bounded to person who posts this emoji-comment).
However, we decided to follow the path of minimizing clutter.
There is also a problem in adding award-emoji by submitting a comment with single emoji, when such award-emoji already exists. It raises ActionController::UrlGenerationError in Projects::Notes#create.
ActionController::UrlGenerationError in Projects::Notes#create it's problem of notes validation. If note is invalid it fails with this error. When you repeat the same emoji by posting it in comment, the actual note will be invalid and that's why that error appears (we can see it in browser debugger, user can't see it). I'm not sure how we should handle it.
@vsizov Yes, I know that we don't support award-emojis in commit notes. This is actually what I'm working on. I'm trying to find best approach to distinguish this two cases.
I've already found problem with this validation. And I'm not really sure what business rules are best here - should we just notify user that this emoji is already set, or unset this award-emoji ?