Skip to content

Add 'Full text options' fulfillment link.#409

Open
jazairi wants to merge 6 commits into
mainfrom
use-614
Open

Add 'Full text options' fulfillment link.#409
jazairi wants to merge 6 commits into
mainfrom
use-614

Conversation

@jazairi

@jazairi jazairi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Why these changes are being introduced:

UXWS has requested for journal records with
Browzine links should also include a 'Full-text
options' button that links to the full record.

Relevant ticket(s):

How this addresses that need:

This adds the 'Full-text options' link.

Side effects of this change:

None.

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.

Why these changes are being introduced:

UXWS has requested for journal records with
Browzine links should also include a 'Full-text
options' button that links to the full record.

Relevant ticket(s):

- [USE-614](https://mitlibraries.atlassian.net/browse/USE-614)

How this addresses that need:

This adds the 'Full-text options' link.

Side effects of this change:

None.
Comment thread app/views/thirdiron/browzine.html.erb Fixed
@coveralls

coveralls commented Jun 17, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 27723082754

Coverage decreased (-0.05%) to 98.35%

Details

  • Coverage decreased (-0.05%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (11 of 12 lines covered, 91.67%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
app/controllers/thirdiron_controller.rb 12 11 91.67%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1515
Covered Lines: 1490
Line Coverage: 98.35%
Coverage Strength: 71.3 hits per line

💛 - Coveralls

@mitlib mitlib temporarily deployed to timdex-ui-pi-use-614-rhngmz9bt June 17, 2026 21:13 Inactive

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new “Full-text options” link to the ThirdIron/BrowZine fulfillment UI so that journal results with BrowZine data can also offer a path back to the source “full record” page.

Changes:

  • Pass a full_record_url through the BrowZine content-loader request so the BrowZine partial can render a “Full-text options” link.
  • Adjust BrowZine/LibKey link CSS class usage (tests now assert .libkey-link rather than .button in some cases).
  • Add a controller test covering the BrowZine route when full_record_url is provided.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/controllers/thirdiron_controller.rb Plumbs full_record_url from request params into the BrowZine view.
app/views/search/_result_primo.html.erb Extracts the Primo “full record” link and passes it toward the BrowZine trigger.
app/views/search/_trigger_browzine.html.erb Appends full_record_url to the BrowZine loader URL.
app/views/thirdiron/browzine.html.erb Renders the new “Full-text options” link alongside the BrowZine link.
app/views/thirdiron/libkey.html.erb Adjusts BrowZine link CSS classes used in the LibKey-rendered HTML.
test/controllers/thirdiron_controller_test.rb Updates selectors for LibKey HTML and adds a BrowZine + full_record_url test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/controllers/thirdiron_controller.rb
Comment thread app/views/thirdiron/browzine.html.erb Outdated
Comment thread test/controllers/thirdiron_controller_test.rb
@qltysh

qltysh Bot commented Jun 17, 2026

Copy link
Copy Markdown

2 new issues

Tool Category Rule Count
qlty Structure Function with many returns (count = 5): safe_full_record_url 1
qlty Structure Function with high complexity (count = 6): safe_full_record_url 1


parsed.to_s
rescue URI::InvalidURIError
nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Function with high complexity (count = 5): safe_full_record_url [qlty:function-complexity]

@jazairi jazairi temporarily deployed to timdex-ui-pi-use-614-rhngmz9bt June 17, 2026 21:17 Inactive
@jazairi jazairi requested a review from Copilot June 17, 2026 21:23
@jazairi jazairi temporarily deployed to timdex-ui-pi-use-614-rhngmz9bt June 17, 2026 21:23 Inactive

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread app/controllers/thirdiron_controller.rb
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread app/views/search/_trigger_browzine.html.erb Outdated
Comment thread app/controllers/thirdiron_controller.rb
Comment thread test/controllers/thirdiron_controller_test.rb
jazairi and others added 3 commits June 17, 2026 17:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jazairi jazairi requested a review from Copilot June 17, 2026 21:53
@jazairi jazairi temporarily deployed to timdex-ui-pi-use-614-rhngmz9bt June 17, 2026 21:53 Inactive

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

app/views/search/_trigger_browzine.html.erb:9

  • data-content-loader-url-value is currently unquoted. With the new full_record_url query param this attribute value now includes & and multiple = characters, which can lead to invalid HTML and fragile parsing. Quoting the attribute value makes the markup valid and robust.
<% data_url = "/browzine?#{query_params.to_query}" %>

<span class="libkey-container"
     data-controller="content-loader"
     data-content-loader-url-value=<%= data_url %>>

Comment thread app/controllers/thirdiron_controller.rb
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jazairi jazairi requested a review from Copilot June 17, 2026 22:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

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