Skip to content

Commit

Permalink
JITM: Remove JITM from Jetpack Stats dashboard (Preparation to use em…
Browse files Browse the repository at this point in the history
…bedded JITM) (#39714)

* expose functiont to render JITM and jitm env for stats

* changelog

* fix typo

* rever formatting

* pass jitm pass to stats admin

* ver and minify

* ver and minify

* ensure it has an option to return early

* revert unnecessary chagnes

* use cache buster as jitm version

* add comments

* revert changes

* revert changes

* Delete projects/packages/jitm/changelog/update-integration-jitm-in-stats

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11337716526

Upstream-Ref: Automattic/jetpack@cd86cc6
  • Loading branch information
kangzj authored and matticbot committed Oct 15, 2024
1 parent c1acf56 commit ea7e783
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 89 deletions.
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/automattic/jetpack-mu-wpcom/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"automattic/jetpack-connection": "^5.1.3",
"automattic/jetpack-masterbar": "^0.9.6",
"automattic/jetpack-redirect": "^2.0.4",
"automattic/jetpack-stats-admin": "^0.22.2",
"automattic/jetpack-stats-admin": "^0.22.3-alpha",
"automattic/jetpack-status": "^4.0.2",
"automattic/scheduled-updates": "^0.13.4",
"automattic/jetpack-compat": "^3.0.2",
Expand Down
7 changes: 7 additions & 0 deletions vendor/automattic/jetpack-stats-admin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.22.3-alpha - unreleased

This is an alpha version! The changes listed here are not final.

### Changed
- JITM: expose function to render message

## 0.22.2 - 2024-10-14
### Fixed
- Added missing fields for stats single post endpoint. [#39691]
Expand Down
15 changes: 14 additions & 1 deletion vendor/automattic/jetpack-stats-admin/src/class-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Main {
/**
* Stats version.
*/
const VERSION = '0.22.2';
const VERSION = '0.22.3-alpha';

/**
* Singleton Main instance.
Expand Down Expand Up @@ -52,6 +52,19 @@ public static function init() {
*/
private function __construct() {
add_action( 'rest_api_init', array( new REST_Controller(), 'register_rest_routes' ) );
// Disable JITM assets on the Stats page.
// JITM is handled separately by Stats: https://github.com/Automattic/wp-calypso/pull/95273.
add_filter(
'jetpack_display_jitms_on_screen',
function ( $show, $screen_id ) {
if ( 'jetpack_page_stats' === $screen_id ) {
return false;
}
return $show;
},
10,
2
);
}

/**
Expand Down
Loading

0 comments on commit ea7e783

Please sign in to comment.