Skip to content

fix(home): prevent text clipping in onboarding cards#12864

Open
Armansiddiqui9 wants to merge 3 commits into
internetarchive:masterfrom
Armansiddiqui9:fix-text-homepage
Open

fix(home): prevent text clipping in onboarding cards#12864
Armansiddiqui9 wants to merge 3 commits into
internetarchive:masterfrom
Armansiddiqui9:fix-text-homepage

Conversation

@Armansiddiqui9
Copy link
Copy Markdown
Contributor

Closes #12854

Fix: Text clipping in onboarding cards on mobile

Technical

  • .tutorial__item a used a fixed height (100px)
  • Flex layout relied on rigid sizing instead of content-aware sizing
  • Long text (especially translations) overflowed and got clipped

Testing

This PR includes a more robust refactor of the onboarding card layout (moving from fixed-height + float-based layout to a flex-based responsive layout).
Because several legacy layout rules were removed, this change should be visually verified across:

  • Mobile (especially iOS Safari)
  • Narrow viewport widths
  • Carousel behavior on desktop
    If any regressions are found, a minimal fallback fix is available:
  • Reverting height to min-height adjustment only
  • Keeping existing structure with minimal flex changes

This ensures the fix can be safely adjusted without blocking the bug resolution.

Screenshot

With language as English, it looks totally perfect
Screenshot 2026-06-06 005333

With another language the width of boxes increases
Screenshot 2026-06-06 000220

On mobile view width it
Screenshot 2026-06-06 000004

Stakeholders

Screenshot 2026-06-05 235910 @lokesh

@mekarpeles
Copy link
Copy Markdown
Member

Thanks for the PR!

🤖 Copilot has been assigned for an initial review.

The linked issue (#12854) hasn't been triaged yet — triage happens on Mondays and Fridays. There are currently 72 open non-draft PRs ahead of yours.

PR triage checklist (maintainers / Pam)
  • PR description — not empty; explains what the change does and how to verify it
  • References an issue — PR body contains a #NNN reference
    • Linked issue is triaged — has a Priority: * label (not just Needs: Triage)
    • Linked issue is assigned — has at least one assignee
  • Commit history clean — no WIP/fixup/conflict noise; commit messages are meaningful
  • CI passing — no failing check-runs
  • Test cases present — if the change touches substantive logic, test coverage exists or is explained
  • Proof of testing — PR body includes a description of what was tested, a screenshot, or a video

Note

This comment was automatically generated by Pam, Open Library's Project AI Manager, on behalf of @mekarpeles. Pam is designed to provide status visibility, perform basic project management functions and relevant codebase research, and provide actionable feedback so contributors aren't left waiting.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix text clipping in the homepage onboarding carousel cards (especially on mobile / with longer translated strings) by making the card layout content-aware instead of fixed-height/float-based.

Changes:

  • Updates onboarding card layout rules to use flex sizing and allow the link container to grow (heightmin-height, add gap, prevent flex overflow via min-width: 0).
  • Adjusts text styling to remove percentage-based margins and improve wrapping behavior for long strings.
  • (Unintended) Removes a large set of homepage CSS rules that appear to still be required by other homepage sections (Stats + About/Resources).

Comment thread static/css/components/home.css Outdated
@Armansiddiqui9 Armansiddiqui9 marked this pull request as draft June 5, 2026 19:50
@Armansiddiqui9 Armansiddiqui9 marked this pull request as ready for review June 6, 2026 06:49
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.

Text of highlighted areas gets cut off

3 participants