-
Notifications
You must be signed in to change notification settings - Fork 240
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: toggle run all notifications #1162
feat: toggle run all notifications #1162
Conversation
@@ -381,26 +381,32 @@ def run_data_doc(id): | |||
|
|||
|
|||
@register("/datadoc/<int:id>/run/", methods=["POST"]) | |||
def adhoc_run_data_doc(id): | |||
def adhoc_run_data_doc(id, sendNotification=True): |
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.
use camel casing send_notifications
also please default it as False
|
||
interface IProps { | ||
defaultNotification: boolean; | ||
handleNotificationChange: (notification: boolean) => void; |
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.
onNotificationChange
const [notification, setNotification] = useState(defaultNotification); | ||
|
||
const internalNotificationChange = useCallback( | ||
(value) => { |
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.
nit: (value: boolean) =>
onChange={internalNotificationChange} | ||
/> | ||
|
||
<span data-balloon-pos={'up'} className="ml4"> |
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.
data-balloon-pos={'up'}
but there is no tooltip to show?
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.
amazing!
* feat: toggle run all notifications * chore: rename var change default send notification * fix: rename all handleNotificationChange
* feat: toggle run all notifications * chore: rename var change default send notification * fix: rename all handleNotificationChange
Added a toggle to the run all confirmation page so that users can choose whether they want a notification to be sent upon run completion. By default, the notification and toggle will be enabled to match previous behavior of Querybook where a notification will always be sent to the user upon run completion. The type of notification sent is still based on "notification preference" in user settings.