puridach-w commented on code in PR #26327:
URL: https://github.com/apache/superset/pull/26327#discussion_r1501568073


##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1160,6 +1167,18 @@ const AlertReportModal: 
FunctionComponent<AlertReportModalProps> = ({
     setIsHidden(false);
   }
 
+  const updateEmailSubject = () => {
+    if (contentType === 'chart') {
+      setEmailSubject(
+        `${currentAlert?.name}: ${currentAlert?.chart?.label || ''}`,
+      );
+    } else {
+      setEmailSubject(
+        `${currentAlert?.name}: ${currentAlert?.dashboard?.label || ''}`,
+      );
+    }

Review Comment:
   Ping @eschutho @yousoph, What are your thoughts on reverting to displaying 
the default value in the placeholder? This way, users can easily revert to the 
default if they accidentally delete the email_subject. For example, if we make 
the "email_subject" field a required field and the user deletes it, it could be 
harder for them to restore the default value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to