Commit Graph

17630 Commits

Author SHA1 Message Date
Kay Faraday 6e2e601664 update from glitch soc 2023-07-28 03:54:40 +00:00
Kay Faraday 8c765eedb3 document emoji reactions! 2023-04-27 07:16:56 +00:00
Kay Faraday 5c1401ea9e Merge branch 'custom-emoji-reactions' 2023-04-27 07:15:21 +00:00
Kay Faraday aa6c0cba85 document removal of QRT in the README 2023-04-22 04:38:38 +00:00
Kay Faraday 92bf8aa11c Revert "QRT"
This reverts commit 6b794cbf74.
This caused too many merge conflicts when merging from upstream glitch,
and was not a very well-implemented feature to begin with.
2023-04-22 04:19:43 +00:00
Jeremy Kescher 59848e2709 Fix appearance/show.html.haml 2023-04-04 15:24:57 -07:00
Jeremy Kescher 9fda65a4ca Migrate emoji reactions 2023-04-04 15:23:54 -07:00
neatchee 5810ccb622 Remove old .js locale files accidentally restored during rebase 2023-04-04 15:22:12 -07:00
Ivan Rodriguez 869f74484a Keep emoji picker within screen bounds
Adds the `flip` prop to `<Overlay>`. Fixes #40
2023-04-04 15:22:12 -07:00
neatchee 34d037efae Fix rebase issues 2023-04-04 15:22:12 -07:00
neatchee 896d69dea1 Per PR suggestion, split name and domain, and look for emoji ID, for unreact, so remote emoji's can be unreacted 2023-04-04 15:22:12 -07:00
fef 54b973456b move emoji reaction strings to locales-glitch 2023-04-04 15:22:12 -07:00
Jeremy Kescher 12e7b2174a Fix status reactions preventing an on_cascade delete 2023-04-04 15:22:12 -07:00
fef 55f320f703 bypass reaction limit for foreign accounts 2023-04-04 15:22:12 -07:00
fef 79646a499a fix 404 when reacting with Keycap Number Sign
The Unicode sequence for this emoji starts with an
ASCII # character, which the browser's URI parser
truncates before sending the request to the
backend.
2023-04-04 15:22:12 -07:00
fef c3248a72c0 fix status action bar after upstream changes 2023-04-04 15:22:12 -07:00
fef 35504c853e fix schema after rebase 2023-04-04 15:22:12 -07:00
fef 81a12e2c18 delete reaction notifications when deleting status 2023-04-04 15:22:12 -07:00
fef c31b59012e support reacting with foreign custom emojis 2023-04-04 15:22:12 -07:00
fef 54b6ae4f8a properly disable reactions when not logged in 2023-04-04 15:22:12 -07:00
fef 5c1f1d60c3 serialize custom emoji reactions properly for AP
Akkoma and possibly others expect the `tag` field
in an EmojiReact activity to be an array, not just
a single object, so it's being wrapped into one
now.  I'm not entirely sure whether this is the
idiomatic way of doing it tbh, but it works fine.
2023-04-04 15:22:12 -07:00
fef 0468afdba4 also disable reaction buttons in vanilla flavour 2023-04-04 15:22:12 -07:00
fef b01c1f4822 disable reaction button when not signed in 2023-04-04 15:22:12 -07:00
fef 6ca3f312b7 fix image for new custom emoji reactions 2023-04-04 15:22:12 -07:00
fef 6a2f9d9597 run i18n-tasks normalize 2023-04-04 15:22:12 -07:00
fef 49324217c3 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-04-04 15:22:12 -07:00
fef 728083ab53 handle incoming custom emoji reactions properly 2023-04-04 15:22:12 -07:00
fef 57d9f63bc0 support Undo action for EmojiReaction 2023-04-04 15:22:12 -07:00
fef 751909d348 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-04-04 15:22:12 -07:00
fef 613d247a0a 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-04-04 15:22:00 -07:00
Jeremy Kescher d645eb2654 Add reaction limit to instance serializer 2023-04-04 15:21:12 -07:00
fef 77e2cc11ff 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-04-04 15:21:12 -07:00
fef 3a5c456aa8 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-04-04 15:21:12 -07:00
fef eab49f22c0 cleanup JS imports and other minor stuff 2023-04-04 15:21:11 -07:00
fef 2b43aba58c remove unnecessary parameter 2023-04-04 15:20:34 -07:00
fef d38c56ab16 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-04-04 15:20:34 -07:00
fef df673abeea 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-04-04 15:20:34 -07:00
fef 3588c37413 remove outdated comments 2023-04-04 15:20:34 -07:00
fef de4967add7 clean up new imports in vanilla flavour 2023-04-04 15:20:34 -07:00
fef 465404b4b1 rebase with upstream 2023-04-04 15:20:34 -07:00
fef 869bc2f469 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-04-04 15:20:34 -07:00
fef 92aebbb7f3 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-04-04 15:18:14 -07:00
fef dd0b09273a change default reaction limit to 1 2023-04-04 15:18:14 -07:00
fef 5b7514a17f 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-04-04 15:18:14 -07:00
fef 5ada827029 fix reaction margins and paddings 2023-04-04 15:18:14 -07:00
fef d249994de8 cleanup frontend emoji reaction code 2023-04-04 15:18:14 -07:00
fef 1b3305c3db cleanup backend emoji reaction code 2023-04-04 15:18:14 -07:00
fef 2d8e3e9b9b fix padding for reaction button 2023-04-04 15:18:14 -07:00
fef f9b15866af handle misskey reactions properly
misskey federates emoji reactions as likes.
2023-04-04 15:18:14 -07:00
fef b37da9e59f move react button to action bar 2023-04-04 15:18:14 -07:00