internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.09k stars 1.33k forks source link

Book pages don't show list inclusion if list addition was done from search results or from author page #9039

Open el4ctr0n opened 5 months ago

el4ctr0n commented 5 months ago

Problem

Book pages don't show list inclusion if list addition was done from search results or from author page. Book pages only indicate list inclusion if list addition was done from the book page.

On a more positive note, going to the list page reveals that the book is always added to the list in each of the 3 cases — whether the addition was done from the book page, from the search results or from the author page.

Reproducing the bug

  1. Log into your OpenLibrary account
  2. Do a book search, or just click this link: https://openlibrary.org/search?q=Flowers&mode=everything
  3. Clicking on the bottom arrow near the "Want to Read" button and add a random book to a list.
  4. Click on the book title and see that the list to which you added this book is not shown.
  5. Go to the list where you added this book and see that it's been added despite the list addition not being indicated on the book page.

The same thing happens if you add a book to a list from the author page. The book is added to the list you chose but the list name isn't indicated on the page of the book.

Context

Notes from this Issue's Lead

Proposal & constraints

Related files

Stakeholders

el4ctr0n commented 4 months ago

@jimchamp Additionally, the "Want to Read" button dropdown on author pages and on search results pages doesn't display the booklist inclusion check mark if the book was added to a booklist from the book page.

On a more positive note, the booklist inclusion check mark is present on search results "Want to Read" dropdown menus if the booklist addition was done from an author page, and the booklist inclusion check mark is present on author page "Want to Read" dropdown menus if the booklist addition was done from the search results.

mekarpeles commented 4 months ago

@jimchamp brings up a great point that this may be related to work v. edition -- on the author + search page, I believe the work gets added to the list, whereas on the books page the edition gets added to this list.

That said, you're absolutely correct that this is confusing and probably the right solution is to make the author + search page also use the edition (if we have that info available from solr).

mekarpeles commented 4 months ago

Solution:

  1. Switch author + search to use selected edition -- it should be the default behavior that lists use edition unless the creator sets an option otherwise (minority case)
  2. In the minority case where the work was added to the list, update the book page so we show the list item is a work "(work)"