Commit graph

17782 commits

Author SHA1 Message Date
neatchee
5ccfbf6ee3 Remove old .js locale files accidentally restored during rebase 2023-05-07 01:01:49 -07:00
Ivan Rodriguez
09c808ae99 Keep emoji picker within screen bounds
Adds the `flip` prop to `<Overlay>`. Fixes #40
2023-05-07 01:01:49 -07:00
neatchee
54a2372897 Fix rebase issues 2023-05-07 01:01:49 -07:00
neatchee
12d95fcebe Per PR suggestion, split name and domain, and look for emoji ID, for unreact, so remote emoji's can be unreacted 2023-05-07 01:01:49 -07:00
fef
4559e8aa33 move emoji reaction strings to locales-glitch 2023-05-07 01:01:49 -07:00
Jeremy Kescher
5328d58a7c Fix status reactions preventing an on_cascade delete 2023-05-07 01:01:49 -07:00
fef
8744bb10a3 bypass reaction limit for foreign accounts 2023-05-07 01:01:49 -07:00
fef
cf7850f0d2 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-05-07 01:01:49 -07:00
fef
f55666786b fix status action bar after upstream changes 2023-05-07 01:01:49 -07:00
fef
3fb33bdc7d fix schema after rebase 2023-05-07 01:01:49 -07:00
fef
17c8841513 delete reaction notifications when deleting status 2023-05-07 01:01:49 -07:00
fef
2e2430ad49 support reacting with foreign custom emojis 2023-05-07 01:01:49 -07:00
fef
fffe4af3b7 properly disable reactions when not logged in 2023-05-07 01:01:49 -07:00
fef
f33147e152 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-05-07 01:01:49 -07:00
fef
7ce619b13c also disable reaction buttons in vanilla flavour 2023-05-07 01:01:49 -07:00
fef
8f64167661 disable reaction button when not signed in 2023-05-07 01:01:49 -07:00
fef
ba4984e15d fix image for new custom emoji reactions 2023-05-07 01:01:49 -07:00
fef
705598c780 run i18n-tasks normalize 2023-05-07 01:01:49 -07:00
fef
2568ea1fe1 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-05-07 01:01:49 -07:00
fef
6afbc6d226 handle incoming custom emoji reactions properly 2023-05-07 01:01:49 -07:00
fef
61547fd28a support Undo action for EmojiReaction 2023-05-07 01:01:49 -07:00
fef
d5e8133904 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-05-07 01:01:49 -07:00
fef
5d682cc93b 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-05-07 01:01:49 -07:00
Jeremy Kescher
8f262bbd37 Add reaction limit to instance serializer 2023-05-07 01:01:49 -07:00
fef
35ff0c4d94 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-05-07 01:01:49 -07:00
fef
2102a08780 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-05-07 01:01:49 -07:00
fef
aa8d77ba0e cleanup JS imports and other minor stuff 2023-05-07 01:01:49 -07:00
fef
dfd0c0b992 remove unnecessary parameter 2023-05-07 01:01:14 -07:00
fef
223edf4023 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-05-07 01:01:14 -07:00
fef
4f9cb8cd54 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-05-07 01:01:14 -07:00
fef
25999d39dd remove outdated comments 2023-05-07 01:01:14 -07:00
fef
a33a698ab7 clean up new imports in vanilla flavour 2023-05-07 01:01:14 -07:00
fef
88f2423ca4 rebase with upstream 2023-05-07 01:01:12 -07:00
fef
92384b1563 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-05-07 00:58:56 -07:00
fef
7908581d43 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-05-07 00:58:56 -07:00
fef
64dcd84409 change default reaction limit to 1 2023-05-07 00:58:56 -07:00
fef
092d8ad5ab 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-05-07 00:58:56 -07:00
fef
e220736cac fix reaction margins and paddings 2023-05-07 00:58:56 -07:00
fef
d52593b591 cleanup frontend emoji reaction code 2023-05-07 00:58:55 -07:00
fef
5ef952eebb cleanup backend emoji reaction code 2023-05-07 00:58:28 -07:00
fef
896ed10527 fix padding for reaction button 2023-05-07 00:58:28 -07:00
fef
d7a49f057c handle misskey reactions properly
misskey federates emoji reactions as likes.
2023-05-07 00:58:28 -07:00
fef
3ed18a4c01 move react button to action bar 2023-05-07 00:58:28 -07:00
fef
88f6ccf950 cherry-pick emoji reaction changes 2023-05-07 00:58:28 -07:00
fef
2b4e922c33 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-05-07 00:58:28 -07:00
fef
f2d942571c make status reaction count limit configurable 2023-05-07 00:58:28 -07:00
fef
ee6927a2dc remove accidentally created file 2023-05-07 00:58:28 -07:00
fef
0fee4ad5ea 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-05-07 00:58:28 -07:00
fef
e5b03ea1d3 show reactions in detailed status view 2023-05-07 00:58:27 -07:00
fef
531c5c9185 add frontend for emoji reactions
this is still pretty bare bones but hey, it works.
2023-05-07 00:58:02 -07:00