Skip to content

Fix list grid view alignment - #13385

Open
CipherZ3r0 wants to merge 1 commit into
internetarchive:masterfrom
CipherZ3r0:13352/fix-list-gridview-alignment
Open

Fix list grid view alignment#13385
CipherZ3r0 wants to merge 1 commit into
internetarchive:masterfrom
CipherZ3r0:13352/fix-list-gridview-alignment

Conversation

@CipherZ3r0

Copy link
Copy Markdown

Closes #13352

FIX : This fixes the alignment of the Preview action in the list/grid view when a book does not have a preview available.

Technical

  • Updated openlibrary/macros/BookPreview.html to handle books without an ocaid.
  • Previously, the Preview action was only rendered when an ocaid was present, which caused the CTA area to be missing and resulted in inconsistent alignment.
  • Added a fallback No Preview state when no ocaid is available.
  • The unavailable state is rendered as a non-clickable <span> rather than a link.

Testing

  • Verified the updated UI locally using the Docker development environment.
  • Ran the Python test suite:
    • 5738 passed
    • 18 skipped
    • 5 deselected
    • 1 xfailed
  • One unrelated existing failure remains in TestHomeTemplates.test_home_template due to the missing QueryCarousel macro in the test environment.

Screenshot

image

Stakeholders

@RayBB

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.

List Grid View isn't aligned when a book isn't previewable

1 participant