sul-dlss / sul-bento-app

The Bento Application for Stanford Library Search
https://library.stanford.edu/all
Other
2 stars 1 forks source link

Explore and assess need and cleanup: Move "Online" label markup into Bento search service #305

Open camillevilla opened 4 years ago

camillevilla commented 4 years ago

FWIW, I don't think we should be providing this label in the API. We were already doing this in the Articles+ response and the bento app has a shared partial for both catalog and articles+ results.

This kept us consistent, but if this seems agreeable, I would like to ticket (and happily work on) adding PRs to SearchWorks and Bento to move these labels to the search service for each endpoint respectively (and we would then need to sync up on deploying those changes out).

_Originally posted by @jkeck in https://github.com/sul-dlss/SearchWorks/pull/2509#discussion_r463354177_

hudajkhan commented 10 months ago

Needs further clarification and review to see if this is still needed.

hudajkhan commented 10 months ago

This relates to how the Bento pulls information back from SearchWorks, and will need exploration. The purpose of this ticket right now is to find out if these changes are still required and what cleanup may be needed.

dnoneill commented 9 months ago

I believe this has already been integrated. See fulltext_link_html field in searchworks api for both catalog and articles api:

Catalog api link: https://searchworks.stanford.edu/?f[access_facet][]=Online&format=json.
Code for catalog api: https://github.com/sul-dlss/SearchWorks/blob/2d72ede5726efb2811abd60454fa2a6dc0b2e172/app/models/json_results_document_presenter.rb#L22.

Articles api example: https://searchworks.stanford.edu/articles?search_field=search&q=article+example&format=json Code for articles api: https://github.com/sul-dlss/SearchWorks/blob/2d72ede5726efb2811abd60454fa2a6dc0b2e172/app/views/articles/index.json.jbuilder#L5

cbeer commented 9 months ago

Thanks, it looks like we're still creating the HTML in Searchworks. My read of the original comment is we'd rather have a flag in the API to say it's an online resource and have bento create its own markup (so we're not so tightly coupled to the searchworks HTML + CSS).

dnoneill commented 9 months ago

@cbeer ok. I read it the opposite way. Thanks for the clarification.

dnoneill commented 9 months ago

I have looked into this. It is doable but it is going increase the amount of code for both systems and I am not sure it is worth doing. Additionally, only some articles have that online tag in searchworks and I think that we should have the views reflect what is display in the catalog/article view. I am happy to talk this through and implement if it makes sense.

cbeer commented 9 months ago

I think it's probably a good thing to separately the HTML markup across applications; the tight coupling of css classes seems a little surprising and a likely pain point if/when we want to change the searchworks display. We've obviously gotten away with it for 3 years 🤷‍♂️