-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
feat(notifications): adds approval notifications to the UI #29651
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,6 +10,7 @@ export type FineTuneField = { | |||||||||||||||||||
defaultFieldName?: string; | ||||||||||||||||||||
}; | ||||||||||||||||||||
|
||||||||||||||||||||
// TODO: clean up unused fields | ||||||||||||||||||||
export const ACCOUNT_NOTIFICATION_FIELDS: Record<string, FineTuneField> = { | ||||||||||||||||||||
alerts: { | ||||||||||||||||||||
title: 'Project Alerts', | ||||||||||||||||||||
|
@@ -69,7 +70,13 @@ export const ACCOUNT_NOTIFICATION_FIELDS: Record<string, FineTuneField> = { | |||||||||||||||||||
], | ||||||||||||||||||||
defaultFieldName: 'weeklyReports', | ||||||||||||||||||||
}, | ||||||||||||||||||||
|
||||||||||||||||||||
approval: { | ||||||||||||||||||||
title: t('Approvals'), | ||||||||||||||||||||
description: t('Notifications from teammates that require review or approval.'), | ||||||||||||||||||||
type: 'select', | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wouldn't this just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NisanthanNanthakumar Correct, it would be on or off. The issue is that we only use the sentry/static/app/views/settings/account/notifications/notificationSettingsByType.tsx Line 229 in 3433d51
It looks like we used to read all fields a change was made to basically bypass logic depending in the field: sentry/static/app/views/settings/account/accountNotificationFineTuning.tsx Lines 171 to 178 in 3433d51
Looks like a lot of the unused fields weren't cleaned up. We are looking at the options for some of these fields but not all of them. IMO this needs to be fixed because it was very confusing when the fields are treated differently from this file but you won't know until you look at other parts of the code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gonna put in another TODO for cleanup |
||||||||||||||||||||
// No choices here because it's going to have dynamic content | ||||||||||||||||||||
// Component will create choices, | ||||||||||||||||||||
}, | ||||||||||||||||||||
email: { | ||||||||||||||||||||
title: t('Email Routing'), | ||||||||||||||||||||
description: t( | ||||||||||||||||||||
|
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.
This will actually require a migration because it changes a DB constraint.
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.
@mgaeta good point...let me generate that, thanks!
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.
@mgaeta I am seeing:
Maybe we don't need migrations for this kind of change anymore?
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 hope so that would save a lot of time.