feat: animate hero collapse, hide search controls on non-home routes (#615 follow-up)#617
Conversation
Two refinements on LLM-Coding#615 after user testing: 1. The hero disappeared abruptly (display:none). It now collapses via a grid-template-rows 1fr->0fr transition (300ms, with opacity and margin), restores the same way, flips visibility after the transition so collapsed hero links leave the tab order, and honors prefers-reduced-motion. Hero content gained an inner wrapper div for the 0fr clip; applyCardFilters toggles a .hero-collapsed class instead of inline display. 2. Direction change: instead of jumping to the home page, the search controls disappear entirely on non-home routes. The whole header row (search input, role filter, anchor counter) is one #header-catalog-controls container now, toggled by the existing route:changed listener; the jump-to-home code is removed. A query left in the input still re-applies when returning home. Verified via Playwright on the built preview: hero height 547px -> 141px (mid-transition) -> 0px and back, visibility hidden when collapsed, layout unchanged. 115/115 unit tests, 38/38 E2E. App version 0.8.0 -> 0.8.1. Refs LLM-Coding#615 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
WalkthroughDiese PR implementiert die Such-UX-Verbesserungen ( ChangesSearch UX Hero Collapse and Route Visibility (
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related issues
Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Two refinements on the merged #616, from user testing:
1. Animated hero collapse
The hero vanished abruptly (
display: nonecannot transition). It now collapses via agrid-template-rows: 1fr → 0frtransition (300 ms, together with opacity and margin) and slides back on clearing the query.visibilityflips after the transition so the collapsed hero's links leave the tab order;prefers-reduced-motiondisables the animation. Measured mid-transition via Playwright: 547 px → 141 px → 0 px and cleanly back to 547 px.2. Direction change: hide search controls off-home
Instead of jumping to the home page, the search controls now disappear entirely on non-home routes — the search input, role filter, and anchor counter form one
#header-catalog-controlsrow toggled by the existingroute:changedlistener. The jump-to-home code from #616 is removed; a query left in the input still re-applies when returning to the catalog.Verification
/about/, visible on/)Refs #615
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
prefers-reduced-motionimplementiert.Chores