Skip to content

Show more filetypes in "Download files" sidebar - #244

Merged
phargogh merged 1 commit into
masterfrom
displayed-filetypes
Jul 31, 2026
Merged

Show more filetypes in "Download files" sidebar#244
phargogh merged 1 commit into
masterfrom
displayed-filetypes

Conversation

@megannissel

Copy link
Copy Markdown
Contributor

Jesse and I noticed yesterday that the PDF README for the Colombia 3Ps package wasn't listed in the dataset's "Download files" sidebar. Jesse then also noticed .xlsx and .html files included in that package aren't listed, either.

When we have a package like 3Ps Colombia, there are only two Resources: the top-level .zip.yml and the top-level .zip. What files are listed in the sidebar depends upon the dataset's sources list and the shown_extensions list in helpers.py. I've expanded this list (as well as two lists we use for labels in various places) to include .pdf, .html, .xlsx, and .gpkg (because I noticed this one was also missing), which should address the problem. Also added icons for .html and .gpkg, as we didn't have those before.

I don't love that we essentially have three lists with similar-but-subtly-different functionality; this feels like a less than ideal pattern for long-term maintenance. We may want to consider reworking this logic in the future. But for now, this should address the immediate concern.

@megannissel
megannissel requested a review from phargogh July 31, 2026 14:10
labels = {
'csv': 'CSV',
'geojson': 'GeoJSON',
'tif': 'GeoTIFF',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I alphabetized these lists while I was here, to make them a bit easier to scan.

@phargogh phargogh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @megannissel !

@phargogh
phargogh merged commit 62eb8ad into master Jul 31, 2026
1 check 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.

2 participants