Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"errors": "errors",
"noErrors": "No errors",
"noWarnings": "No warnings",
"noInfoNotices": "No info notices",
"warnings": "warnings",
"infoNotices": "info notices"
},
Expand Down Expand Up @@ -266,6 +267,8 @@
"datasetHistoryColumns": {
"downloadedAt": "Downloaded At",
"serviceDateRange": "Service Date Range",
"sizeZipped": "Size Zipped (MB)",
"sizeUnzipped": "Size Unzipped (MB)",
"validationReport": "Validation Report",
"actions": "Actions"
},
Expand Down
3 changes: 3 additions & 0 deletions messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"errors": "errors",
"noErrors": "No errors",
"noWarnings": "No warnings",
"noInfoNotices": "Aucune notice d'information",
"warnings": "warnings",
"infoNotices": "info notices"
},
Expand Down Expand Up @@ -266,6 +267,8 @@
"datasetHistoryColumns": {
"downloadedAt": "Téléchargé le",
"serviceDateRange": "Plage de dates de service",
"sizeZipped": "Taille compressée (Mo)",
"sizeUnzipped": "Taille décompressée (Mo)",
"validationReport": "Rapport de validation",
"actions": "Actions"
},
Expand Down
23 changes: 18 additions & 5 deletions src/app/screens/Feed/components/DataQualitySummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,29 @@ export default async function DataQualitySummary({

<Chip
data-testid='info-count'
icon={<InfoOutlinedIcon />}
icon={
(latestDataset?.validation_report?.unique_info_count ?? 0) >
0 ? (
<InfoOutlinedIcon />
) : (
<CheckCircle />
)
}
clickable
component='a'
href={latestDataset?.validation_report?.url_html}
target='_blank'
rel='noopener noreferrer nofollow'
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validation_report.url_html is optional in the generated types, but this chip is always rendered as a clickable anchor. If url_html is missing, the anchor will have no valid destination (and may still look interactive). Consider guarding on url_html before rendering a link chip, or render a non-clickable/disabled chip when the URL is absent.

Copilot uses AI. Check for mistakes.
label={`${
latestDataset?.validation_report?.unique_info_count ?? '0'
} ${tCommon('feedback.infoNotices')}`}
color='primary'
label={
(latestDataset?.validation_report?.unique_info_count ?? 0) > 0
? `${latestDataset?.validation_report?.unique_info_count} ${tCommon('feedback.infoNotices')}`
: tCommon('feedback.noInfoNotices')
}
color={
(latestDataset?.validation_report?.unique_info_count ?? 0) > 0
? 'primary'
: 'success'
}
variant='outlined'
/>
</>
Expand Down
280 changes: 191 additions & 89 deletions src/app/screens/Feed/components/PreviousDatasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,22 @@ export default function PreviousDatasets({
>
{t('datasetHistoryColumns.serviceDateRange')}
</TableCell>
<TableCell
component='th'
scope='col'
sx={{ fontWeight: 'bold' }}
align='right'
>
{t('datasetHistoryColumns.sizeZipped')}
</TableCell>
<TableCell
component='th'
scope='col'
sx={{ fontWeight: 'bold' }}
align='right'
>
{t('datasetHistoryColumns.sizeUnzipped')}
</TableCell>
<TableCell
component='th'
scope='col'
Expand Down Expand Up @@ -216,6 +232,20 @@ export default function PreviousDatasets({
</Box>
)}
</TableCell>
<TableCell align='right'>
<Typography variant='body1'>
{dataset?.zipped_folder_size_mb != null
? dataset.zipped_folder_size_mb
: '–'}
</Typography>
</TableCell>
<TableCell align='right'>
<Typography variant='body1'>
{dataset?.unzipped_folder_size_mb != null
? dataset.unzipped_folder_size_mb
: '–'}
</Typography>
</TableCell>
<TableCell sx={{ textAlign: { xs: 'left', xl: 'center' } }}>
{dataset.validation_report == null && (
<Typography sx={{ ml: '4px' }}>
Expand All @@ -224,106 +254,178 @@ export default function PreviousDatasets({
)}
{dataset.validation_report != null && (
<>
<Chip
component='a'
clickable
href={`${dataset?.validation_report?.url_html}`}
target='_blank'
rel='noreferrer nofollow'
sx={{ m: '4px' }}
icon={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count >
0 ? (
<ReportOutlined aria-hidden />
) : (
<CheckCircle aria-hidden />
)
}
label={
<Tooltip
title={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count > 0
? `${
dataset?.validation_report?.unique_error_count
} ${tCommon('feedback.errors')}`
? `${dataset.validation_report.unique_error_count} ${tCommon('feedback.errors')}`
: tCommon('feedback.noErrors')
}
aria-label={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count > 0
? `${dataset.validation_report.unique_error_count} ${tCommon('feedback.errors')} – ${t('datasetHistoryTooltip.viewReport')}`
: `${tCommon('feedback.noErrors')} – ${t('datasetHistoryTooltip.viewReport')}`
}
color={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count > 0
? 'error'
: 'success'
}
variant='outlined'
/>
<Chip
sx={{ m: '4px' }}
component='a'
clickable
href={`${dataset?.validation_report?.url_html}`}
target='_blank'
rel='noreferrer nofollow'
icon={
dataset?.validation_report?.unique_warning_count !=
undefined &&
dataset?.validation_report?.unique_warning_count >
0 ? (
<ReportOutlined aria-hidden />
) : (
<CheckCircle aria-hidden />
)
}
label={
dataset?.validation_report?.unique_warning_count !=
undefined &&
dataset?.validation_report?.unique_warning_count > 0
? `${
placement='top'
>
<Chip
component='a'
clickable
href={`${dataset?.validation_report?.url_html}`}
Comment thread
Alessandro100 marked this conversation as resolved.
Outdated
target='_blank'
rel='noreferrer nofollow'
sx={{
m: '4px',
'.MuiChip-label': {
pr:
dataset?.validation_report
?.unique_warning_count
} ${tCommon('feedback.warnings')}`
: tCommon('feedback.noWarnings')
}
aria-label={
?.unique_error_count === 0
? 0
: undefined,
},
}}
icon={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count >
0 ? (
<ReportOutlined aria-hidden />
) : (
<CheckCircle aria-hidden />
)
}
label={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count > 0
? dataset.validation_report.unique_error_count
: undefined
}
aria-label={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count > 0
? `${dataset.validation_report.unique_error_count} ${tCommon('feedback.errors')} – ${t('datasetHistoryTooltip.viewReport')}`
: `${tCommon('feedback.noErrors')} – ${t('datasetHistoryTooltip.viewReport')}`
}
color={
dataset?.validation_report?.unique_error_count !=
undefined &&
dataset?.validation_report?.unique_error_count > 0
? 'error'
: 'success'
}
variant='outlined'
/>
</Tooltip>
<Tooltip
title={
dataset?.validation_report?.unique_warning_count !=
undefined &&
dataset?.validation_report?.unique_warning_count > 0
? `${dataset.validation_report.unique_warning_count} ${tCommon('feedback.warnings')} – ${t('datasetHistoryTooltip.viewReport')}`
: `${tCommon('feedback.noWarnings')} – ${t('datasetHistoryTooltip.viewReport')}`
? `${dataset.validation_report.unique_warning_count} ${tCommon('feedback.warnings')}`
: tCommon('feedback.noWarnings')
}
color={
dataset?.validation_report?.unique_warning_count !=
undefined &&
dataset?.validation_report?.unique_warning_count > 0
? 'warning'
: 'success'
placement='top'
>
<Chip
sx={{
m: '4px',
'.MuiChip-label': {
pr:
dataset?.validation_report
?.unique_warning_count === 0
? 0
: undefined,
},
}}
component='a'
clickable
href={`${dataset?.validation_report?.url_html}`}
target='_blank'
rel='noreferrer nofollow'
icon={
dataset?.validation_report
?.unique_warning_count != undefined &&
dataset?.validation_report?.unique_warning_count >
0 ? (
<ReportOutlined aria-hidden />
) : (
<CheckCircle aria-hidden />
)
}
label={
dataset?.validation_report
?.unique_warning_count != undefined &&
dataset?.validation_report?.unique_warning_count >
0
? dataset.validation_report.unique_warning_count
: undefined
}
aria-label={
dataset?.validation_report
?.unique_warning_count != undefined &&
dataset?.validation_report?.unique_warning_count >
0
? `${dataset.validation_report.unique_warning_count} ${tCommon('feedback.warnings')} – ${t('datasetHistoryTooltip.viewReport')}`
: `${tCommon('feedback.noWarnings')} – ${t('datasetHistoryTooltip.viewReport')}`
}
color={
dataset?.validation_report
?.unique_warning_count != undefined &&
dataset?.validation_report?.unique_warning_count >
0
? 'warning'
: 'success'
}
variant='outlined'
/>
</Tooltip>
<Tooltip
title={
(dataset?.validation_report?.unique_info_count ??
0) > 0
? `${dataset?.validation_report?.unique_info_count} ${tCommon('feedback.infoNotices')}`
: tCommon('feedback.noInfoNotices')
}
variant='outlined'
/>
<Chip
sx={{ m: '4px' }}
component='a'
clickable
href={`${dataset?.validation_report?.url_html}`}
target='_blank'
rel='noreferrer nofollow'
icon={<InfoOutlinedIcon aria-hidden />}
label={`${
dataset?.validation_report?.unique_info_count ?? '0'
} ${tCommon('feedback.infoNotices')}`}
aria-label={`${dataset?.validation_report?.unique_info_count ?? '0'} ${tCommon('feedback.infoNotices')} – ${t('datasetHistoryTooltip.viewReport')}`}
color='primary'
variant='outlined'
/>
placement='top'
>
<Chip
sx={{
m: '4px',
'.MuiChip-label': {
pr:
(dataset?.validation_report
?.unique_info_count ?? 0) === 0
? 0
: undefined,
},
}}
component='a'
clickable
href={`${dataset?.validation_report?.url_html}`}
target='_blank'
rel='noreferrer nofollow'
icon={
(dataset?.validation_report?.unique_info_count ??
0) > 0 ? (
<InfoOutlinedIcon aria-hidden />
) : (
<CheckCircle aria-hidden />
)
}
label={
(dataset?.validation_report?.unique_info_count ??
0) > 0
? dataset?.validation_report?.unique_info_count
: undefined
}
aria-label={`${dataset?.validation_report?.unique_info_count ?? '0'} ${tCommon('feedback.infoNotices')} – ${t('datasetHistoryTooltip.viewReport')}`}
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the info-notices chip, the tooltip/visual state switches to "no info notices" when the count is 0, but the aria-label always announces "0 info notices – view report". For accessibility consistency (and to match the errors/warnings chips), make aria-label conditional so it announces the same "no info notices" message when the count is 0.

Suggested change
aria-label={`${dataset?.validation_report?.unique_info_count ?? '0'} ${tCommon('feedback.infoNotices')}${t('datasetHistoryTooltip.viewReport')}`}
aria-label={
(dataset?.validation_report?.unique_info_count ??
0) > 0
? `${dataset?.validation_report?.unique_info_count ?? '0'} ${tCommon('feedback.infoNotices')}${t('datasetHistoryTooltip.viewReport')}`
: t('datasetHistoryTooltip.noInfoNotices')
}

Copilot uses AI. Check for mistakes.
color={
(dataset?.validation_report?.unique_info_count ??
0) > 0
? 'primary'
: 'success'
}
variant='outlined'
/>
</Tooltip>
</>
)}
</TableCell>
Expand Down
Loading