Repository navigation
Search: fix hero section crushed under shared admin-page layout mixin - #48437
Conversation
The jetpack-admin-page-layout mixin (#48109) forces grandchildren of .admin-ui-page into a flex column with min-height: 0, which made .jp-search-dashboard-top a flex item. Per spec, min-height: auto on a flex item resolves to 0 when overflow != visible, and the section's existing `overflow: hidden` (originally clipping the mocked-search box shadow) let the flex algorithm crush it from 410px down to ~18px. - Replace the outer overflow: hidden with `clip-path: inset(...)` so min-height: auto stays content-based; clip only at the bottom edge so the shadow halo stays visible on top/left/right but doesn't bleed into the next section. - Square the mocked-search card's bottom corners so they meet the clipped edge cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
kangzj
left a comment
There was a problem hiding this comment.
thanks for the prompt fix. Let's chip it away 🚢
Fixes SEARCH-157
Proposed changes
overflow: hiddenon.jp-search-dashboard-topwithclip-path: inset(-100px -100px 0 -100px). The sharedjetpack-admin-page-layoutmixin (introduced in Admin pages: unify layout under jetpack-admin-page-layout mixin #48109) makes this section a flex child withmin-height: 0; per CSS Flexbox spec,min-height: autoresolves to0wheneveroverflow != visible, so the prioroverflow: hidden(originally clipping the mocked-search box-shadow) was letting the flex algorithm crush the hero from ~410px down to ~18px.clip-pathclips visually without changing min-height resolution.border-radius: 3px 3px 0 0) so the card meets the clipped section edge cleanly.Screenshots
Related product discussion/links
2ddb7d5908, "Admin pages: unify layout under jetpack-admin-page-layout mixin")Does this pull request change what data or activity we track or use?
No.
Testing instructions
/wp-admin/admin.php?page=jetpack-search).#f9f9f6) section.782pxand960pxbreakpoints used byjetpack-admin-page-layout) and confirm the hero stays at its natural height in all sizes.Before / After
Before: hero section collapsed to a thin gray strip — title and mocked search not visible.
After: hero renders at full height; shadow visible on three sides, clipped only at the section's bottom edge.