Skip to content
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

Adding bibliography/bibref elements to indexers and catalog views #1505

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

randalldfloyd
Copy link
Contributor

@randalldfloyd randalldfloyd commented Dec 18, 2023

Closes #1458

Adding missing bibliography elements from collection and component indexers, and also to catalog views.

Per feedback on #1458, this solution skips over potentially elaborate bibliography text and just creates lists from child bibref elements instead. It also scopes them to occurrences within bibliography elements only, versus the many places they can technically exist outside of them.

@randalldfloyd randalldfloyd force-pushed the 1458-bibliography branch 2 times, most recently from f250c71 to f214f77 Compare December 18, 2023 18:37
@randalldfloyd randalldfloyd marked this pull request as ready for review December 18, 2023 18:52
Copy link
Contributor

@seanaery seanaery left a comment

Choose a reason for hiding this comment

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

This is close but it looks like it is not rendering the italic formatting despite using the render_html_tags helper. A couple recommended revisions to that end:

  • All the fields that we're indexing where we're retaining the EAD tags for transformation to HTML should have a _html_tesm suffix, so this should be bibref_html_tesm. To keep the tags in there, the traject rule also needs to_text: false (else it will strip all tags and just keep the text).

@randalldfloyd
Copy link
Contributor Author

Thanks @seanaery , I never really knew how those html fields worked, so that was a good opportunity to figure that out.

After reworking indexing to preserve html, they are displaying correctly and passing refactored tests. The italic sections are now being rendered with <em> as they should. But I wonder if you can help me figure out how to get line breaks in between the element instances, as they are all just being rendered in one line within the <dd>:

Screenshot from 2023-12-19 10-36-20

At first I thought they were being stashed as one value in the Solr field, but I verified that they are each in an array element:

["<bibref>\n        <title render=\"italic\">Medical society annual.</title>2008\n      </bibref>", 
"<bibref>\n        <title render=\"italic\">Medical society annual.</title>2009\n      </bibref>"]

I would have thought that just being multi-valued would be enough to ensure they are rendered on separate lines. Normally I would figure it out for myself, but I'm technically off this week so any shortcuts you could point me to would be great.

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.

Display bibliography at collection and component levels
2 participants