Commit graph

16943 commits

Author SHA1 Message Date
fef 0eec369211 disable reaction button when not signed in 2023-01-25 13:51:13 -08:00
fef 1ad2c68912 fix image for new custom emoji reactions 2023-01-25 13:51:13 -08:00
fef 615ecb3161 run i18n-tasks normalize 2023-01-25 13:51:13 -08:00
fef 2ffa61db05 display external custom emoji reactions properly
Using an emoji map was completely unnecessary in
the first place, because the reaction list from
the API response includes URLs for every custom
emoji anyway.  The reaction list now also contains
a boolean field indicating whether it is an
external custom emoji, which is required because
people should only be able to react with Unicode
emojis and local custom ones, not with custom
emojis from other servers.
2023-01-25 13:51:10 -08:00
fef 4516cb47ac handle incoming custom emoji reactions properly 2023-01-25 13:44:21 -08:00
fef 102fbc25be support Undo action for EmojiReaction 2023-01-25 13:44:21 -08:00
fef 48a5f5f250 download remote custom emojis from reactions
Emoji reactions containing custom emojis from
remote instances were assumed to already have
been downloaded and stored in the database.
This might obviously not be the case.
2023-01-25 13:44:21 -08:00
fef 29627a4c6c fix integer cast bug
Gotta love Rails.
2023-01-25 13:44:21 -08:00
fef 59f73df49d sanitize setting for number of visible reactions
This is kind of a hack, but the lack of
validation for settings unfortunately makes it
necessary.
2023-01-25 13:44:21 -08:00
Jeremy Kescher 3431edd68b Add reaction limit to instance serializer 2023-01-25 13:44:21 -08:00
fef 0f59ce3e56 fix padding on posts without reactions
The margins of the elements above and below the
main reaction list element overlapped before
reactions were added.  Adding display: none to
empty reaction bars restores this exact look.
2023-01-25 13:44:21 -08:00
fef 3956154a16 rename nop handler to handleNoOp
This also adds the comment in action_bar.js to
status_action_bar.js, clarifying that a future
version could improve this code by modifying
EmojiPickerDropdown.
2023-01-25 13:44:21 -08:00
fef d61c47edb0 cleanup JS imports and other minor stuff 2023-01-25 13:44:20 -08:00
fef 97043dce21 remove unnecessary parameter 2023-01-25 13:43:25 -08:00
fef 3fd6173203 change reaction api to match other interactions
Status reactions had an API similar to that of
announcement reactions, using PUT and DELETE at a
single endpoint.  I believe that for statuses, it
makes more sense to follow the convention of the
other interactions and use separate POST endpoints
for create and destroy respectively.
2023-01-25 13:43:25 -08:00
fef aa76853d51 fix reaction deletion bug and clean up controller
Turns out the strange error where it would delete
the wrong reaction occurred because I forgot to
pass the emoji name to the query, which resulted
in the database deleting the first reaction it
found.  Also, this removes the unused set_reaction
callback and includes the Authorization module for
the status reactions controller.
2023-01-25 13:43:25 -08:00
fef 5e8f805447 remove outdated comments 2023-01-25 13:43:25 -08:00
fef 341c663d29 clean up new imports in vanilla flavour 2023-01-25 13:43:25 -08:00
fef b7c8a2b7b7 rebase with upstream 2023-01-25 13:43:24 -08:00
fef 6ff67a6775 make number of visible reactions a vanilla setting
Reactions will be backported to the vanilla
flavour, which requires all related settings to
be accessible from the vanilla settings page
rather than the glitch specific settings modal.
2023-01-25 13:39:00 -08:00
fef 20166444de make number of displayed reactions a setting
This adds an extra item to the local settings for
specifying the number of reactions shown in toots.
The detailed status view always shows all
reactions.
2023-01-25 13:38:59 -08:00
fef 7fc71af0cc change default reaction limit to 1 2023-01-25 13:32:37 -08:00
fef 63c03cf902 limit number of reactions displayed
Too many reactions on a single post quickly get
spammy, so they are now sorted by count and only
the first MAX_REACTIONS number of different
emojis are actually displayed.
2023-01-25 13:32:37 -08:00
fef fff8112a5f fix reaction margins and paddings 2023-01-25 13:32:37 -08:00
fef aa6abec827 cleanup frontend emoji reaction code 2023-01-25 13:32:36 -08:00
fef a88d98f7d7 cleanup backend emoji reaction code 2023-01-25 13:30:24 -08:00
fef 26972e3947 fix padding for reaction button 2023-01-25 13:30:24 -08:00
fef 79b741ea93 handle misskey reactions properly
misskey federates emoji reactions as likes.
2023-01-25 13:30:24 -08:00
fef cafc95381c move react button to action bar 2023-01-25 13:30:22 -08:00
fef 0f29c1fa8f cherry-pick emoji reaction changes 2023-01-25 13:23:43 -08:00
fef d65c974741 make frontend fetch reaction limit
the maximum number of reactions was previously
hardcoded to 8.  this commit also fixes an
incorrect query in StatusReactionValidator where
it didn't count per-user reactions but the total
amount of different ones.
2023-01-25 11:51:23 -08:00
fef 0e5bb30222 make status reaction count limit configurable 2023-01-25 11:51:23 -08:00
fef 64defa3eed remove accidentally created file 2023-01-25 11:51:23 -08:00
fef cb75d43185 federate emoji reactions
this is kind of experimental, but it should work
in theory.  at least i tested it with a remove
akkoma instance and it didn't crash.
2023-01-25 11:51:23 -08:00
fef 9958664f55 show reactions in detailed status view 2023-01-25 11:51:21 -08:00
fef 5df48a4d8a add frontend for emoji reactions
this is still pretty bare bones but hey, it works.
2023-01-25 11:47:55 -08:00
fef 9410d00d7b add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2023-01-25 11:42:52 -08:00
Claire 368d6fe54f
Merge pull request #2092 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2023-01-21 21:28:13 +01:00
Claire 3c76f1f6c2 Merge branch 'main' into glitch-soc/merge-upstream 2023-01-21 19:42:58 +01:00
Claire 628dcbb732
Revert "Remove LDSignature on actor Delete activities (#21466)" (#23185)
This reverts commit f4f2b062ec.
2023-01-21 15:33:21 +01:00
Eugen Rochko a4090ab646 [Glitch] Fix wrong text color on some buttons in light theme in web UI
Port 13e9d91ba7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-01-21 15:08:51 +01:00
Eugen Rochko 0d20b38da7 [Glitch] Fix wrong padding in RTL layout in web UI
Port part of 4894deca7e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-01-21 15:07:52 +01:00
Claire 3fd3e88b25 Merge branch 'main' into glitch-soc/merge-upstream 2023-01-21 14:58:15 +01:00
Jeong Arm a1abda39dd
Fix Account Strike causing PG not null validation error (#23178) 2023-01-21 10:22:22 +01:00
Claire 8180f7ba19
Bump version to 4.1.0rc1 (#23112) 2023-01-20 14:19:12 +01:00
Vyr Cossont c4a5e0ca0e
Advertise supported MIME types for statuses (#2090) 2023-01-20 13:57:32 +01:00
Eugen Rochko 13e9d91ba7
Fix wrong text color on some buttons in light theme in web UI (#23156) 2023-01-19 15:51:27 +01:00
Eugen Rochko 4894deca7e
Fix wrong padding in RTL layout in web UI (#23157) 2023-01-19 15:51:14 +01:00
Claire 26c2b401a5
Fix missing admin CSS in glitch-soc flavor (#2088)
Port SCSS changes from 43f56f1291

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2023-01-18 18:54:04 +01:00
Claire 01405bc6f8
Merge pull request #2087 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2023-01-18 18:41:24 +01:00