NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 27 forks source link

improve citation display to support multiple styles #973

Open mbjones opened 5 years ago

mbjones commented 5 years ago

Our landing pages could include better formatted citations in multiple formats. This is related to #777 that @rushirajnenuji is working on, as well as the request to fix bibliographic links in #902, and the ESS-DIVE modified citation view in #567 . DataCite has a really nice modal on their landing pages that shows citations in multiple formats (APA, MLS, IEEE) and provides the Bibtex and RIS exports. See my KNB Dataset for an example.

Screen Shot 2019-06-15 at 2 03 39 PM

Their page also provides the correct metadata in the page so the Zotero links work properly and one can automatically import the citation into Zotero and other bibliographic tools.

The system seems pretty simple, and might be easily adapted for ours. Here's the javascript that updates their modal: https://search.datacite.org/javascripts/citebox.js It uses their DOI citation service.

@laurenwalker Let's discuss an approach to this for our landing pages.

laurenwalker commented 5 years ago

This seems like a very doable idea, along with making the citation format configurable in the app settings so that ESS-DIVE doesn't have to overload the CitationView.render() function.

We could change the Copy citation button on the dataset landing pages from a regular button to a button dropdown, where the dropdown menu can say something like Other citation options. When that is clicked on, that modal appears.

Button idea:

Screen Shot 2019-06-17 at 1 14 02 PM
rushirajnenuji commented 5 years ago

@mbjones and @laurenwalker - thanks for the issue write up and for creating the mock-up. I like the dropdown approach and I'm happy to start working on it.

It seems like this is the good time to implement this feature - as I am working on developing the exact same citation view for the EZID UI (to support multiple citation formats).

datadavev commented 4 years ago

Would be great if the citation data were provided in json and rendered by applying a preferred CSL, for which JS libraries are available, e.g. https://citation.js.org/

May be more generalized that what you're looking for though.

mbjones commented 4 years ago

Thanks, Dave. In reading that, I see they also provide a Showdown plugin, which might work with our Markdown implementation: https://github.com/citation-js/integration-showdown

laurenwalker commented 4 years ago

Bumping this up to the "Next" pipeline since this was requested as a priority by ESS-DIVE recently - the Bibtex format, in particular

mbjones commented 3 years ago

@laurenwalker this issue arose again when discussing an Arctic Data Center citation. Any status on its incorporation? When it is, I think we should consider using an indexed 'publisher' field (which @laijasmine is going to submit) for the publisher if it exists, and if not then fall back on using the repository. This might all happen in the code that gathers the citation metadata rather than this rendering library per se, but I thought it would be good to mention it for the ADC and ESS-DIVE use cases of changing the publisher that is shown.

laurenwalker commented 3 years ago

@laurenwalker this issue arose again when discussing an Arctic Data Center citation. Any status on its incorporation?

It's not currently in the immediate pipeline for release, but is marked as a priority. It was originally going to be completed by Rushiraj but his time ran out on the Make Data Count project before he could get started.

amoeba commented 3 years ago

This came up today after seeing a paper cite some ADC data and cite with a mix of MetacatUI URLs (https://arcticdata.io/catalog/view/doi:...) and DOI URLs (preferred). I don't think we're ever going to stop people from citing MetacatUI or other service URLs because that's just what's in their address bar but I think we can improve things at least a bit.

In addition letting the user pick multiple citation styles, we could also show a "How to link this dataset" section with a note on why one URL might be preferred over another. This could also be entirely separate UI widget from what we're talking about here.

For reference, here's figshare's "Cite" button:

Screen Shot 2021-04-28 at 12 49 35 PM
robyngit commented 1 year ago

Some work was completed toward this issue in PR #2095. In particular, note that we now have a CitationModalView (see 42017f064a43038ae9ee714f286f38500fd8b49b), and configurable "styles" in the CitationView.

Would be great if the citation data were provided in json and rendered by applying a preferred CSL, for which JS libraries are available, e.g. https://citation.js.org/

I see they also provide a Showdown plugin, which might work with our Markdown implementation: https://github.com/citation-js/integration-showdown

We are already using this plugin along with the citation.js library for rendering a bibliography in MarkdownViews.

However, we are currently using citation.js version 0.4.0 (see src/components/citation.js and src/components/citation.min.js), while citation.js is on to version 0.6.7 now. We also edited our version manually because of a conflict with the global require variable (see https://github.com/NCEAS/metacatui/commit/663b0814c6ea33eff0d4f242d3ea00611c7783b3).

I think the first step in implementing this view should be to update citation.js and see if there is a better way to handle the require conflict, if it still exists.

I also want to highlight this point to make sure it isn't lost in the comments

... making the citation format configurable in the app settings so that ESS-DIVE doesn't have to overload the CitationView.render() function.

See #567

iannesbitt commented 1 year ago

Bumping this thread as it was discussed as part of the DRP project meeting earlier this past week. Adding full functionality as displayed above will be especially important to the PIs on the project as they come from vastly different backgrounds and academic fields (geospatial, archaeological, materials science, etc.) all with different citation standards. What is the estimated workload required for implementing this feature?

robyngit commented 1 year ago

@iannesbitt, a big chunk of the work required to implement this feature was completed in PR #2095 (waiting for review). Here's what's left:

  1. Update our version of citation.js
  2. Handle the require conflict without manually editing the library (see the comment above)
  3. Test to make sure that citations in the markdown view still render as expected
  4. Adapt the CitationView to render citations based on styles available in the citation.js library, rather than those we defined in the view. This might require adding a method to the CitationModel that gives that citation data in whatever format is expected by citation.js.
  5. Ensure that the CitationHeaderView (an extension of the CitationView) is not impacted by these changes, adapt as necessary
  6. In the CitationModalView, add functionality for switching between citation types.
  7. Make the default citation style, as well as the citation style options available in the CitationModalView, configurable in the AppModel.

Step 4 will probably take the most time, but step 2 could end up being complex or tricky to figure out.

robyngit commented 1 year ago

Notes from slack conversation about citation styles: