Skip to content

Render Premium Analytics inside the wp-admin shell#50010

Open
retrofox wants to merge 3 commits into
trunkfrom
update/premium-analytics-wp-admin-shell
Open

Render Premium Analytics inside the wp-admin shell#50010
retrofox wants to merge 3 commits into
trunkfrom
update/premium-analytics-wp-admin-shell

Conversation

@retrofox

@retrofox retrofox commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

  • Register the Premium Analytics admin menu against the wp-build "wp-admin integrated" page variant (jetpack-premium-analytics-wp-admin) instead of the full-page slug. The page now renders inside the native wp-admin shell (sidebar + header) rather than the app taking over the whole screen via the admin_init interceptor.
  • The menu callback points at the generated jpa_jetpack_premium_analytics_wp_admin_render_page() (from build/pages/jetpack-premium-analytics/page-wp-admin.php), guarded by function_exists() with a __return_null fallback when the build is absent.
  • The full-page variant stays reachable directly at ?page=jetpack-premium-analytics; only the menu entry switches to the in-shell variant.

Closes WOOA7S-1572

Related product discussion/links

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

No.

Testing instructions

  • Build the package if needed: jetpack build packages/premium-analytics.
  • In wp-admin, open the Analytics menu entry.
  • Confirm the dashboard renders inside the standard wp-admin chrome: the admin sidebar and header stay visible and the page no longer takes over the full screen.
  • Confirm deep links still work, e.g. ?page=jetpack-premium-analytics-wp-admin&p=/ loads the dashboard route.
image

@retrofox retrofox requested review from a team as code owners June 26, 2026 15:55
@retrofox retrofox self-assigned this Jun 26, 2026
@github-actions

github-actions Bot commented Jun 26, 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!

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 26, 2026
@retrofox retrofox added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Jun 26, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/premium-analytics/src/class-analytics.php 4/54 (7.41%) -0.44% 3 ❤️‍🩹

Full summary · PHP report

@retrofox retrofox force-pushed the update/premium-analytics-wp-admin-shell branch from b63def3 to 63e9e8f Compare June 26, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant