Skip to content

Commit c730f9e

Browse files
committed
Merge remote-tracking branch 'origin/develop' into infrastructure/9103-tidy-up-and-remove-redundant-use-of-label-property-in-vrt-scenarios.
2 parents c8e2af6 + 5a6f988 commit c730f9e

File tree

346 files changed

+52466
-66619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+52466
-66619
lines changed

.babelrc

-9
This file was deleted.

.github/workflows/storybook.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,16 @@ jobs:
5959
- name: Setup Node.js (.nvmrc)
6060
uses: actions/setup-node@v4
6161
with:
62-
node-version-file: '.nvmrc'
63-
cache: 'npm'
62+
node-version-file: .nvmrc
63+
cache: npm
64+
# npm@7 is the minimum version required for this repository.
65+
# TODO: Remove this step once our node base version comes with npm@7 or greater.
66+
- name: Install npm globally
67+
run: npm run install-global-npm
6468
- name: npm install
65-
run: |
66-
npm ci
69+
run: npm ci
6770
- name: Build Storybook
68-
run: |
69-
npm run build:storybook
71+
run: npm run build:storybook
7072
- name: Upload artifacts
7173
uses: actions/upload-artifact@v4
7274
with:
@@ -140,11 +142,13 @@ jobs:
140142
- name: Setup Node.js (.nvmrc)
141143
uses: actions/setup-node@v4
142144
with:
143-
node-version-file: '.nvmrc'
144-
cache: 'npm'
145+
node-version-file: .nvmrc
146+
cache: npm
147+
# npm@7 is the minimum version required for this repository.
148+
# TODO: Remove this step once our node base version comes with npm@7 or greater.
149+
- name: Install npm globally
150+
run: npm run install-global-npm
145151
- name: npm install
146-
run: |
147-
npm ci
152+
run: npm ci
148153
- name: Test Storybook
149-
run: |
150-
npm run test:storybook
154+
run: npm run test:storybook

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"**/composer.lock": true,
77
"**/package-lock.json": true,
88
"third-party/": true,
9-
"**/vendor/": true
9+
"vendor/": true
1010
},
1111
"files.exclude": {
1212
"**/dist": true,
1313
"coverage/": true,
1414
"**/node_modules/": true,
1515
"third-party/": true,
16-
"**/vendor/": true
16+
"vendor/": true
1717
},
1818
"jest.autoEnable": false,
1919
"jest.pathToConfig": "./tests/js/jest.config.js",

assets/blocks/reader-revenue-manager/contribute-with-google/block.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 2,
44
"name": "google-site-kit/rrm-contribute-with-google",
5-
"version": "1.150.0",
5+
"version": "1.151.0",
66
"title": "Contribute with Google",
77
"category": "widgets",
88
"icon": "google",

assets/blocks/reader-revenue-manager/subscribe-with-google/block.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 2,
44
"name": "google-site-kit/rrm-subscribe-with-google",
5-
"version": "1.150.0",
5+
"version": "1.151.0",
66
"title": "Subscribe with Google",
77
"category": "widgets",
88
"icon": "google",

assets/blocks/sign-in-with-google/block.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 2,
44
"name": "google-site-kit/sign-in-with-google",
5-
"version": "1.150.0",
5+
"version": "1.151.0",
66
"title": "Sign in with Google",
77
"category": "widgets",
88
"icon": "google",
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Site Kit by Google, Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* External dependencies
19+
*/
20+
import PropTypes from 'prop-types';
21+
22+
/**
23+
* Internal dependencies
24+
*/
25+
import { SpinnerButton } from 'googlesitekit-components';
26+
27+
export default function CTAButton( { label, disabled, inProgress, onClick } ) {
28+
return (
29+
<SpinnerButton
30+
className="googlesitekit-notice__cta"
31+
disabled={ disabled }
32+
isSaving={ inProgress }
33+
onClick={ onClick }
34+
>
35+
{ label }
36+
</SpinnerButton>
37+
);
38+
}
39+
40+
// eslint-disable-next-line sitekit/acronym-case
41+
CTAButton.propTypes = {
42+
label: PropTypes.string.isRequired,
43+
disabled: PropTypes.bool,
44+
inProgress: PropTypes.bool,
45+
onClick: PropTypes.func.isRequired,
46+
};
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Site Kit by Google, Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* External dependencies
19+
*/
20+
import classnames from 'classnames';
21+
import PropTypes from 'prop-types';
22+
23+
export default function Description( { className, children } ) {
24+
return (
25+
<p
26+
className={ classnames(
27+
'googlesitekit-notice__description',
28+
className
29+
) }
30+
>
31+
{ children }
32+
</p>
33+
);
34+
}
35+
36+
Description.propTypes = {
37+
className: PropTypes.string,
38+
children: PropTypes.node,
39+
};
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/**
2-
* Public components entrypoint.
3-
*
4-
* Site Kit by Google, Copyright 2022 Google LLC
2+
* Site Kit by Google, Copyright 2025 Google LLC
53
*
64
* Licensed under the Apache License, Version 2.0 (the "License");
75
* you may not use this file except in compliance with the License.
@@ -16,35 +14,33 @@
1614
* limitations under the License.
1715
*/
1816

17+
/**
18+
* External dependencies
19+
*/
20+
import PropTypes from 'prop-types';
21+
22+
/**
23+
* WordPress dependencies
24+
*/
25+
import { __ } from '@wordpress/i18n';
26+
1927
/**
2028
* Internal dependencies
2129
*/
22-
import Components from './googlesitekit/components-gm3';
30+
import { Button } from 'googlesitekit-components';
2331

24-
if ( typeof global.googlesitekit === 'undefined' ) {
25-
global.googlesitekit = {};
32+
export default function DismissButton( {
33+
label = __( 'Got it!', 'google-site-kit' ),
34+
onClick,
35+
} ) {
36+
return (
37+
<Button onClick={ onClick } tertiary>
38+
{ label }
39+
</Button>
40+
);
2641
}
2742

28-
global.googlesitekit.components = Components;
29-
30-
export const {
31-
Button,
32-
Checkbox,
33-
Chip,
34-
CircularProgress,
35-
Dialog,
36-
DialogTitle,
37-
DialogContent,
38-
DialogFooter,
39-
Menu,
40-
Option,
41-
ProgressBar,
42-
Radio,
43-
Select,
44-
SpinnerButton,
45-
Switch,
46-
Tab,
47-
TabBar,
48-
TextField,
49-
Tooltip,
50-
} = Components;
43+
DismissButton.propTypes = {
44+
label: PropTypes.string,
45+
onClick: PropTypes.func.isRequired,
46+
};

assets/js/components/Notice/Icon.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Site Kit by Google, Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* External dependencies
19+
*/
20+
import PropTypes from 'prop-types';
21+
22+
/**
23+
* Internal dependencies
24+
*/
25+
import CheckFill from '../../../svg/icons/check-fill.svg';
26+
import WarningSVG from '../../../svg/icons/warning.svg';
27+
import StarFill from '../../../svg/icons/star-fill.svg';
28+
import { TYPES } from './constants';
29+
30+
const typeIconMap = {
31+
[ TYPES.NEW ]: StarFill,
32+
[ TYPES.SUCCESS ]: CheckFill,
33+
[ TYPES.INFO ]: WarningSVG,
34+
[ TYPES.WARNING ]: WarningSVG,
35+
[ TYPES.ERROR ]: WarningSVG,
36+
};
37+
38+
export default function Icon( { type } ) {
39+
const IconComponent = typeIconMap[ type ] || WarningSVG;
40+
41+
return <IconComponent width={ 26 } height={ 26 } />;
42+
}
43+
44+
Icon.propTypes = {
45+
type: PropTypes.oneOf( Object.values( TYPES ) ),
46+
};

assets/js/googlesitekit/components-gm3/CircularProgress.js renamed to assets/js/components/Notice/Title.js

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/**
2-
* CircularProgress component.
3-
*
4-
* Site Kit by Google, Copyright 2023 Google LLC
2+
* Site Kit by Google, Copyright 2025 Google LLC
53
*
64
* Licensed under the Apache License, Version 2.0 (the "License");
75
* you may not use this file except in compliance with the License.
@@ -16,6 +14,21 @@
1614
* limitations under the License.
1715
*/
1816

19-
export default function CircularProgress() {
20-
return null;
17+
/**
18+
* External dependencies
19+
*/
20+
import classnames from 'classnames';
21+
import PropTypes from 'prop-types';
22+
23+
export default function Title( { className, children } ) {
24+
return (
25+
<p className={ classnames( 'googlesitekit-notice__title', className ) }>
26+
{ children }
27+
</p>
28+
);
2129
}
30+
31+
Title.propTypes = {
32+
className: PropTypes.string,
33+
children: PropTypes.node,
34+
};

assets/js/googlesitekit/components-gm3/Chip.js renamed to assets/js/components/Notice/constants.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/**
2-
* Chip component.
3-
*
4-
* Site Kit by Google, Copyright 2022 Google LLC
2+
* Site Kit by Google, Copyright 2025 Google LLC
53
*
64
* Licensed under the Apache License, Version 2.0 (the "License");
75
* you may not use this file except in compliance with the License.
@@ -16,6 +14,10 @@
1614
* limitations under the License.
1715
*/
1816

19-
export default function Chip() {
20-
return null;
21-
}
17+
export const TYPES = {
18+
NEW: 'new',
19+
SUCCESS: 'success',
20+
WARNING: 'warning',
21+
INFO: 'info',
22+
ERROR: 'error',
23+
};

0 commit comments

Comments
 (0)