sadpandajoe commented on code in PR #40525:
URL: https://github.com/apache/superset/pull/40525#discussion_r3344757295
##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -2342,46 +2382,78 @@ const AlertReportModal:
FunctionComponent<AlertReportModalProps> = ({
{t('Select chart')}
<span className="required">*</span>
</div>
- <AsyncSelect
- ariaLabel={t('Chart')}
- name="chart"
- allowClear
- value={
- currentAlert?.chart?.label &&
- currentAlert?.chart?.value
- ? {
- value: currentAlert.chart.value,
- label: currentAlert.chart.label,
- }
- : undefined
- }
- options={loadChartOptions}
- onChange={onChartChange}
- placeholder={t('Select chart to use')}
- />
+ <div className="input-container select-with-open-btn">
+ <div>
+ <AsyncSelect
+ ariaLabel={t('Chart')}
+ name="chart"
+ allowClear
+ value={
+ currentAlert?.chart?.label &&
+ currentAlert?.chart?.value
+ ? {
+ value: currentAlert.chart.value,
+ label: currentAlert.chart.label,
+ }
+ : undefined
+ }
+ options={loadChartOptions}
+ onChange={onChartChange}
+ placeholder={t('Select chart to use')}
+ />
+ </div>
+ <div>
+ <Button
+ aria-label={t('Open chart in new tab')}
+ onClick={() =>
+ openChartInNewTab(currentAlert?.chart?.value)
+ }
+ icon={<Icons.LinkOutlined iconSize="s" />}
+ buttonSize="small"
+ disabled={!currentAlert?.chart?.value}
+ />
Review Comment:
We should add a tooltip for the button. Right now a user can see the button
but may not know what it's for.
--
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]