Skip to content

Fixed Preview button being cropped #10698

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

Conversation

Jimmykhangnguyen
Copy link
Contributor

Closes #10667

This PR attempts to fix the issue where the "Preview" button in the Author page was cropped off.

Technical

After going through the code, I figured a single CSS change to openlibrary\static\css\components\search-result-item.less should do the trick and prevent the "Preview" button from being clipped off.

What I did was essentially changed the overflow attribute of .bookcover from hidden to visible.

Testing

Screenshot

Before:
image

After
image

Stakeholders

@RayBB

@github-project-automation github-project-automation bot moved this to Waiting Review/Merge from Staff in Ray's Project Apr 19, 2025
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; not testing this since testing is down right now, but the fix seems reasonable. Thank you @Jimmykhangnguyen !

@cdrini
Copy link
Collaborator

cdrini commented Apr 30, 2025

On second thought , I'll wait for testing just to make sure this one is working before giving it a merge 👍

@cdrini
Copy link
Collaborator

cdrini commented Apr 30, 2025

Also this needs to be rebased against latest master to fix the failing test 👍

@Jimmykhangnguyen
Copy link
Contributor Author

Thanks! Yeah I think it wouldn't hurt to run it through the test, I'll rebase it and tag you in once I'm done!

@Jimmykhangnguyen Jimmykhangnguyen force-pushed the 10667/hotfix/fix-clipped-preview-button branch from e04ee85 to c828850 Compare April 30, 2025 17:39
@Jimmykhangnguyen Jimmykhangnguyen requested a review from cdrini April 30, 2025 17:51
@Jimmykhangnguyen
Copy link
Contributor Author

@cdrini I think it looks good now! Thanks for the review!

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 1, 2025
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.34%. Comparing base (2e231fa) to head (fe39231).
Report is 323 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10698      +/-   ##
==========================================
+ Coverage   17.27%   17.34%   +0.07%     
==========================================
  Files          87       90       +3     
  Lines        4845     4923      +78     
  Branches      860      859       -1     
==========================================
+ Hits          837      854      +17     
- Misses       3477     3536      +59     
- Partials      531      533       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cdrini cdrini merged commit 030605f into internetarchive:master May 14, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Waiting Review/Merge from Staff to Done in Ray's Project May 14, 2025
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @Jimmykhangnguyen ! We decided to make the font-size a bit smaller since it was causing the cover to become a bit larger when we set overflow:visible. We also remove overflow: visible, since that's the default! So we don't need to specify it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Response Issues which require feedback from lead
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Preview button being clipped off
4 participants