Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Emoji Reactions (Replaces #1980) #2127

Closed
wants to merge 66 commits into from

Commits on May 7, 2023

  1. add backend support for status emoji reactions

    turns out we can just reuse the code for
    announcement reactions.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    9fccc8c View commit details
    Browse the repository at this point in the history
  2. add frontend for emoji reactions

    this is still pretty bare bones but hey, it works.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    671fb4c View commit details
    Browse the repository at this point in the history
  3. show reactions in detailed status view

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    56cb7ff View commit details
    Browse the repository at this point in the history
  4. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    a1685c4 View commit details
    Browse the repository at this point in the history
  5. remove accidentally created file

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    6646d36 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4f4237c View commit details
    Browse the repository at this point in the history
  7. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    6bd0646 View commit details
    Browse the repository at this point in the history
  8. cherry-pick emoji reaction changes

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    f61c649 View commit details
    Browse the repository at this point in the history
  9. move react button to action bar

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    c96110a View commit details
    Browse the repository at this point in the history
  10. handle misskey reactions properly

    misskey federates emoji reactions as likes.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    256a07e View commit details
    Browse the repository at this point in the history
  11. fix padding for reaction button

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    0ae702a View commit details
    Browse the repository at this point in the history
  12. cleanup backend emoji reaction code

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    9868231 View commit details
    Browse the repository at this point in the history
  13. cleanup frontend emoji reaction code

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    299b501 View commit details
    Browse the repository at this point in the history
  14. fix reaction margins and paddings

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    4951abe View commit details
    Browse the repository at this point in the history
  15. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    78e0e74 View commit details
    Browse the repository at this point in the history
  16. change default reaction limit to 1

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    b6f8093 View commit details
    Browse the repository at this point in the history
  17. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    c3a18c6 View commit details
    Browse the repository at this point in the history
  18. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    573f12e View commit details
    Browse the repository at this point in the history
  19. rebase with upstream

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    7403e91 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    49c8048 View commit details
    Browse the repository at this point in the history
  21. remove outdated comments

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    a8afee5 View commit details
    Browse the repository at this point in the history
  22. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    946debe View commit details
    Browse the repository at this point in the history
  23. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    be710b6 View commit details
    Browse the repository at this point in the history
  24. remove unnecessary parameter

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    490c1a2 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    4452ddb View commit details
    Browse the repository at this point in the history
  26. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    9f6a880 View commit details
    Browse the repository at this point in the history
  27. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    8aadf99 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    d5ccf3b View commit details
    Browse the repository at this point in the history
  29. sanitize setting for number of visible reactions

    This is kind of a hack, but the lack of
    validation for settings unfortunately makes it
    necessary.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    d820510 View commit details
    Browse the repository at this point in the history
  30. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    16e08e1 View commit details
    Browse the repository at this point in the history
  31. support Undo action for EmojiReaction

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    7349a5a View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    dbbfea1 View commit details
    Browse the repository at this point in the history
  33. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    d0f3f64 View commit details
    Browse the repository at this point in the history
  34. run i18n-tasks normalize

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    eac272d View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    799fb28 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    6a1c438 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    588315a View commit details
    Browse the repository at this point in the history
  38. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    13b5375 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    f6b1ec0 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    3eab0d0 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    215a76c View commit details
    Browse the repository at this point in the history
  42. fix schema after rebase

    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    ed60e5b View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    4761bd3 View commit details
    Browse the repository at this point in the history
  44. 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.
    fef1312 authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    79ff467 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    275a67b View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    b753263 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    49b25c5 View commit details
    Browse the repository at this point in the history
  48. Per PR suggestion, split name and domain, and look for emoji ID, for …

    …unreact, so remote emoji's can be unreacted
    neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    2664621 View commit details
    Browse the repository at this point in the history
  49. Fix rebase issues

    neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    98eab31 View commit details
    Browse the repository at this point in the history
  50. Keep emoji picker within screen bounds

    Adds the `flip` prop to `<Overlay>`. Fixes #40
    Ivan Rodriguez authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    b78ea8b View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    f718c02 View commit details
    Browse the repository at this point in the history
  52. Migrate emoji reactions

    kescherCode authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    0c23022 View commit details
    Browse the repository at this point in the history
  53. Fix appearance/show.html.haml

    kescherCode authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    34f9e54 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    759a277 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    7d7eff8 View commit details
    Browse the repository at this point in the history
  56. Update emoji reaction patches

    kescherCode authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    e0db7dc View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    fa0a5a7 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    b0b593d View commit details
    Browse the repository at this point in the history
  59. Remove failing skip_before_action from v1/custom_emojis_controller.rb

    Fixes incorrect merge at 9eb1494
    kescherCode authored and neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    ec687d7 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    4bd3c80 View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    2a8b66a View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    730878a View commit details
    Browse the repository at this point in the history
  63. Revert "Fix missed merge conflict text in version.rb"

    This reverts commit 2a8b66a.
    neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    eb68f62 View commit details
    Browse the repository at this point in the history
  64. Revert "Fix appearance/show.html.haml"

    This reverts commit 34f9e54.
    neatchee committed May 7, 2023
    Configuration menu
    Copy the full SHA
    5bd0c35 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    f560ee4 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Configuration menu
    Copy the full SHA
    924e858 View commit details
    Browse the repository at this point in the history