Commit graph

17763 commits

Author SHA1 Message Date
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
fef
445a7a8086 add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2023-05-07 00:58:02 -07: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
Eugen Rochko
38eeed6cbf [Glitch] Change logo version in header based on screen size in web UI
Port 6028d047b9 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 18:54:13 +02:00
Nick Schonning
1033598416 [Glitch] Enable formatjs/prefer-pound-in-plural
Port 2daa5a1549 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 18:38:23 +02:00
Claire
edec08b970 Disable full-width media in thread view 2023-04-29 12:43:01 +02:00
Claire
cb97a92954 [Glitch] Fix thread lines in right-to-left locales (#24714)
Port 105f8687e4 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 12:21:44 +02:00
Claire
103b6de8b2 [Glitch] Fix sass warning about deprecated slash as division (#24653)
Port 1527b02c6d to glitch-soc

Co-authored-by: Nick Schonning <nschonni@gmail.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 12:17:06 +02:00
Eugen Rochko
7b01b7c3bf [Glitch] Add lines to threads in web UI
Port 290e4aba31 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 12:08:13 +02:00
Eugen Rochko
8015297f9e [Glitch] Change label from "For you" to "People" on explore screen in web UI
Port 7cf963eec2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 11:34:44 +02:00
Chike Nwaenie
374a109546 [Glitch] Change styling of the recommended accounts to allow bio to be more visible
Port e1b4eeb636 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 11:28:24 +02:00
Christian Schmidt
0091b28ffe [Glitch] Use CSS to trim long card descriptions
Port e713c545b8 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 11:26:58 +02:00
Claire
11b34a903a [Glitch] Fix infinite loop in emoji replacement code
Port fbb4de3dbc to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 11:14:43 +02:00
Claire
0a813d96db [Glitch] Fix characters being emojified even when using Variation Selector 15 (text)
Port 37886c28da to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 11:12:35 +02:00
fusagiko / takayamaki
66bda4713e [Glitch] Allow == when null checking
Port c1a7e38d2b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-04-29 11:09:46 +02:00
Claire
612a1ee697 Fix body_classes test for glitch-soc 2023-04-29 11:08:38 +02:00
Claire
12b935fadf Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `.github/dependabot.yml`:
  Updated upstream, removed in glitch-soc to disable noise.
  Kept removed.
- `CODE_OF_CONDUCT.md`:
  Upstream updated to a new version of the covenant, but I have not read it
  yet, so kept unchanged.
- `Gemfile.lock`:
  Not a real conflict, one upstream dependency updated textually too close to
  the glitch-soc only `hcaptcha` dependency.
  Applied upstream changes.
- `app/controllers/admin/base_controller.rb`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `app/controllers/application_controller.rb`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `app/controllers/disputes/base_controller.rb`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `app/controllers/relationships_controller.rb`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `app/controllers/statuses_cleanup_controller.rb`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `app/helpers/application_helper.rb`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `app/javascript/mastodon/features/compose/components/compose_form.jsx`:
  Upstream added a highlight animation for onboarding, while we changed the
  max character limit.
  Applied our local changes on top of upstream's new version.
- `app/views/layouts/application.html.haml`:
  Minor conflict due to glitch-soc's theming system.
  Applied upstream changes.
- `stylelint.config.js`:
  Upstream added ignore paths, glitch-soc had extra ignore paths.
  Added the same paths as upstream.
2023-04-29 10:44:56 +02:00
Claire
105f8687e4
Fix thread lines in right-to-left locales (#24714) 2023-04-28 13:12:35 +02:00
Claire
2a3a110f00
Fix wrong classes audio and video instead of audio-player and video-player in CSS (#24711) 2023-04-28 11:15:43 +02:00