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

Add OpenStax to trusted book providers #6138

Merged

Conversation

jimchamp
Copy link
Collaborator

Closes #6071

Adds OpenStax to our trusted book providers. This means that any read buttons for OpenStax books will direct patrons to the book's page on OpenStax.

Technical

Testing

  1. Search for books with OpenStax as the publisher. Ensure that search results contain trusted provider read buttons.
  2. Click on one of the read buttons. Ensure that the book's OpenStax details page is opened in a new tab.
  3. Click the search results tab. Ensure that the toast message is present, and that its links work as expected.
  4. Navigate to the book page of an OpenStax edition. Ensure that the trusted provider read button is present.
  5. Ensure that the download options link works correctly.

Screenshot

openstax_book_page

OpenStax read button --- Book page

openstax_search_results

OpenStax read button and toast message --- Search results page

Stakeholders

@cdrini

@jimchamp jimchamp requested a review from cdrini February 10, 2022 23:41
@mekarpeles mekarpeles added the Priority: 1 Do this week, receiving emails, time sensitive, . [managed] label Feb 14, 2022
@cdrini cdrini added the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Feb 15, 2022
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Nice! This looks great. Good sleuthing on finding all the pieces! I really need to DRY those up :P

Looking into OpenStax some more, it looks like the slug URLs aren't stable :( E.g. the first edition psychology textbook has slug psychology, but the url https://openstax.org/details/books/psychology redirects to psychology-2e. Looking at their docs, it looks like there is an ID inside their APIs:

E.g.

That's annoying :P But I guess the slug is stable; it's the URL that's redirecting. At some point in the future we might want to make a network request to get the metadata (e.g. https://openstax.org/apps/cms/api/v2/pages/45/ ) since that includes things like the direct read links as well. Added a note to the epic.

@cdrini cdrini merged commit 942a5b1 into internetarchive:master Feb 15, 2022
@cdrini cdrini mentioned this pull request Feb 15, 2022
53 tasks
@jimchamp jimchamp deleted the 6071/feature/openstax-book-provider branch July 15, 2022 23:14
@cdrini cdrini mentioned this pull request Nov 20, 2023
9 tasks
@jimchamp jimchamp removed the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 1 Do this week, receiving emails, time sensitive, . [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add openstax to Trusted Book Providers
3 participants