ucd-library / ucdlib-theme

University branding, additional theme support, theme elements
MIT License
0 stars 0 forks source link

`<ucdlib-sils-permalink>` component #30

Open qjhart opened 3 years ago

qjhart commented 3 years ago

If we decide on moving the databases to the primo catalog, and for news items and other pages, it would be nice to have a standard component for representing primo links. I imagine that we would have two particular behaviors in-line and as cards. In both cases the user would use the permalink as a the identifier. If you identified a tag inline like <ucdlib-sils-permalink href="https://search.library.ucdavis.edu/permalink/01UCD_INST/1uov27j/alma9981249369903126"/>, then the link would format as something like

For more citation information, we'd could add

Operation

This item would use the JSON api that is used by the SILS client, fetch and parse that.

Questions:

qjhart commented 3 years ago

@sbagg - Originally I proposed that we use the JSON (particularly the PNX record) that is driving the website display for a record. For example, I pointed to https://search.library.ucdavis.edu/primaws/rest/pub/pnxs/undefined/alma9916924606106531?vid=01UCD_INST:UCD&lang=en as a source on our example permalink page. On Friday, I learned that the SILS also maintains a more complete linked data record, then the SE0 shows. This Linked Data Example I think might be a better choice for our data, since we understand both the format, and we have the predictate schema

sbagg commented 3 years ago

In order to create image/video thumbnails can create links with data from this documentation.

It is under the section Enable Cover Images in Your Catalog

qjhart commented 3 years ago

I have had some discussions w/ Xiaoli, and the notion of where to go for metadata is more complicated. At issue is the fact that all permalinks may not have linked-data metadata.

For example, Ex-Libris provides CDL (Central Discovery) data products in the primo interface, for example this article , while this record does have a PNX+ json file, we can't find an associated record via their open linked data site.

In addition, there seems to be some confusion on what ALMA records are available. The API indicates that we need in include our institutional identifier, but some records that come from the network zone, should have linked data records, but in reality don't. This ALMA record 9912892263406531 is an example.

qjhart commented 3 years ago

@jrmerz / @spelkey-ucd I have a question about this this particular component. @sbagg needs to call a restful API in order to fill out this component. Her implementation, is completely integrated in the component, with a one off getJSON

It seems to me there are two other options, one being something similar to the cork-app BaseService .

Alternatively, @spelkey-ucd description of the reactive controllers seems like this might be another, (better?) methodology. There is a good example, for something very similar in Async Controllers. This example (Doesn't work) includes a @lit-labs/task that further make this generic. Do we want to think about these types of general purpose controllers in these components?

spelkey-ucd commented 3 years ago

If we foresee that bit of code being reusable, I would definitely advocate making it a cork-app service or controller. Fetching an Alma record seems like a good candidate to me.

@lit-labs/task looks like a really nice pattern, but I don't know if it's meant to be used in production yet. As of a couple of weeks ago, it is the 1.0.0 release, which is promising, but it is still in the @lit-labs org as opposed to @lit. I think I remember the lit devs mentioning in the 2.0 release event that code would be transitioned from @lit-labs to @lit when ready. @jrmerz think we can use it?

qjhart commented 3 years ago

I propose we do use the @lit-lab/task, then we divide the cork BaseService into a few smaller ones, one without memoization and then one that includes it. We can start with the non-memoized, part.