Premium Analytics: remove obsolete widget-picker preview aspect-ratio hack - #50294
Merged
Merged
Conversation
Contributor
|
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. 🤷 |
louwie17
added a commit
that referenced
this pull request
Jul 17, 2026
The Most viewed and Referrers widgets each carried a widget-picker
workaround keyed off a global `[inert]` ancestor selector:
:global([inert]:not([inert="true"])) .root {
height: auto;
aspect-ratio: 4 / 3;
overflow: hidden;
}
`inert` is not owned by the picker. A modal popup — such as the Metrics
SelectControl — inerts background content while open, so the sibling
widget matched this selector and took on a 4:3 aspect ratio for as long
as the dropdown stayed open, then snapped back on close.
#50294 already removed this hack from the other 17 widgets, along with
the AGENTS.md guidance recommending it, since the picker host now sizes
preview tiles itself. These two widgets merged after that cleanup from
branches cut before it, reintroducing the rule. Remove both to restore
parity with the rest of the package.
Fixes WOOA7S-1763.
Claude-Session: https://claude.ai/code/session_011oGxxfSNdnj1Pyf5FRnPQC
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Proposed changes
Premium Analytics widgets shipped a per-widget CSS workaround for the widget-picker preview:
Why: The picker rendered each widget tile
inert, and the preview wrapper'sheight: 125%of an auto-height parent leftheight: 100%on.rootresolving to auto — so the tile collapsed. The 4:3 aspect-ratio rule gave it a sensible fallback shape.How: #50271 updated the widget-picker host so it sizes preview tiles itself, so the workaround is now dead code. This PR:
AGENTS.mdso new widgets don't reintroduce it.What is intentionally kept: the separate
:global([inert]) … .leaderboardImage/.avatar/imgrules inlocations,authors,subscribers-list, andvisitors-by-location. Those counter the picker grid'simg { object-fit: cover }blowing flags/avatars up to fill the tile — an unrelated concern that #50271 did not touch.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jetpack build --deps packages/premium-analytics) or run Storybook.