galterlibrary / primo-explore-devenv

A node.js , gulp based development enviornment for Primo's new UI customizations (css,images,html and javascript)
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Altmetrics Badge bug #30

Closed sharpattack closed 2 years ago

sharpattack commented 3 years ago

The side "tab" and section title disappears after the loading is completely finished. The badge does stick around though.

Meowcenary commented 2 years ago

I think I may have figured this out. Do we have any example records that were showing and then hiding the altmetrics component?

Here is one I just tested with on HSLV_TEST that seems to be working now: https://search.library.northwestern.edu/discovery/fulldisplay?docid=cdi_crossref_primary_10_1017_S0034670518000207&context=PC&vid=01NWU_INST:HSLV_TEST&lang=en&search_scope=MyInst_and_CI&adaptor=Primo%20Central&tab=Everything&query=any,contains,Dostoevsky%20and%20Education%20through%20Punishment&offset=0

Compare this to the same record on HSLV where the altmetrics badge does not show up.

Meowcenary commented 2 years ago

I've got this figured out finally.

Here is a test file you can view: https://search.library.northwestern.edu/discovery/fulldisplay?docid=cdi_crossref_primary_10_1017_S0034670518000207&context=PC&vid=01NWU_INST:HSLV_TEST&lang=en&search_scope=MyInst_and_CI&adaptor=Primo%20Central&tab=Everything&query=any,contains,Dostoevsky%20and%20Education%20through%20Punishment&offset=0

Meowcenary commented 2 years ago

Closing this with PR #34

Meowcenary commented 2 years ago

There's a small bug with this that @jpastva noticed. They suggested that the issue might be with the logic not checking if only the pubmed id or doi was present, but not both. I made the change for this and will put a PR up. I'm having trouble finding examples since I somehow lost the original email.