Render URLs and DOIs in dataset names and descriptions as links - #211
Merged
Conversation
Dataset names and descriptions often cite a publication as a bare URL
("...available at https://doi.org/10.1021/jacs.6c05959.") or a bare DOI
("Reactions from Figure 1 of DOI: 10.1021/jacs.8b01523"), neither of
which was clickable in the browse table or its details modal.
LinkedText renders free text with those references as links: http(s)
URLs, bare www. hosts, and bare DOIs (linked through doi.org). Trailing
punctuation is left out of the link, so a sentence-ending period or a
closing paren from the surrounding prose doesn't end up in the href,
while a bracket the link itself opened is kept.
Verified against every dataset description in ord-data: 30 distinct
links, with the rendered text byte-identical to the input in all cases.
Two descriptions there are missing a space after the reference
(ord_dataset-ac78456835404910b3a4c840248b6ac9 and
ord_dataset-d319c2a22ecf4ce59db1a18ae71d529c), so the link absorbs the
next word; any heuristic that splits those also breaks legitimate
mixed-case DOIs like 10.48550/arXiv.2506.07619, so they need fixing
upstream.
Also bumps the footer copyright year.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Covers the reference styles seen in ord-data: URLs, bare hosts, bare DOIs with and without a prefix, a DOI inside a doi.org URL, trailing sentence punctuation, and brackets the link did or didn't open. Vitest renders the component with react-dom/server, so no DOM environment is needed; the tests run as part of the JavaScript checks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
npm ci installs only what the lock file names, so on Linux the rollup native binary was missing and any command that loads rollup (vitest) failed with "Cannot find module '@rollup/rollup-linux-x64-gnu'". Regenerating the lock adds the per-platform optional dependencies for rollup, esbuild, and @parcel/watcher. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Dataset names and descriptions routinely cite a publication, but the reference was plain text everywhere it appeared. This makes it clickable in the browse table (Name and Description columns) and in the dataset details modal.
LinkedTexthandles the reference styles that actually occur inord-data:http(s)://…URLs and barewww.hosts10.1021/jacs.8b01523, with or without aDOI:/doi:prefix — linked throughdoi.orgdoi.orgURL stays part of the URL rather than matching twiceTrailing punctuation is left out of the link, so
…available at https://doi.org/10.1021/jacs.6c05959.doesn't swallow the period and(DOI: 10.15227/orgsyn.095.0080)drops the paren, while a link that opened its own bracket (…/Foo_(bar)) keeps it. Links open in a new tab withrel="noopener noreferrer".Tests
This adds the first JavaScript tests in the repo:
vitestrenders the component withreact-dom/server, so no DOM environment (jsdom, testing-library) is needed.npm testruns them, and thecheck_javascriptjob now runs it alongside prettier.The cases come from real
ord-datatext: URLs, bare hosts, bare DOIs with and without a prefix, a DOI inside adoi.orgURL, trailing sentence punctuation, and brackets the link did or didn't open.Verification
Checked against every dataset description available in
ord-data(via the parquet metadata): 30 distinct links, all correct, with the rendered text byte-identical to the input in every case. Exercised end to end against the local stack (ORD_INTERFACE_TESTING=TRUEbackend + Vite) in headless Chrome — the bundled test datasets cover both a bare URL and a bare DOI.Two descriptions in
ord-dataare missing a space after the reference, so the link absorbs the following word:ord_dataset-ac78456835404910b3a4c840248b6ac9—https://doi.org/10.1021/acs.accounts.0c00760Data from Figure S12…ord_dataset-d319c2a22ecf4ce59db1a18ae71d529c—doi: 10.1039/c5sc04751jThis palladium catalyzed…Any heuristic that splits those also breaks legitimate mixed-case DOIs such as
10.48550/arXiv.2506.07619, so the fix belongs upstream in the data.Also bumps the footer copyright year to 2026.
🤖 Generated with Claude Code
Greptile Summary
Adds automatic URL and DOI linking to dataset names and descriptions.
LinkedTextcomponent with punctuation-aware link parsing and styling.Confidence Score: 5/5
The PR appears safe to merge because no blocking failures eligible for this follow-up review remain.
No blocking failure remains.
Important Files Changed
Reviews (3): Last reviewed commit: "Record optional platform packages in pac..." | Re-trigger Greptile