PLT-1378 Initial version of emoji reactions (#4520)

* Refactored emoji.json to support multiple aliases and emoji categories

* Added custom category to emoji.jsx and stabilized all fields

* Removed conflicting aliases for :mattermost: and :ca:

* fixup after store changes

* Added emoji reactions

* Removed reactions for an emoji when that emoji is deleted

* Fixed incorrect test case

* Renamed ReactionList to ReactionListView

* Fixed 👍 and 👎 not showing up as possible reactions

* Removed text emoticons from emoji reaction autocomplete

* Changed emoji reactions to be sorted by the order that they were first created

* Set a maximum number of listeners for the ReactionStore

* Removed unused code from Textbox component

* Fixed reaction permissions

* Changed error code when trying to modify reactions for another user

* Fixed merge conflicts

* Properly applied theme colours to reactions

* Fixed ESLint and gofmt errors

* Fixed ReactionListContainer to properly update when its post prop changes

* Removed unnecessary escape characters from reaction regexes

* Shared reaction message pattern between CreatePost and CreateComment

* Removed an unnecessary select query when saving a reaction

* Changed reactions route to be under /reactions

* Fixed copyright dates on newly added files

* Removed debug code that prevented all unit tests from being ran

* Cleaned up unnecessary code for reactions

* Renamed ReactionStore.List to ReactionStore.GetForPost
Этот коммит содержится в:
Harrison Healey
2016-11-30 13:55:49 -05:00
коммит произвёл GitHub
родитель 2bf0342d13
Коммит 165ad0d4f7
47 изменённых файлов: 2154 добавлений и 98 удалений

Просмотреть файл

@@ -805,6 +805,10 @@
"id": "api.emoji.create.too_large.app_error",
"translation": "Unable to create emoji. Image must be less than 1 MB in size."
},
{
"id": "api.emoji.delete.delete_reactions.app_error",
"translation": "Unable to delete reactions when deleting emoji with emoji name %v"
},
{
"id": "api.emoji.delete.permissions.app_error",
"translation": "Inappropriate permissions to delete emoji."
@@ -1503,6 +1507,22 @@
"id": "api.preference.save_preferences.set_details.app_error",
"translation": "session.user_id={{.SessionUserId}}, preference.user_id={{.PreferenceUserId}}"
},
{
"id": "api.reaction.delete_reaction.mismatched_channel_id.app_error",
"translation": "Failed to save reaction when channel id in URL doesn't match post id in URL"
},
{
"id": "api.reaction.list_reactions.mismatched_channel_id.app_error",
"translation": "Failed to get reactions when channel id in URL doesn't match post id in URL"
},
{
"id": "api.reaction.save_reaction.mismatched_channel_id.app_error",
"translation": "Failed to save reaction when channel id in URL doesn't match post id in URL"
},
{
"id": "api.reaction.send_reaction_event.post.app_error",
"translation": "Failed to get post when sending websocket event for reaction"
},
{
"id": "api.saml.save_certificate.app_error",
"translation": "Certificate did not save properly."
@@ -3707,6 +3727,22 @@
"id": "model.preference.is_valid.value.app_error",
"translation": "Value is too long"
},
{
"id": "model.reaction.is_valid.create_at.app_error",
"translation": "Create at must be a valid time"
},
{
"id": "model.reaction.is_valid.emoji_name.app_error",
"translation": "Invalid emoji name"
},
{
"id": "model.reaction.is_valid.post_id.app_error",
"translation": "Invalid post id"
},
{
"id": "model.reaction.is_valid.user_id.app_error",
"translation": "Invalid user id"
},
{
"id": "model.team.is_valid.characters.app_error",
"translation": "Name must be 2 or more lowercase alphanumeric characters"
@@ -4575,6 +4611,46 @@
"id": "store.sql_preference.update.app_error",
"translation": "We couldn't update the preference"
},
{
"id": "store.sql_reaction.delete.begin.app_error",
"translation": "Unable to open transaction while deleting reaction"
},
{
"id": "store.sql_reaction.delete.commit.app_error",
"translation": "Unable to commit transaction while deleting reaction"
},
{
"id": "store.sql_reaction.delete.save.app_error",
"translation": "Unable to delete reaction"
},
{
"id": "store.sql_reaction.delete_all_with_emoj_name.delete_reactions.app_error",
"translation": "Unable to delete reactions with the given emoji name"
},
{
"id": "store.sql_reaction.delete_all_with_emoj_name.get_reactions.app_error",
"translation": "Unable to get reactions with the given emoji name"
},
{
"id": "store.sql_reaction.delete_all_with_emoji_name.update_post.warn",
"translation": "Unable to update Post.HasReactions while removing reactions post_id=%v, error=%v"
},
{
"id": "store.sql_reaction.get_for_post.app_error",
"translation": "Unable to get reactions for post"
},
{
"id": "store.sql_reaction.save.begin.app_error",
"translation": "Unable to open transaction while saving reaction"
},
{
"id": "store.sql_reaction.save.commit.app_error",
"translation": "Unable to commit transaction while saving reaction"
},
{
"id": "store.sql_reaction.save.save.app_error",
"translation": "Unable to save reaction"
},
{
"id": "store.sql_session.analytics_session_count.app_error",
"translation": "We couldn't count the sessions"