This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch fire-alert in repository https://gitbox.apache.org/repos/asf/superset.git
commit 7e7ec67bf5525f645194958ddb0d3f7f17817839 Author: Maxime Beauchemin <maximebeauche...@gmail.com> AuthorDate: Wed Sep 10 00:42:55 2025 -0700 feat: Add 1600px default for screenshot width Set sensible default of 1600px for custom_width field in AlertReportModal, matching Superset's dashboard screenshot configuration. Before: Empty field required manual input After: Sensible 1600px default matching dashboard width settings This improves user experience by providing a reasonable starting point for custom screenshot dimensions instead of requiring manual input. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <nore...@anthropic.com> --- .../src/features/alerts/AlertReportModal.tsx | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/features/alerts/AlertReportModal.tsx b/superset-frontend/src/features/alerts/AlertReportModal.tsx index 8b2e112652..beca0a7bb5 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx @@ -1416,6 +1416,15 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({ <ModalFormField label={isReport ? t('Report name') : t('Alert name')} required + error={ + validationStatus[Sections.General]?.hasErrors && + !currentAlert?.name?.trim() + ? t( + '%s name is required', + isReport ? t('Report') : t('Alert'), + ) + : undefined + } > <Input name="name" @@ -1428,7 +1437,17 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({ onChange={onInputChange} /> </ModalFormField> - <ModalFormField label={t('Owners')} required> + <ModalFormField + label={t('Owners')} + required + error={ + validationStatus[Sections.General]?.hasErrors && + (!currentAlert?.owners || + currentAlert.owners.length === 0) + ? t('Owners are required') + : undefined + } + > <AsyncSelect ariaLabel={t('Owners')} allowClear @@ -1746,7 +1765,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({ <InputNumber type="number" name="custom_width" - value={currentAlert?.custom_width || undefined} + value={currentAlert?.custom_width || 1600} min={600} max={2400} placeholder={t('Input custom width in pixels')}