feat: display dataset size in table#87
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds additional dataset-size metadata to the Feed detail UI and refines how validation report counts are presented, improving the dataset history table readability. Applied skill: vercel-react-best-practices. (custom)
Changes:
- Add “Size Zipped” and “Size Unzipped” columns to the dataset history table.
- Update validation report chips to use tooltips/checkmarks for “0 warnings / 0 info notices” cases.
- Add new i18n strings for the new columns and “no info notices” messaging.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/app/screens/Feed/components/PreviousDatasets.tsx | Adds size columns and reworks validation report chips with tooltips/checkmark states. |
| src/app/screens/Feed/components/DataQualitySummary.tsx | Updates the info-notice chip to show a checkmark + “no info notices” state when count is zero. |
| messages/en.json | Adds new translation keys for size columns and “no info notices”. |
| messages/fr.json | Adds new translation keys for size columns and “no info notices”. |
| ? dataset?.validation_report?.unique_info_count | ||
| : undefined | ||
| } | ||
| aria-label={`${dataset?.validation_report?.unique_info_count ?? '0'} ${tCommon('feedback.infoNotices')} – ${t('datasetHistoryTooltip.viewReport')}`} |
There was a problem hiding this comment.
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.
| 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') | |
| } |
| clickable | ||
| component='a' | ||
| href={latestDataset?.validation_report?.url_html} | ||
| target='_blank' | ||
| rel='noopener noreferrer nofollow' |
There was a problem hiding this comment.
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.
|
*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|
|
[suggestion]: To reduce blank spaces in the dataset list, we can combine both columns into one, something like this:
|
For now since we have the space, having two columns creates better readability (especially that we have 2 decimal places). But if we are going to add more data on these rows, and need more space, we are going to merge them |
Summary:
closes #81
In the feed detail page, displays the dataset size zipped and not zipped
Also changes the dataset history table to remove the text for the validation report
Expected behavior:
You should be able to see the dataset zipped and unzipped size in MB in the feed detail page.
NEW: In the dataset history table, if there are 0 warnings or 0 info notices, it will now show a green checkmark
Testing tips:
Go on any gtfs schedule feed and check the table
Please make sure these boxes are checked before submitting your pull request - thanks!
yarn testto make sure you didn't break anythingNEW (before it would show info noticed 0 in blue)
