Skip to content

Conversation

@JPrevost
Copy link
Member

@JPrevost JPrevost commented Jan 5, 2026

Please see individual commit messages and ticket for details.

Summary of changes:

  • Removes OpenURLs from Primo entirely
  • Adds and prefers PDF, HTML, and Browse links from LibKey
  • Falls back to bestIntegrator link from LibKey, but skips certain link types
  • Adjusts CSS to match Primo links
  • Adjusts Primo PDF and HTML to use same wording as equivalent LibKey links

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@coveralls
Copy link

coveralls commented Jan 5, 2026

Pull Request Test Coverage Report for Build 20755458632

Details

  • 17 of 17 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 97.946%

Totals Coverage Status
Change from base Build 20755080928: -0.001%
Covered Lines: 1192
Relevant Lines: 1217

💛 - Coveralls

@mitlib mitlib temporarily deployed to timdex-ui-pi-use-284-mo-rhsknu January 5, 2026 21:31 Inactive
@JPrevost JPrevost force-pushed the use-284-more-libkey branch from 16732b1 to a430f8e Compare January 6, 2026 13:33
@JPrevost JPrevost temporarily deployed to timdex-ui-pi-use-284-mo-rhsknu January 6, 2026 13:33 Inactive
@JPrevost JPrevost changed the title Use 284 more libkey Adds new fulfillment links and adjusts link logic Jan 6, 2026
@include buttonSecondary;
}

// Treat libkey links similarly to the primo links
Copy link
Member Author

Choose a reason for hiding this comment

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

@djanelle-mit There may be a better way to avoid some duplication here that I am introducing, but I'm going to just point at it and make it your problem ;)

Copy link
Member

Choose a reason for hiding this comment

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

The styles seem correct from my general inspection, but Dave is the better judge of this than I am - so I'm deferring to him for the close reading.

@matt-bernhardt matt-bernhardt self-assigned this Jan 6, 2026
Copy link
Member

@matt-bernhardt matt-bernhardt left a comment

Choose a reason for hiding this comment

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

None of my comments are blocking, so I'm approving as-is.

One of my comments is a general mental alignment question, while the other two comments (about a test, and the openurl_link element in the libkey model) are more detailed.

browzine_link: browzine_link(external_data),
html_link: html_link(external_data),
pdf_link: pdf_link(external_data),
openurl_link: openurl_link(external_data)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is blocking:

Does this openurl link get shown in the UI at the moment? I don't see it being added to the lookup partial. I'm fine with leaving it in if there's a plan to do something with it down the road, but I want to make sure I'm not missing logic somewhere that would display it now. If that's supposed to exist, I've missed it.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct in that it does not get used. My gut feeling is the logic is not done yet so I prepped by adding this rather than having to remember later that we could be pulling it but aren't.

@@ -1,3 +1,20 @@
<% if Libkey.enabled? && @libkey.present? %>
<%= link_to( @libkey[:text], @libkey[:link], class: 'button libkey-link' ) %>
<%if @libkey[:pdf_link].present? || @libkey[:html_link].present? %>
Copy link
Member

Choose a reason for hiding this comment

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

Non-blocking, more for my own mental alignment than this PR:

Am I overthinking things if I hope for the view layer to just have an iterator over "show all the links in the @libkey object`, with the conditional logic of this or that link being kept in the model?

To be clear, I'm not asking for this template to change - just reflecting on what I've been coming to think of as the ideal state for a view layer versus a model, and principles like "thin controller, fat model". Making sure I keep our ideal state in mind will help me make sure whatever PRs I ship are hopefully in line with what everyone else is also hoping for.

Copy link
Member Author

Choose a reason for hiding this comment

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

I hear you...I'm open to revisiting this in the future but I suspect a fair bit of churn in the fulfillment links for a bit and didn't want to try to optimize anything before we know what the actual target is.

@include buttonSecondary;
}

// Treat libkey links similarly to the primo links
Copy link
Member

Choose a reason for hiding this comment

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

The styles seem correct from my general inspection, but Dave is the better judge of this than I am - so I'm deferring to him for the close reading.

@JPrevost JPrevost temporarily deployed to timdex-ui-pi-use-284-mo-rhsknu January 6, 2026 16:00 Inactive
The OpenURL links generated by Primo lead to a page in the Primo UI that
does not have the same context as the Primo UI full record.

These links also don't always work and lead to a blank white page in
Primo UI in some edge cases.

As such, we are removing these entirely. For now, there will be no
"button" link for some Articles that previously would have them. UX
believes users will click the title to see access options. If testing
or analytics show this is not the case, we can experiement with adding
a button with the same link as is in the title in situations we
previously would have had an OpenURL link.

https://mitlibraries.atlassian.net/browse/USE-284
Updates LibKey model to include additional link types provided by LibKey:
- PDF Link
- HTML Link
- Browzine Link
- OpenURL Link

Adjusts BestIntegratorLink to skip "Access options" links per UX request.

Updates views to prioritize links. If we have PDF and/or HTML links
we display these.

If we do not have either, we display the BestIntegratorLink (which no
no longer includes "Access options" links).

We always display Browzine links if available.

Adjusts CSS to use same styling as Primo provided links.

https://mitlibraries.atlassian.net/browse/USE-284
@JPrevost JPrevost force-pushed the use-284-more-libkey branch from 623b516 to 430fe75 Compare January 6, 2026 16:53
@JPrevost JPrevost temporarily deployed to timdex-ui-pi-use-284-mo-rhsknu January 6, 2026 16:53 Inactive
@JPrevost JPrevost merged commit 5c947db into main Jan 6, 2026
5 checks passed
@JPrevost JPrevost deleted the use-284-more-libkey branch January 6, 2026 18:45
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.

5 participants