-
-
Notifications
You must be signed in to change notification settings - Fork 688
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
[Comment] Mention @discussion or @group to represent all members of the thread or group #10934
base: master
Are you sure you want to change the base?
Conversation
…) and corresponding changes to model
Edit to group_service_spec
… changes related to mentioning thread with the help of discussion
…us changes of adding collections as a member to group
Remove forbidden name validation for username comment_spec update Name change: COLLECTIONS -> MENTIONABLE_COLLECTIONS
Hi @jerinkc - it's really wonderful to see you've made a PR to start on this feature. Thank you. I've not seen a loomio feature PR in years. With the greatest respect, I don't think it's going in the right direction currently - I can understand why, this is a super challenging feature to add, not only is the existing mentioning code complex because we support both markdown and html comment formats, it has some legacy behavior support included in it too. Some tips I can offer:
Does that make any sense? You're free to explore the approach however you like, but this is how I recommend you look at it |
Hey @robguthrie , Thank you for your quick review and insightful comment on the current approach. I genuinely appreciate your feedback! I’ll take the suggested changes into account and try to implement them. |
Hey @robguthrie, Thank you once again for the tips! The approach is perfectly clear to me. I want to get your opinion on a couple of additional points:
|
Hi @jerinkc
I suggest you ignore the frontend stuff for now. Write some tests that create a comment with a |
Hey @robguthrie, I have added more changes along with the internationalization feature. Also, should I work with the UI part here or would you prefer it in another PR? |
You can put the UI stuff in here too, please. Sorry there was a misunderstanding about how to handle translation. The code/server side should just be english in all cases - it will be surprisingly simple to translate just the visible text with the existing translation library in the UI only. |
I understand you want to apply translation only to the visible part of the UI. Which is for the UI code it should be something like,
So the server will recognize when a discussion is mentioned. If internationalization applies to the markdown format, how will it detect that the incoming message has mentioned audiences without the current configuration? I think we should retain the current translating functionality(including back_translate method) and only apply it to the markdown format. What do you think? |
Oh Yeah. That's right, it will be necessary for markdown formatted content. Thanks for thinking of that. |
backend - accept translated HTML content with translated attributes
Minor translation changes Test with locale 'fe' -> 'fr'
Modify Frontend translation functionality
…body" This reverts commit c55cdc7.
@robguthrie Take a look whenever you get a chance. Thanks! |
Sorry I've taken so long to review this. Will run and test it tomorrow. |
Hey, It is done if it applies only to comments. I’ve tested it locally with multiple users, and everything is working smoothly. Note: Translations for other languages are not included. Here’s a quick demo: Video Link |
config/locales/client.en.yml
Outdated
@@ -714,6 +718,7 @@ en: | |||
user_added_to_group: "%{actor} added you to the group: %{title}" | |||
user_mentioned: "%{actor} mentioned you in: %{title}" | |||
user_reminded: "%{actor} is reminding you to vote in: %{title}" | |||
comment_announced: "%{actor} mentioned you in: %{title}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be more specific. What do you think about having two messages:
"%{actor} notified everyone in the group" and
"%{actor} notified everyone in the thread"
Ok, I've given this a test run. It looks really promising! Well done. I notice that you need to type @discussion to mention everyone in the thread.. The Loomio term is "thread" so I think it would make sense to use that as the keyword. Also when I check the "Notified" button I see this: I'll look more closely at it and get back to you |
discussion -> thread in UI
…otification_serializer
I missed the notification part during implementation, it has been added in the latest commits. Also, the UI now uses @thread instead of @discussion. |
Wow. It's really coming together now. There are two last things that need some attention.. Permissions. Frontend: Backend: To be secure we also need to authorize this on the back end. You can see an example of this here: https://github.com/loomio/loomio/blob/master/app/extras/user_inviter.rb#L72 So you can call Education: |
Will do! Thanks!
…On Sun, Oct 13, 2024 at 9:59 PM Jerin ***@***.***> wrote:
Hey, I have made the necessary changes. Also, I used user.ability.authorize!
:notify, group instead of user.ability.authorize! :announce, group. Let
me know if it works.
Screenshot.2024-10-13.at.12.58.25.PM.png (view on web)
<https://github.com/user-attachments/assets/dfd7ba2b-5a9b-46d6-8377-ef39bce29fa1> Screenshot.2024-10-13.at.12.42.20.PM.png
(view on web)
<https://github.com/user-attachments/assets/7c36a52e-021d-4af9-9780-febf86acc685>
—
Reply to this email directly, view it on GitHub
<#10934 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADWXX36CAC7EFUTCVU6ZUTZ3IZALAVCNFSM6AAAAABKJNGPNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYHA4TCNJXHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Mentioning @discussion in the comment will notify all members of the discussion.
Mentioning @group in the comment will notify all members of the group.
Closes #8148