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

Web books incorrectly select provider + display incorrect toast #9639

Closed
Tracked by #9582
scottbarnes opened this issue Jul 26, 2024 · 1 comment · Fixed by #9663
Closed
Tracked by #9582

Web books incorrectly select provider + display incorrect toast #9639

scottbarnes opened this issue Jul 26, 2024 · 1 comment · Fixed by #9663
Assignees
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 1 Do this week, receiving emails, time sensitive, . [managed] Type: Bug Something isn't working. [managed]

Comments

@scottbarnes
Copy link
Collaborator

scottbarnes commented Jul 26, 2024

Problem

Problem 1

When a patron clicks the Read button on a web book, a toast message is displayed about visiting an external site, etc.

When there are multiple results on a search, e.g., https://testing.openlibrary.org/search?q=format%3A%22Web+book%22&mode=everything&page=2, clicking to read a web book always renders the direct_read_button.html template, regardless of what template should be rendered (e.g. openstax_read_button.html.

Problem 2

Closely related, but, at least for DirectProviders, the toast message for a subsequent DirectProvider result will display the toast message for the first one.

Relevant URL(s)

Reproducing the bug

  1. Go to https://testing.openlibrary.org/search?q=format%3A%22Web+book%22&mode=everything&page=2
  2. Click the Read button for a result that wouldn't use direct_read_button.html, such as OpenStax or Standard Ebooks.
  3. Also click a result that would use the DirectProvider, other than the first result to use DirectProvider.
  • Expected behavior: the toast displays the correct text.
  • Actual behavior: the toast (1) always displays the text for a DirectProvider / direct_read_button.html, and (2) always displays the toast assocaited with the first rendering of the direct_read_button.html template.

Edited 2024-07-30 to

  • correct the problem statement; and
  • add another problem statement.

Context

  • Browser (Chrome, Safari, Firefox, etc):
  • OS (Windows, Mac, etc):
  • Logged in (Y/N): Y
  • Environment (prod, dev, local): prod

Notes from this Issue's Lead

Proposal & constraints

Related files

Stakeholders

@cdrini


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
@scottbarnes scottbarnes added Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jul 26, 2024
@scottbarnes scottbarnes mentioned this issue Jul 26, 2024
16 tasks
@cdrini cdrini added Priority: 2 Important, as time permits. [managed] Lead: @scottbarnes Issues overseen by Scott (Community Imports) and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jul 29, 2024
@cdrini cdrini added this to the Sprint 2024-08 milestone Jul 29, 2024
@scottbarnes scottbarnes self-assigned this Jul 30, 2024
@scottbarnes scottbarnes changed the title Toast for web books (only) shows first result Web books incorrectly select provider + display incorrect toast Jul 31, 2024
@mekarpeles mekarpeles added Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] and removed Lead: @scottbarnes Issues overseen by Scott (Community Imports) labels Aug 2, 2024
@cdrini cdrini added Priority: 1 Do this week, receiving emails, time sensitive, . [managed] and removed Priority: 2 Important, as time permits. [managed] labels Aug 9, 2024
@cdrini
Copy link
Collaborator

cdrini commented Aug 9, 2024

Bumping to P1 since this bug is also causing the direct book provider to be incorrectly selected at times, which is a deploy blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 1 Do this week, receiving emails, time sensitive, . [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants