scaife-viewer / frontend

Skeleton, Widgets, and other frontend packages for the Scaife Viewer
0 stars 3 forks source link

Revamp New Alexandria Commentary widget #56

Open jacobwegner opened 2 years ago

jacobwegner commented 2 years ago

The previous endpoint feeding the widget returns 5xx errors.

There seem to be other endpoints backing the commentaries:

The GraphQL endpoint has the most similar structure to the old endpoint, but there are still changes to be resolved, and I've hit quite a few CORS issues trying to work through it.

Want to circle back here when we have a bit more time.

https://nicedoc.io/lokiuz/redraft may be useful rendering the newer content blocks.

jacobwegner commented 2 years ago

(https://tinyurl.com/gql-chs-api has a sample query)

jacobwegner commented 2 years ago

The CHS team tells us that the GraphQL endpoint is deprecated; they're willing to work help resolve CORS issues, but I'm also writing a small proxy that will:

This would allow backwards compatibility with the widget as far as the shape of the query.

There might be more to do to "rank" responses from the API (CHS team mentioned there was some custom sorting happening on the old backend), and there isn't always a 1:1 between passage provided and returned on their actual site (30 line ranges, for example), so we might want to also consider just doing an ingestion of everything in the commentary and moving to a similar model of what we've done for HMT.

In that model, we'd still make use of the proxy and image hosting, but need to ensure we're doing right by CHS as far as licensing, attributions, etc.

jacobwegner commented 2 years ago

(Another small snippet we might want to land on the widget is ensuring that long links don't overflow the sidebars on SV1):

a {
    text-overflow: ellipsis;
    max-width: 15vw;
    overflow: hidden;
    display: block;
    white-space: nowrap;
}
jacobwegner commented 2 years ago
image

vs

image
jacobwegner commented 1 year ago

Our proxy server was knocked offline, but I've brought it back up.

https://opencommentaries.org/ (https://codeberg.org/charles/open_commentaries) will be the new platform that we'll want to switch over to at some point.