Repository navigation
feat: build the tier 1 metadata dictionary as an xlsx download #3261 - #3279
Draft
MillenniumFalconMechanic wants to merge 3 commits into
Draft
MillenniumFalconMechanic wants to merge 3 commits into
MillenniumFalconMechanic wants to merge 3 commits into
Conversation
- Custom onTableDownload for the Tier 1 table writes one TSV row per field - Requirement column uses the chip's bionetwork-scoped label - UTF-8 byte order mark so Excel reads non-ASCII characters - Download button tracked in DataBiosphere/findable-ui#1143 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cc-claude-tools <cc-claude-tools@clevercanary.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
End-to-end verification remains pending the upstream download button release and required dependency bump.
No open issues 🎉
What changed in this PR
Adds TSV export support for the full Tier 1 metadata dictionary. The user-facing download action remains pending upstream integration.
Changes:
- Builds an 11-column TSV with a UTF-8 byte order mark.
- Configures Tier 1 table download handling.
- Reuses bionetwork-scoped requirement labels.
| File | Description |
|---|---|
viewModelBuilders/dataDictionaryMapper/tableOptions.ts |
Configures the Tier 1 download handler. |
viewModelBuilders/dataDictionaryMapper/tableDownload.ts |
Generates and downloads the dictionary TSV. |
components/DataDictionary/components/TableCell/components/FieldCell/utils.ts |
Exports the shared requirement-label helper. |
Review effort: Balanced
4 tasks
…3261 - Script writes public/downloads/hca-tier-1-metadata.xlsx from tier-1.json with exceljs - Columns follow the Adipose metadata sheet layout, one row per field - Runs in scripts/build.sh and npm run dev; the generated file is git-ignored - Replaces the browser-side TSV download Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cc-claude-tools <cc-claude-tools@clevercanary.com>
…3261 - Parse descriptions and allowed values with remark instead of regexes - Literal asterisks such as EGAX* are kept, and long emphasis is removed - Links keep their text, followed by the URL unless it points within the page - Tables are replaced by a link to the field's row in the dictionary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cc-claude-tools <cc-claude-tools@clevercanary.com>
This was referenced Oct 23, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #3261
What changed
At build time, a script reads the portal's
tier-1.jsonand usesexceljsto write a one-row-per-field XLSX, laid out like the Adipose metadata sheet, which the site serves as a static download.scripts/build-tier-1-metadata-xlsx.ts(new): writespublic/downloads/hca-tier-1-metadata.xlsx.buildRequiredLabel.remark-parse+remark-gfm, already dependencies). Links keep their text, followed by the URL in brackets unless it points within the page. The one table (inX; raw.X) is replaced by "(See the table at …)" with a link to that field in the live dictionary.scripts/build-tier-1-metadata-xlsx.sh(new): bundles the script with esbuild and pipes it into Node. Plain Node can't load findable-ui's extensionless imports.scripts/build.shand thedevscript inpackage.json: run the generator, so every build and everynpm run devproduces the file..gitignore: ignores the generatedpublic/downloads/.package.json: adds the dev dependenciesexceljs(build-time only, nothing ships to the browser) andesbuild(previously only a dependency ofesrun).tableDownload.tsand the Tier 1onTableDownloadtable options).Why
Users asked for a downloadable copy of the Tier 1 metadata dictionary to work with offline and share while preparing their data. A spreadsheet file, rather than TSV, lets us set column widths and a frozen header, and opens directly in Excel and Google Sheets.
Assumptions I made
next buildand served from/downloads/rather than created in the browser. Generating it fromtier-1.jsonon every build keeps it from drifting.https://data.humancellatlas.org/metadata/tier-1#<field>), including in files from dev builds.How to verify
npm ci && npm run dev. The console printsWrote public/downloads/hca-tier-1-metadata.xlsx (51 fields)before Next starts.ambient_count_correctionanddoublet_detection, "Required (Gut)" forradial_tissue_termand "Required (Adipose, Gut)" fordissociation_protocol. BioNetworks shows "ALL" for the other 47 fields.author_cell_type: "Encoding of author intuition of cellular annotation in the dataset. Use author_cell_type for original source datasets where cell_type_ontology_term_id is not available."library_id_repositorykeeps its wildcards: "EGAX*, GSM*, SRX*, ERX*".X; raw.Xcategorical values mentionscipy.sparse.csr_matrix (https://docs.scipy.org/…)and end with "(See the table at https://data.humancellatlas.org/metadata/tier-1#X-raw.X)".npm run build-prod:data-portalproducesout/downloads/hca-tier-1-metadata.xlsx./metadata/tier-1, the download control fetches this file.Definition of done from #3261:
tier-1.jsonsource, so it can't drift from the page → steps 1 and 6 (regenerated on every dev start and build)Screenshots
data-portal-3261-sample-hca-tier-1-metadata.xlsx: the generated file, for reviewers to open (no on-screen change to capture yet).data-portal-3261-sample-hca-tier-1-metadata.xlsx
🤖 Generated with Claude Code
🐦 Built with cc-claude-tools