Skip to content

Search: fix hero section crushed under shared admin-page layout mixin - #48437

Merged
adamwoodnz merged 1 commit into
trunkfrom
search-157-search-admin-herotitle-section-is-crushed-by-jetpack-admin
May 1, 2026
Merged

adamwoodnz merged 1 commit into
trunkfrom
search-157-search-admin-herotitle-section-is-crushed-by-jetpack-admin

Conversation

@adamwoodnz

@adamwoodnz adamwoodnz commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes SEARCH-157

Proposed changes

  • Replace overflow: hidden on .jp-search-dashboard-top with clip-path: inset(-100px -100px 0 -100px). The shared jetpack-admin-page-layout mixin (introduced in Admin pages: unify layout under jetpack-admin-page-layout mixin #48109) makes this section a flex child with min-height: 0; per CSS Flexbox spec, min-height: auto resolves to 0 whenever overflow != visible, so the prior overflow: hidden (originally clipping the mocked-search box-shadow) was letting the flex algorithm crush the hero from ~410px down to ~18px. clip-path clips visually without changing min-height resolution.
  • Clip only at the bottom edge so the mocked-search shadow halo stays visible on top/left/right but doesn't bleed into the next (white) section.
  • Square the bottom corners of the mocked-search card (border-radius: 3px 3px 0 0) so the card meets the clipped section edge cleanly.

Screenshots

Before After
Screenshot 2026-05-01 at 4 03 50 PM Screenshot 2026-05-01 at 4 27 27 PM

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • Activate the Jetpack plugin on a site that has Jetpack Search available.
  • Visit wp-admin → Jetpack → Search (/wp-admin/admin.php?page=jetpack-search).
  • Verify the hero section at the top of the page renders at full height: the heading "Help your visitors find exactly what they're looking for, fast" is fully visible, and the mocked search interface preview sits below it inside the cream (#f9f9f6) section.
  • Verify the mocked-search card shows a soft shadow halo on its top, left, and right edges, but the shadow is cleanly clipped at the bottom of the cream section — no shadow bleeds into the white "Your usage" section below.
  • Resize the viewport up and down (especially through the 782px and 960px breakpoints used by jetpack-admin-page-layout) and confirm the hero stays at its natural height in all sizes.
  • Sanity check other pages adopting the same mixin (Newsletter, Social, Backup, Protect, VideoPress) to confirm no regression.

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.

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>
@adamwoodnz adamwoodnz added the [Status] Needs Review This PR is ready for review. label May 1, 2026
@adamwoodnz adamwoodnz self-assigned this May 1, 2026
@github-actions

github-actions Bot commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the search-157-search-admin-herotitle-section-is-crushed-by-jetpack-admin branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack search-157-search-admin-herotitle-section-is-crushed-by-jetpack-admin

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added the [Package] Search Contains core Search functionality for Jetpack and Search plugins label May 1, 2026
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@adamwoodnz
adamwoodnz requested review from CGastrell and kangzj May 1, 2026 04:32
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

@kangzj kangzj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for the prompt fix. Let's chip it away 🚢

@adamwoodnz adamwoodnz added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels May 1, 2026
@adamwoodnz
adamwoodnz merged commit 4e7294d into trunk May 1, 2026
82 checks passed
@adamwoodnz
adamwoodnz deleted the search-157-search-admin-herotitle-section-is-crushed-by-jetpack-admin branch May 1, 2026 05:24
@github-actions github-actions Bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Search Contains core Search functionality for Jetpack and Search plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants