openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Use consistent flash message when books are edited

Open jimchamp opened this issue 8 months ago • 6 comments

Problem

I recently edited an existing book. After being redirected to the book page, a "Thank you very much for adding that new book!" flash message was displayed.

The expected copy when a book is edited is: "Thank you very much for improving that record!"

This seems to happen to books that have a "Read" button.

Image

Reproducing the bug

  1. Edit an edition that has a "Read" button
  2. Read the flash message
  • Expected behavior: Flash message reads: Thank you very much for improving that record!
  • Actual behavior: Flash message reads: Thank you very much for adding that new book!

Context

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

Breakdown

Some investigation will be needed in order to determine why this is happening. The copy for these flash messages can be found here. Searching the codebase for flash_book_added may provide clues.

Requirements Checklist

  • [ ]

Related files

Stakeholders


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.

jimchamp avatar Apr 11 '25 16:04 jimchamp

Let's change/DRY the copy for: "Thank you for improving the Open Library catalog!"

mekarpeles avatar Apr 14 '25 19:04 mekarpeles

Hi, can I be assigned to this issue?

Amara777 avatar Apr 15 '25 01:04 Amara777

I think this issue is fixed.

Image

vedanthanekar45 avatar Apr 15 '25 03:04 vedanthanekar45

You are assigned, @Amara777. Please ensure that the copy "Thank you for improving the Open Library catalog!" is displayed when any book is edited.

jimchamp avatar Apr 16 '25 16:04 jimchamp

Another very odd thing about these messages is that they leak between tabs. If you edit a book and then switch tabs to a different OpenLibrary book page, the message pops up at the top of the page even if you haven't edited the book on that page. Very confusing and OpenLibrary is the only web site I've ever seen with this kind of leakage between tabs.

tfmorris avatar Jun 02 '25 18:06 tfmorris

The issue of cross-tab flash message leakage is rooted in how Infogami handles flash messages (related file). I agree that this is confusing and peculiar, but it is unrelated to this particular issue.

Feel free to open another issue to track the cross-tab flash message problem. Our flash messages also have some accessibility shortcomings, so perhaps a round of improvements to this component is warranted.

jimchamp avatar Jun 13 '25 23:06 jimchamp

Feel free to open another issue to track the cross-tab flash message problem.

Sounds like a task more suited to someone who's measured on the quality of the user experience. Perhaps it's in @mekarpeles 's bailiwick.

tfmorris avatar Jul 14 '25 20:07 tfmorris