Skip to content

Add how to cite for datasets#1216

Merged
adkinsrs merged 5 commits intodevelfrom
398-add-how-to-cite-for-any-dataset-2
Mar 17, 2026
Merged

Add how to cite for datasets#1216
adkinsrs merged 5 commits intodevelfrom
398-add-how-to-cite-for-any-dataset-2

Conversation

@cedrichotopp
Copy link
Copy Markdown
Contributor

Added a module to build an APA citation for a dataset which is used when a citation cannot be fetched.
Added a button to the tile grid that opens a modal containing the citation data which can be easily copied.

@cedrichotopp cedrichotopp requested a review from adkinsrs March 12, 2026 18:25
Comment thread www/cgi/get_citation_from_pubmed_id.cgi Outdated
Comment thread www/js/classes/tilegrid.js Outdated
Comment thread www/js/classes/tilegrid.js
Copy link
Copy Markdown
Member

@adkinsrs adkinsrs left a comment

Choose a reason for hiding this comment

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

Everything looks good so far. Still need to run the actual testing of the codebase. I did make a couple minor comments though.

Fixes #398 rmv module + change default citation to apa
@adkinsrs
Copy link
Copy Markdown
Member

adkinsrs commented Mar 12, 2026

Couple of notes:

  1. I noticed the citation display box still allows for the user to select between 4 options. While it does work, along with the copy, we discussed last week just limiting it to APA citation format only just to keep things simple.

  2. I tested two datasets I uploaded myself that did not have a Pubmed ID asssociated. For both of those, I got the following JS stacktrace

citation.js:34 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at citation.js:34:40
    at Array.map (<anonymous>)
    at Citation.APA (citation.js:32:27)
    at HTMLAnchorElement.<anonymous> (tilegrid.js:903:48)

It seems this should have been routed through the gEAR route instead of the APA route. For both of these entries I do have my own name as the "contact author" so that should have at least been populated in the "authors" parameter. Since I provide you with limited datasets, all of which probably have Pubmed IDs associated, I recommended temporarily rewiring the code to treat them as if the Pubmed ID was missing for now, so you can properly test that route.

@adkinsrs adkinsrs merged commit 78f4101 into devel Mar 17, 2026
@adkinsrs adkinsrs deleted the 398-add-how-to-cite-for-any-dataset-2 branch March 26, 2026 12:51
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