-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Feature/40437 emoji reactions to work package comments #16020
Draft
jjabari-op
wants to merge
40
commits into
dev
Choose a base branch
from
feature/40437-emoji-reactions-to-work-package-comments
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Feature/40437 emoji reactions to work package comments #16020
jjabari-op
wants to merge
40
commits into
dev
from
feature/40437-emoji-reactions-to-work-package-comments
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…0437-easy-emoji-reactions,-eg-thumbs-up-on-activity-entries
…e/40437-emoji-reactions-to-work-package-comments
…e/40437-emoji-reactions-to-work-package-comments
…e/40437-emoji-reactions-to-work-package-comments
…e/40437-emoji-reactions-to-work-package-comments
…e/40437-emoji-reactions-to-work-package-comments
…e/40437-emoji-reactions-to-work-package-comments
…e/40437-emoji-reactions-to-work-package-comments
…s not reacted as requested by @psatyal
…e/40437-emoji-reactions-to-work-package-comments
Users who do not have commenting permissions: typically the `add_work_package_notes` and anonymous users cannot add new reactions but they can view any existing reactions. Futher, the "Add reactions" button is also hidden from them. In view only state, the emoji reactions render as primer invisible buttons in disabled state. > They can respond to user input and provide feedback, but it does not trigger any actions. > See: https://primer.style/components/button#inactive The view only reactions mimic primer inactive buttons but without the muted styling and cursor change
Base automatically changed from
feature/54733-primerise-the-activity-panel
to
dev
October 17, 2024 12:06
UTF-8 is widely adopted and the default format for Postgres; storing emoji's in unicode format is then possible and should be searchable as any other string- and leveragable via AR named enums. Whilst we could also store integer numbered enums, it would introduce additional overhead that seems unnecessary
Avoid possible collation issues in uncode formats- storing reactions allows us to read the emojis from relevant stores at runtime
* ARIA-label, show names and emoji type: "{Name of reaction} by {user A}, {user B} and {user C}". * Visually, show just names: "{user A}, {user B} and {user C}"
… avoid n+1 calls on journals
Pass it down the component chain. TODO: reduce allocation bloat by extracting it to a lazy memoized helper
def grouped_emoji_reactions(reactable_id:, reactable_type:, last_updated_at: nil) | ||
query = EmojiReaction | ||
.select("emoji_reactions.reactable_id, emoji_reactions.reaction, COUNT(emoji_reactions.id) as count, " \ | ||
"json_agg(json_build_array(users.id, #{user_name_concat_format_sql}) ORDER BY emoji_reactions.created_at) as user_details") # rubocop:disable Layout/LineLength |
Check warning
Code scanning / Brakeman
Possible SQL injection. Warning
Possible SQL injection.
akabiru
force-pushed
the
feature/40437-emoji-reactions-to-work-package-comments
branch
from
October 24, 2024 18:35
466a722
to
b08ed5b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket
https://community.openproject.org/projects/openproject/work_packages/40437
What are you trying to accomplish?
Support emoji reactions to work package comments aka "journals"
Screenshots
tbd
What approach did you choose and why?
tbd
Merge checklist