Skip to content

feat: display dataset size in table#87

Merged
Alessandro100 merged 2 commits intomainfrom
feat/81-dataset-unzipped-sizes
Mar 25, 2026
Merged

feat: display dataset size in table#87
Alessandro100 merged 2 commits intomainfrom
feat/81-dataset-unzipped-sizes

Conversation

@Alessandro100
Copy link
Contributor

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!

  • Run the unit tests with yarn test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)
Screenshot 2026-03-24 at 15 24 18 Screenshot 2026-03-24 at 15 25 33 Screenshot 2026-03-24 at 15 32 55 Screenshot 2026-03-24 at 15 41 46

NEW (before it would show info noticed 0 in blue)
Screenshot 2026-03-24 at 15 32 59

@Alessandro100 Alessandro100 requested a review from Copilot March 24, 2026 19:42
@Alessandro100 Alessandro100 self-assigned this Mar 24, 2026
@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mobilitydatabase-web Ready Ready Preview, Comment Mar 25, 2026 11:57am

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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')}`}
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.
Comment on lines 123 to 127
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.
@github-actions
Copy link

github-actions bot commented Mar 24, 2026

*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 96 🟢 96 🟢 100 🟢 100

*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 89 🟠 87 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🔴 40 🟢 94 🟢 96 🟢 100

*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 76 🟠 83 🟢 100 🟢 100

*Lighthouse ran on https://mobilitydatabase-bk0v3due4-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 79 🟢 94 🟢 96 🟢 100

@davidgamez
Copy link
Member

[suggestion]: To reduce blank spaces in the dataset list, we can combine both columns into one, something like this:

Header 1 Size Zipped / Unzipped(MB) Header 3
... 7.0 / 77 ...

Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

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

LGTM

@Alessandro100
Copy link
Contributor Author

[suggestion]: To reduce blank spaces in the dataset list, we can combine both columns into one, something like this:

Header 1 Size Zipped / Unzipped(MB) Header 3
... 7.0 / 77 ...

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

@Alessandro100 Alessandro100 merged commit c66f5d5 into main Mar 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display datasets unzipped and zipped sizes

3 participants