-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add citations for SCSB items #4427
Conversation
14b5621
to
ea75017
Compare
… different class since it's conflicting.
623adf3
to
bbea05f
Compare
|
||
class Orangelight::Document::CitationComponent < Blacklight::Document::CitationComponent | ||
DEFAULT_FORMATS = { | ||
'blacklight.citation.mla': :export_as_mla, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a custom routine for each citation form we want to support, correct? I like that this approach would route all types of records through the same routines. We definitely don't want some records to go through blacklight-marc and others to go through citeproc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the next step is to add the other citation formats. Right now if it's an Alma record it does use the Marc version, but we could change that once we've gotten the CiteProc code more refined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ticket to route all types of records through the same routines - #4428
- Moves shared CiteProc methods into their own module
8032f55
to
1c20768
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @maxkadel ! 🦄 I saw one very small thing in the Gemfile, the actual code looks great to me.
|
||
require 'rails_helper' | ||
|
||
RSpec.describe Blacklight::Document::Apa, citation: true do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo citation tag!
# frozen_string_literal: true | ||
|
||
# Creates an html APA citation for non-Marc records | ||
module Blacklight::Document::Apa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this structure with the 3 modules for the 3 citation styles
Co-authored-by: Jane Sandberg <sandbergja@users.noreply.github.com>
a649dbd
to
df3938c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! Thanks, @maxkadel 🦄
I think this PR delivers value, but there are some things I'd like help improving.
Connected to #4012
_citation_
fields so they are in the solr document at this point, but haven't succeeded yet. (See Reduce calls to Solr for CiteProc citations #4429 for follow-up ticket to resolve this)Probably a lot of the methods in Blacklight::Document::Mla can be a) Private and b) moved into an abstract method for other CiteProc citations (APA, Chicago)- doneFor some reason I can't get the author name to show up correctly with the comma between the family name and the given name. I've added a pending test for this issue.(I'm wondering if this is because of the combining accent in the example? - it does work correctly in development for SCSB-8953469) - I have created a fork that has a test, this seems to only affect names ending in decomposed accents. This is a bug in CiteProc - see https://github.com/pulibrary/citeproc/tree/names_with_final_accents