-
Notifications
You must be signed in to change notification settings - Fork 84
Update DSR notification UX #7192
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
base: main
Are you sure you want to change the base?
Conversation
ENG-2303 Updates the privacy request error notification email template with new branding, improved copy, and enhanced UX in the notification configuration drawer.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile SummaryThis PR updates the DSR notification UX with improved branding and migrates the frontend from Chakra UI/Formik to Ant Design/React state. Key changes:
Critical issue:
Confidence Score: 3/5
Important Files Changed
|
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.
6 files reviewed, 2 comments
| useEffect(() => { | ||
| if (isOpen) { | ||
| setSkip(false); | ||
| // Reset to defaults when drawer opens | ||
| setEmails([]); | ||
| setNotify(false); | ||
| setMinErrorCount(DEFAULT_MIN_ERROR_COUNT); | ||
| } | ||
| if (data) { | ||
| setFormValues({ | ||
| emails: data.email_addresses, | ||
| notify: data.notify_after_failures !== 0, | ||
| minErrorCount: data.notify_after_failures, | ||
| }); | ||
| } | ||
| }, [data, isOpen]); | ||
| }, [isOpen]); |
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.
logic: Form doesn't load existing notification settings from API. The useEffect resets to defaults when drawer opens, but doesn't populate from data when it's available. This breaks the edit flow - users can't see/modify their current settings.
Previous code set form values from data:
if (data) {
setFormValues({
emails: data.email_addresses,
notify: data.notify_after_failures !== 0,
minErrorCount: data.notify_after_failures,
});
}Add similar logic to populate state from API response:
| useEffect(() => { | |
| if (isOpen) { | |
| setSkip(false); | |
| // Reset to defaults when drawer opens | |
| setEmails([]); | |
| setNotify(false); | |
| setMinErrorCount(DEFAULT_MIN_ERROR_COUNT); | |
| } | |
| if (data) { | |
| setFormValues({ | |
| emails: data.email_addresses, | |
| notify: data.notify_after_failures !== 0, | |
| minErrorCount: data.notify_after_failures, | |
| }); | |
| } | |
| }, [data, isOpen]); | |
| }, [isOpen]); | |
| useEffect(() => { | |
| if (isOpen) { | |
| setSkip(false); | |
| } | |
| if (data) { | |
| setEmails(data.email_addresses); | |
| setNotify(data.notify_after_failures !== 0); | |
| setMinErrorCount(data.notify_after_failures || DEFAULT_MIN_ERROR_COUNT); | |
| } | |
| }, [data, isOpen]); |
| </FormLabel> | ||
| </Form.Item> | ||
|
|
||
| <div> |
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.
style: Using div instead of semantic HTML. Per custom rules (ecc7d51f), avoid div elements when possible.
| <div> | |
| <Form.Item label="Notification settings"> |
Context Used: Rule from dashboard - Avoid using div elements when possible. Use semantic HTML elements or component library alternativ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
If you saved an email, then closed and reopened the tray, the email would disappear. this Fixes that.
|
@galvana There is technically a BE change here, cursor found a bug and updated it. If we don't want to include that we don't have to. LMK. |
ENG-2303
Updates the privacy request error notification email template with new branding, improved copy, and enhanced UX in the notification configuration drawer.
Ticket ENG-2303
Description Of Changes
Email Template (
privacy_request_error_notification.html)Code Changes
Backend (
message_dispatch_service.py)unsent_errorsvariable wasn't being passed to templateorganization_nameandcompany_logo_urlvariablesFrontend (
ConfigureAlerts.tsx)Email Input Component (
EmailChipList.tsx)Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works