-
Notifications
You must be signed in to change notification settings - Fork 44
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
improve the recape email design #10195
Conversation
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.
FE code looks good to me, didnt test it tho
packages/commonwealth/client/scripts/views/pages/UnSubscribePage/UnSubscribePage.tsx
Outdated
Show resolved
Hide resolved
… into kaleemNeslit.10139.recap_email
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.
Nice first foray into the backend! Left a few comments about things that you couldn't be expected to know since they are mainly "domain" knowledge about our system. Let me know if you want to huddle for better explanations.
Will test once we resolve all the issues.
packages/commonwealth/client/scripts/views/pages/UnSubscribePage/UnSubscribePage.tsx
Outdated
Show resolved
Hide resolved
Hi @Rotorsoft, Could you please guide me on how to address these failures? Any pointers or suggestions would be greatly appreciated. |
packages/commonwealth/client/scripts/views/pages/UnSubscribePage/UnSubscribePage.tsx
Outdated
Show resolved
Hide resolved
packages/commonwealth/client/scripts/views/pages/UnSubscribePage/UnSubscribePage.tsx
Outdated
Show resolved
Hide resolved
packages/commonwealth/server/migrations/20241211135155-add-unsubscribe-uuid-to-user.js
Show resolved
Hide resolved
… into kaleemNeslit.10139.recap_email
… into kaleemNeslit.10139.recap_email
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.
Lets update UnSubscribeEmail
to UnsubscribeEmail
everywhere (no need for S capitalization).
Also please merge master into this branch - this may help resolve the unit test issues.
… into kaleemNeslit.10139.recap_email
@timolegros still unit test is failing for me |
… into kaleemNeslit.10139.recap_email
… into kaleemNeslit.10139.recap_email
… into kaleemNeslit.10139.recap_email
… into kaleemNeslit.10139.recap_email
… into kaleemNeslit.10139.recap_email
…icommonwealth/commonwealth into kaleemNeslit.10139.recap_email
Just fix conflict + build + the small pending change and then good to merge. |
… into kaleemNeslit.10139.recap_email
Link to Issue
Closes: #10139
Description of Changes
**Backend **
-command are unSecure as user maynot be login when unsubscribe the emails
-Updated the
email_notifications_enabled
key|Filed frommodels.SubscriptionPreference
-update the
[GetRecapEmailData.query.ts]
also sending the user email_notifications_enabled Preference in response-added the new condition in Know workflow for email_notifications_enabled
"How We Fixed It"
**Backend **
-command are unSecure as user maynot be login when unsubscribe the emails
-Updated the
email_notifications_enabled
key|Filed frommodels.SubscriptionPreference
-update the
[GetRecapEmailData.query.ts]
also sending the user email_notifications_enabled Preference in response-added the new condition in Know workflow for email_notifications_enabled
**Notes **
Currently every user has email_notifications_enabled false in DB maybe we need to update that to
true
Test Plan
pnpm -F commonwealth start
Run RabbitMQ in Docker
pnpm -F commonwealth start-message-relayer
pnpm -F commonwealth start-knock
Use 2 accounts to trigger thread/comment notifications
Use pnpm -F commonwealth emit-event snapshot to emit snapshot notifications
Trigger the Workflow:
Select the Email Recap workflow
Click Run a test in the top right
Select a recipient (same user ID as the user who received all the triggered notifications above)
Leave all other fields empty and hit Run test
Note that the Email Recap workflow has a condition where the email will not be sent if there are 5 or fewer notifications i.e. you need to trigger 6 notifications or the email will not be sent.
To test in development you will need to run ngrok and then update the common_api_url variable on Knock. You also need to ensure that the KNOCK_AUTH_TOKEN variable on Knock matches your local .env.
here is tested SC