Fix text clamping and vertical space filling on Merch page Featured Picks#2653
Fix text clamping and vertical space filling on Merch page Featured Picks#2653google-labs-jules[bot] wants to merge 3 commits into
Conversation
Introduced `clampTitle` and `clampDescription` props to `ProductCard` to allow overriding the default 2-line truncation. Updated `Merch.tsx` to use these props in the Featured Picks section, ensuring that titles and descriptions fill the available vertical space in the height-matched grid. This change prevents text from being cut off prematurely and eliminates awkward empty space above the action buttons in the featured grid layout. Default clamping behavior is preserved for other product sections.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
🚀 Deployment Details (Last updated: Jun 19, 2026, 2:48 PM PST) 🚀 Pushed to gh-pages; publish in progress
|
🐙 GitHub Models Code Review
Reviewing: PR #2653 Model: gpt-4.1 Code Review FeedbackReview of Diff: I have carefully reviewed the changes to NEW HIGH SEVERITY CHECKS
Summary: { "findings": [ { "id": "finding-1", "file": "src/components/products/ProductCard.tsx", "line": 49, "snippet": "clamp={clampTitle ?? (isFeatured ? true : 2)}", "issue": "Ensures clampTitle overrides default clamp logic; no contradiction found.", "status": "resolved", "fixSummary": "Optional clampTitle and clampDescription props are correctly handled." }, { "id": "finding-2", "file": "src/pages/Merch.tsx", "line": 120, "snippet": "clampTitle={{ base: 2, md: true }}", "issue": "Disables clamping for non-featured cards as intended.", "status": "resolved", "fixSummary": "Non-featured cards now display text without clamping." } ] } [VERDICT: PASS] Generated by github-models-code-review |
🐙 GitHub Models Visual Review
Summary: 🔴 1 high · 🟡 0 medium · 🟢 0 low 🔴
|
Adds responsive clamp customization to ProductCard and uses it in the
Featured Picks section of the Merch page. This allows product titles
and descriptions to fill the available vertical space in height-matched
cards on desktop while maintaining the 2-line limit on mobile to
preserve layout integrity.
- Update ProductCard to accept clampTitle and clampDescription props.
- Configure Featured Picks in Merch.tsx with { base: 2, md: true }.
- Ensure no regressions in other product grids via default props.
🤖 AI Technical AuditANTI-AI-SLOPThe implementation adds optional props, which is a clean way to handle configuration. However, I observed a potential for redundant logic in the default prop evaluation. Ensure that the use of FINAL RECOMMENDATIONApproved Review automatically published via RepoAuditor. |
Adds responsive clamp customization to ProductCard and uses it in the
Featured Picks section of the Merch page. This allows product titles
and descriptions to fill the available vertical space in height-matched
cards on desktop while maintaining the 2-line limit on mobile to
preserve layout integrity.
- Update ProductCard to accept clampTitle and clampDescription props.
- Refactor ProductCard to use default parameters for clamping logic.
- Configure Featured Picks in Merch.tsx with { base: 2, md: true }.
- Add documentation explaining the necessity of ResponsiveProp.
- Ensure no regressions in other product grids via default props.
Problem Statement
The "Featured Picks" section on the Merch page uses a grid that matches card heights, but non-featured cards had their text clamped to 2 lines, leading to empty space and truncated content.
Goal
To allow the text in non-featured cards to naturally fill the card height while maintaining uniform alignment across the row.
Non-Goals
None.
Proposed Approach
Added optional
clampTitleandclampDescriptionprops to theProductCardcomponent and applied them to the secondary featured items inMerch.tsx.Alternatives Considered
None.
Architectural Impact
None.
Scope
The changes are limited to the
ProductCardcomponent and its implementation inMerch.tsx.UNDERSTAND THE ISSUE
The current implementation of the "Featured Picks" section causes visual inconsistencies due to the forced clamping of text in non-featured cards.
DETERMINE APPROACH
Implement the optional
clampTitleandclampDescriptionprops in theProductCardcomponent to improve text display.SPECIFY SCOPE
The scope includes modifications to the
ProductCardcomponent and updates to theMerch.tsxfile for secondary featured items.DEFINITION OF DONE
ProductCardcomponent has optionalclampTitleandclampDescriptionprops.