Skip to content

Conversation

@jonathangreen
Copy link
Member

@jonathangreen jonathangreen commented Jan 16, 2026

Description

Add visual banners in the book details editor for books that are hidden from the library catalog, distinguishing between manually-suppressed and policy-filtered books.

  • Show warning banner for manually-suppressed books with restore button
  • Show danger banner for policy-filtered books with guidance to adjust library content filtering settings
  • Support backward compatibility when visibilityStatus is not set but unsuppressPerLibraryLink exists

Motivation and Context

Librarians need to clearly see when a book is hidden from the catalog and understand why. This change provides visual feedback directly in the book details view, making it easier to identify and manage hidden books.

Screenshot 2026-01-16 at 4 00 28 PM Screenshot 2026-01-16 at 4 00 55 PM

How Has This Been Tested?

  • Added unit tests for editorAdapter visibility status extraction
  • Added unit tests for BookDetailsEditor visibility banners
  • All new and existing tests pass

Checklist:

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Add visual banners in the book details editor for books that are hidden
from the library catalog, distinguishing between manually-suppressed and
policy-filtered books.

- Show warning banner for manually-suppressed books with restore button
- Show danger banner for policy-filtered books with guidance to adjust
  library content filtering settings
- Support backward compatibility when visibilityStatus is not set but
  unsuppressPerLibraryLink exists
- Extract visibilityStatus from OPDS categories in editorAdapter
- Add visibilityStatus field to BookData interface
- Add shared SCSS variables and styles for visibility status banners
@jonathangreen jonathangreen changed the title Display visibility status banners for hidden books in book details Display visibility status banners for hidden books in book details (PP-3525) Jan 16, 2026
@jonathangreen jonathangreen requested a review from a team January 16, 2026 20:38
- Replace unsafe type assertion with runtime validation for visibility
  status to handle unexpected values gracefully
- Add styling for inline-suppress-button within visibility banner
Update expected text from "manually hidden by a librarian" to
"manually hidden by a library staff member" to match the actual
component message.
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

Successfully merging this pull request may close these issues.

2 participants