@automattic/jetpack-components 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [4.0.2] - 2026-10-12
6
+ ### Changed
7
+ - Internal updates.
8
+
9
+ ## [4.0.1] - 2026-10-06
10
+ ### Changed
11
+ - Jetpack Footer: Link to the My Jetpack Features tab instead of the retired Products tab. [#52778]
12
+
5
13
  ## [4.0.0] - 2026-10-05
6
14
  ### Changed
7
15
  - Update package dependencies. [#52999]
@@ -1987,6 +1995,8 @@
1987
1995
  ### Changed
1988
1996
  - Update node version requirement to 14.16.1
1989
1997
 
1998
+ [4.0.2]: https://github.com/Automattic/jetpack-components/compare/4.0.1...4.0.2
1999
+ [4.0.1]: https://github.com/Automattic/jetpack-components/compare/4.0.0...4.0.1
1990
2000
  [4.0.0]: https://github.com/Automattic/jetpack-components/compare/3.3.0...4.0.0
1991
2001
  [3.3.0]: https://github.com/Automattic/jetpack-components/compare/3.2.0...3.3.0
1992
2002
  [3.2.0]: https://github.com/Automattic/jetpack-components/compare/3.1.2...3.2.0
@@ -1,3 +1,5 @@
1
+ @use "@automattic/jetpack-base-styles/admin-page-layout" as *;
2
+
1
3
  .admin-page {
2
4
  margin-inline-start: -20px; // to neutralize the padding of #wpcontent.
3
5
 
@@ -35,28 +37,9 @@
35
37
  clear: both;
36
38
  }
37
39
 
38
- // admin-ui's header `visual` slot is a 24px grid box but does not center
39
- // its contents. Our JetpackLogo is 20px tall, so without this it pins to
40
- // the top-left of the cell and looks misaligned vs. the title. admin-ui
41
- // ships the slot as `<div aria-hidden="true">` in the header.
42
- // TODO: remove once upstream centers contents in `.header-visual`.
43
- :global(.jp-admin-page__page > :first-child [aria-hidden="true"]) {
44
- place-items: center;
45
- }
40
+ :global(.jp-admin-page__page) {
46
41
 
47
- // Keep the header a constant height across tabs. The content row's height
48
- // is driven by its tallest child (the `actions` slot), so tabs with
49
- // differently-sized action controls — or none at all — render headers of
50
- // different heights, which shifts the tab strip below them vertically.
51
- // Reserve the standard 40px WP control height as a floor and center the
52
- // row's items so a shorter control neither stretches nor collapses it.
53
- // The content row is identified by the visual logo slot it contains
54
- // (`aria-hidden="true"`), so a breadcrumbs-only header isn't affected.
55
- // `> :first-child` targets the page header positionally (a `<div>` in
56
- // admin-ui ≥ 2.1, a `<header>` in 2.0) — matching the sibling rules above.
57
- :global(.jp-admin-page__page > :first-child > div:has([aria-hidden="true"])) {
58
- min-height: 40px;
59
- align-items: center;
42
+ @include jetpack-admin-page-header;
60
43
  }
61
44
 
62
45
  .admin-page-header {
@@ -29,8 +29,7 @@ const DonutMeter = ({ className = '', description = '', donutWidth = '64px', seg
29
29
  return (_jsx("div", { className: finalClassName, "aria-hidden": isHidden, "data-testid": "donut-meter", children: _jsxs("svg", { width: donutWidth, height: donutWidth, viewBox: "0 0 40 40", className: "donut-meter_svg", role: "img", children: [_jsx("title", { id: "donut-meter-title", children: title }), _jsx("desc", { id: "donut-meter-description", children: description }), _jsx("circle", { className: "donut-meter-hole", cx: "20" // center x value of circle
30
30
  , cy: "20" // center y value of circle
31
31
  , r: "15.91549430918954" // radius based on the circumference r = 100/(2π)
32
- , fill: "transparent" }), _jsx("circle", { className: "donut-meter-ring", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", strokeWidth: thickness, stroke: "#ebebeb" }), _jsx("circle", { className: "donut-meter-segment", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", "transform-origin": "center" // eslint-disable-line react/no-unknown-property -- @todo Switch to transformOrigin when we use React 19.
33
- , strokeWidth: thickness, strokeDasharray: `${percentage} ${100 - percentage}`, strokeDashoffset: "-25" // this ensures the segment begins at the bottom of the donut instead of the top
32
+ , fill: "transparent" }), _jsx("circle", { className: "donut-meter-ring", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", strokeWidth: thickness, stroke: "#ebebeb" }), _jsx("circle", { className: "donut-meter-segment", cx: "20", cy: "20", r: "15.91549430918954", fill: "transparent", strokeWidth: thickness, strokeDasharray: `${percentage} ${100 - percentage}`, strokeDashoffset: "-25" // this ensures the segment begins at the bottom of the donut instead of the top
34
33
  })] }) }));
35
34
  };
36
35
  export default DonutMeter;
@@ -18,12 +18,10 @@ const JetpackFooter = ({ className, menu, ...otherProps }) => {
18
18
  if (getScriptData()?.myJetpack?.isAvailable === true &&
19
19
  !isWpcomPlatformSite() &&
20
20
  !window?.JetpackNetworkAdminData) {
21
- // Published by My Jetpack, whose products tab can be renamed Features.
22
- const productsSection = getScriptData()?.myJetpack?.productsSection;
23
21
  items = [
24
22
  {
25
- label: productsSection?.label ?? __('Products', 'jetpack-components'),
26
- href: getAdminUrl(`admin.php?page=my-jetpack#/${productsSection?.slug ?? 'products'}`),
23
+ label: __('Features', 'jetpack-components'),
24
+ href: getAdminUrl('admin.php?page=my-jetpack#/features'),
27
25
  },
28
26
  {
29
27
  label: __('Help', 'jetpack-components'),
@@ -1,3 +1,5 @@
1
+ @use "@automattic/jetpack-base-styles/admin-page-layout" as *;
2
+
1
3
  .admin-page {
2
4
  margin-inline-start: -20px; // to neutralize the padding of #wpcontent.
3
5
 
@@ -35,28 +37,9 @@
35
37
  clear: both;
36
38
  }
37
39
 
38
- // admin-ui's header `visual` slot is a 24px grid box but does not center
39
- // its contents. Our JetpackLogo is 20px tall, so without this it pins to
40
- // the top-left of the cell and looks misaligned vs. the title. admin-ui
41
- // ships the slot as `<div aria-hidden="true">` in the header.
42
- // TODO: remove once upstream centers contents in `.header-visual`.
43
- :global(.jp-admin-page__page > :first-child [aria-hidden="true"]) {
44
- place-items: center;
45
- }
40
+ :global(.jp-admin-page__page) {
46
41
 
47
- // Keep the header a constant height across tabs. The content row's height
48
- // is driven by its tallest child (the `actions` slot), so tabs with
49
- // differently-sized action controls — or none at all — render headers of
50
- // different heights, which shifts the tab strip below them vertically.
51
- // Reserve the standard 40px WP control height as a floor and center the
52
- // row's items so a shorter control neither stretches nor collapses it.
53
- // The content row is identified by the visual logo slot it contains
54
- // (`aria-hidden="true"`), so a breadcrumbs-only header isn't affected.
55
- // `> :first-child` targets the page header positionally (a `<div>` in
56
- // admin-ui ≥ 2.1, a `<header>` in 2.0) — matching the sibling rules above.
57
- :global(.jp-admin-page__page > :first-child > div:has([aria-hidden="true"])) {
58
- min-height: 40px;
59
- align-items: center;
42
+ @include jetpack-admin-page-header;
60
43
  }
61
44
 
62
45
  .admin-page-header {
@@ -134,7 +134,6 @@ const DonutMeter: FC< DonutMeterProps > = ( {
134
134
  cy="20"
135
135
  r="15.91549430918954"
136
136
  fill="transparent"
137
- transform-origin="center" // eslint-disable-line react/no-unknown-property -- @todo Switch to transformOrigin when we use React 19.
138
137
  strokeWidth={ thickness }
139
138
  strokeDasharray={ `${ percentage } ${ 100 - percentage }` }
140
139
  strokeDashoffset="-25" // this ensures the segment begins at the bottom of the donut instead of the top
@@ -32,13 +32,10 @@ const JetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...otherPro
32
32
  ! isWpcomPlatformSite() &&
33
33
  ! window?.JetpackNetworkAdminData
34
34
  ) {
35
- // Published by My Jetpack, whose products tab can be renamed Features.
36
- const productsSection = getScriptData()?.myJetpack?.productsSection;
37
-
38
35
  items = [
39
36
  {
40
- label: productsSection?.label ?? __( 'Products', 'jetpack-components' ),
41
- href: getAdminUrl( `admin.php?page=my-jetpack#/${ productsSection?.slug ?? 'products' }` ),
37
+ label: __( 'Features', 'jetpack-components' ),
38
+ href: getAdminUrl( 'admin.php?page=my-jetpack#/features' ),
42
39
  },
43
40
  {
44
41
  label: __( 'Help', 'jetpack-components' ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Jetpack Components Package",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
6
  "bugs": {
@@ -78,7 +78,7 @@
78
78
  "dependencies": {
79
79
  "@automattic/jetpack-api": "^2.1.0",
80
80
  "@automattic/jetpack-boost-score-api": "^1.2.0",
81
- "@automattic/jetpack-script-data": "^0.6.8",
81
+ "@automattic/jetpack-script-data": "^0.6.9",
82
82
  "@automattic/number-formatters": "^1.2.10",
83
83
  "@babel/runtime": "^7",
84
84
  "@gravatar-com/hovercards": "0.16.0",
@@ -105,7 +105,7 @@
105
105
  "uplot-react": "1.1.4"
106
106
  },
107
107
  "devDependencies": {
108
- "@automattic/jetpack-base-styles": "^1.2.16",
108
+ "@automattic/jetpack-base-styles": "^1.2.17",
109
109
  "@babel/core": "7.29.7",
110
110
  "@jest/globals": "30.5.1",
111
111
  "@storybook/addon-docs": "10.4.6",