Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp New Alexandria Commentary widget #56

Open
jacobwegner opened this issue Oct 29, 2021 · 5 comments
Open

Revamp New Alexandria Commentary widget #56

jacobwegner opened this issue Oct 29, 2021 · 5 comments

Comments

@jacobwegner
Copy link
Contributor

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
Copy link
Contributor Author

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

@jacobwegner
Copy link
Contributor Author

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:

  • Handle CORS issues (because...proxy!)
  • Render Draft.js blocks back to HTML
  • Cache responses to the upstream (might also consider sticking these behind the Scaife Viewer Fastly instance)

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
Copy link
Contributor Author

(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
Copy link
Contributor Author

image

vs

image

@jacobwegner
Copy link
Contributor Author

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.

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

No branches or pull requests

1 participant