Commit graph

17779 commits

Author SHA1 Message Date
fef
215a76cca0 delete reaction notifications when deleting status 2023-05-07 15:08:26 -07:00
fef
3eab0d0cd0 support reacting with foreign custom emojis 2023-05-07 15:08:26 -07:00
fef
f6b1ec0f3d properly disable reactions when not logged in 2023-05-07 15:08:26 -07:00
fef
13b5375fb7 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 15:08:26 -07:00
fef
588315ab24 also disable reaction buttons in vanilla flavour 2023-05-07 15:08:26 -07:00
fef
6a1c43856e disable reaction button when not signed in 2023-05-07 15:08:26 -07:00
fef
799fb2812a fix image for new custom emoji reactions 2023-05-07 15:08:26 -07:00
fef
eac272d80f run i18n-tasks normalize 2023-05-07 15:08:26 -07:00
fef
d0f3f649f5 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 15:08:25 -07:00
fef
dbbfea1b48 handle incoming custom emoji reactions properly 2023-05-07 15:05:56 -07:00
fef
7349a5a2f5 support Undo action for EmojiReaction 2023-05-07 15:05:56 -07:00
fef
16e08e1e3f 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 15:05:56 -07:00
fef
d8205100c8 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 15:05:56 -07:00
Jeremy Kescher
d5ccf3b438 Add reaction limit to instance serializer 2023-05-07 15:05:56 -07:00
fef
8aadf99a54 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 15:05:56 -07:00
fef
9f6a880c96 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 15:05:56 -07:00
fef
4452ddbc88 cleanup JS imports and other minor stuff 2023-05-07 15:05:56 -07:00
fef
490c1a2244 remove unnecessary parameter 2023-05-07 15:05:56 -07:00
fef
be710b6a5f 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 15:05:56 -07:00
fef
946debee55 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 15:05:56 -07:00
fef
a8afee509b remove outdated comments 2023-05-07 15:05:56 -07:00
fef
49c8048b98 clean up new imports in vanilla flavour 2023-05-07 15:05:56 -07:00
fef
7403e91a6e rebase with upstream 2023-05-07 15:05:56 -07:00
fef
573f12ef46 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 15:05:56 -07:00
fef
c3a18c6fff 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 15:05:56 -07:00
fef
b6f8093a9d change default reaction limit to 1 2023-05-07 15:05:56 -07:00
fef
78e0e74fa7 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 15:05:56 -07:00
fef
4951abefb3 fix reaction margins and paddings 2023-05-07 15:05:56 -07:00
fef
299b501db4 cleanup frontend emoji reaction code 2023-05-07 15:05:56 -07:00
fef
98682312e1 cleanup backend emoji reaction code 2023-05-07 15:05:56 -07:00
fef
0ae702a331 fix padding for reaction button 2023-05-07 15:05:56 -07:00
fef
256a07ef40 handle misskey reactions properly
misskey federates emoji reactions as likes.
2023-05-07 15:05:56 -07:00
fef
c96110a037 move react button to action bar 2023-05-07 15:05:56 -07:00
fef
f61c649318 cherry-pick emoji reaction changes 2023-05-07 15:05:56 -07:00
fef
6bd06460f4 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 15:05:56 -07:00
fef
4f4237c58e make status reaction count limit configurable 2023-05-07 15:05:56 -07:00
fef
6646d36d1b remove accidentally created file 2023-05-07 15:05:56 -07:00
fef
a1685c4a83 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 15:05:56 -07:00
fef
56cb7ff931 show reactions in detailed status view 2023-05-07 15:05:56 -07:00
fef
671fb4c3ed add frontend for emoji reactions
this is still pretty bare bones but hey, it works.
2023-05-07 15:05:55 -07:00
fef
9fccc8ca76 add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2023-05-07 15:05:29 -07:00
Claire
de74acbe0c
Fix some more Javascript linting issues and discrepancies with upstream (#2209)
* Fix typo in flavours/glitch/features/video/index.js

* Fix various linting issues and discrepancies with upstream
2023-05-07 21:43:25 +02:00
Claire
ed0a407888
Fix thread lines not being properly updated when new posts are received (#2210) 2023-05-07 20:06:10 +02:00
Plastikmensch
179e38cf15
Reset language to default when cancelling a reply (#2114)
When cancelling a reply, the language was still set to the language of the replied to toot.

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
2023-05-07 18:45:10 +02:00
Claire
3fb7fe14c6
Fix some of the Javascript linting issues, as well as bugs and unneeded divergences with upstream (#2208)
* Run eslint --fix

* Fix linting issues in video player and reduce divergences with upstream

This includes a behavior change of not auto-looping videos anymore. I don't
remember loops being ever intended, and they have been removed from upstream
a while ago, but we somehow missed the change.

* Fix lint issues in `app/javascript/flavours/glitch/selectors/index.js`

Those were basically caused by dead code that isn't present upstream, so
that brings us closer to upstream as well.

* Fix linting issue and bug in streaming/index.js

* Fix linting issues in config/webpack/shared.js

* Fix unused import in flavours/glitch/features/ui/index.js

* Fix linting issues and reduce divergences from upstream in flavours/glitch/features/ui/components/video_modal.jsx

* Fix linting issues in flavours/glitch/reducers

* Fix linting issues in glitch-soc onboarding modal

* Fix linting issues in flavours/glitch/features/ui/components/navigation_panel.jsx

* Remove dead code for unused local setting navbar_under

* Fix various linting issues

* Fix linting issues in flavours/glitch/components/scrollable_list.jsx and reduce divergences with upstream
2023-05-07 18:22:25 +02:00
Claire
9b59748679
Fix rubocop warnings (#2206) 2023-05-07 15:06:15 +02:00
Claire
6f64c79ca4
Fix SCSS linting issues (#2207)
* Disable font-family-no-missing-generic-family-keyword for font-awesome accessibility icons

* Run stylelint --fix

* Avoid `@extend` directives with doodle modal CSS

* Drop use of `@extend` for notification cleanup buttons SCSS

* Run prettier on SCSS
2023-05-07 15:04:59 +02:00
Claire
a6207d243b
New Crowdin updates (#2202)
* New translations en.json (Russian)
[ci skip]

* New translations en.json (Russian)
[ci skip]
2023-05-07 13:37:47 +02:00
Claire
c18884de32
Merge pull request #2198 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2023-04-30 13:06:50 +02:00
Claire
e79998a11a Restore translations from not-yet-ported onboarding changes as glitch-soc translations 2023-04-29 19:38:08 +02:00