Skip to content

Commit

Permalink
Merge develop.
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejost committed Oct 4, 2022
2 parents 3adf729 + 4ec3dab commit fed8b39
Show file tree
Hide file tree
Showing 824 changed files with 25,633 additions and 11,193 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-tests-wp-4-7-php-5-6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ jobs:
extensions: mysqli, runkit, uopz
php-version: '5.6'
- name: Set up PHP test data
run: tests/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
run: tests/phpunit/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
- name: Run Unit Tests
run: composer test -- --verbose
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ jobs:
- name: Composer Install
run: composer install --no-interaction --no-progress
- name: Set up PHP test data
run: tests/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
run: tests/phpunit/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
- name: Run Unit Tests
run: composer test:multisite -- --verbose
2 changes: 1 addition & 1 deletion .github/workflows/php-tests-wp-latest-php-7-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ jobs:
- name: Composer Install
run: composer install --no-interaction --no-progress
- name: Set up PHP test data
run: tests/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
run: tests/phpunit/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
- name: Run Unit Tests
run: composer test -- --verbose
2 changes: 1 addition & 1 deletion .github/workflows/php-tests-wp-latest-php-8-0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ jobs:
- name: Update PHPUnit
run: composer update phpunit/phpunit --with-dependencies --ignore-platform-reqs --no-scripts
- name: Set up PHP test data
run: tests/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
run: tests/phpunit/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
- name: Run Unit Tests
run: composer test -- --verbose
2 changes: 1 addition & 1 deletion .github/workflows/php-tests-wp-nightly-php-7-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ jobs:
- name: Composer Install
run: composer install --no-interaction --no-progress
- name: Set up PHP test data
run: tests/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
run: tests/phpunit/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION}
- name: Run Unit Tests
run: composer test -- --verbose
1 change: 1 addition & 0 deletions .github/workflows/visual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- '.nvmrc'
- '**/package.json'
- 'package-lock.json'
- 'src/tests/backstop/config.js'
types:
- opened
- reopened
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/zips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
if: false == ( ( github.event_name == 'pull_request' && ( github.event.action == 'closed' || github.event.pull_request.draft == true || contains( github.head_ref, 'dependabot/' ) ) ) || github.event.pull_request.head.repo.fork )
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: composer:2.1
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -81,10 +85,7 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Composer Install
uses: php-actions/composer@v4
with:
dev: no
php_version: 7.3
run: composer install --no-interaction --no-progress --no-dev
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
Expand Down
13 changes: 0 additions & 13 deletions .storybook/storybook-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,6 @@ module.exports = [
},
},
},
{
id: 'global-notifications--module-setup-complete',
kind: 'Global/Notifications',
name: 'Module Setup Complete',
story: 'Module Setup Complete',
parameters: {
fileName: './stories/notifications.stories.js',
options: {
hierarchyRootSeparator: '|',
hierarchySeparator: {},
},
},
},
{
id: 'global-notifications--small-with-image',
kind: 'Global/Notifications',
Expand Down
9 changes: 0 additions & 9 deletions .storybook/utils/resetGlobals.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ export const resetGlobals = () => {
initialVersion: '',
verified: true,
userInputState: 'completed',
permissions: {
googlesitekit_authenticate: true,
googlesitekit_setup: true,
googlesitekit_view_posts_insights: true,
googlesitekit_view_dashboard: true,
googlesitekit_view_module_details: true,
googlesitekit_manage_options: true,
googlesitekit_publish_posts: true,
},
};
global._googlesitekitTrackingData = {
referenceSiteURL: 'http://example.com/',
Expand Down
23 changes: 17 additions & 6 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
{
"extends": "stylelint-config-wordpress",
"extends": [
"@wordpress/stylelint-config",
"stylelint-config-standard-scss"
],
"plugins": [
"stylelint-declaration-use-variable",
"stylelint-declaration-strict-value",
"stylelint-order",
"stylelint-scss"
],
"rules": {
"indentation": "tab",
"declaration-empty-line-before": null,
"scss/no-global-function-names": null,
"scss/dollar-variable-empty-line-before": null,
"scss/at-extend-no-missing-placeholder": null,
"scss/dollar-variable-pattern": null,
"color-function-notation": null,
"alpha-value-notation": null,
"rule-empty-line-before": null,
"at-rule-empty-line-before": null,
"string-quotes": "double",
"at-rule-no-unknown": null,
"declaration-property-unit-whitelist": null,
"declaration-property-unit-allowed-list": null,
"function-url-quotes": "always",
"selector-class-pattern": null,
"sh-waqar/declaration-use-variable": [["/color/", { "ignoreValues": ["/^rgba/", "transparent"] }]],
"order/properties-alphabetical-order": true,
"scss/at-rule-no-unknown": true,
"value-keyword-case": [ "lower", {
"ignoreKeywords": ["/([A-Z])/"]
}
]
}
}
}
47 changes: 26 additions & 21 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
{
"search.exclude": {
".storybook/data": true,
"dist/": true,
"node_modules/": true,
"third-party/": true,
"vendor/": true
},
"files.exclude": {
"dist/": true,
"node_modules/": true,
"third-party/": true,
"vendor/": true
},
"jest.autoEnable": false,
"jest.pathToConfig": "./tests/js/jest.config.js",
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
},
"phpcs.enable": true,
"phpcs.executablePath": "vendor/bin/phpcs"
"search.exclude": {
".storybook/data": true,
"dist/": true,
"node_modules/": true,
"third-party/": true,
"vendor/": true
},
"files.exclude": {
"dist/": true,
"node_modules/": true,
"third-party/": true,
"vendor/": true
},
"jest.autoEnable": false,
"jest.pathToConfig": "./tests/js/jest.config.js",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
},
"phpcs.enable": true,
"phpcs.executablePath": "vendor/bin/phpcs",
"stylelint.validate": [ "css", "scss" ]
}
36 changes: 36 additions & 0 deletions __mocks__/tabbable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Tabbable mock.
*
* Site Kit by Google, Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// Mocking tabbable as per https://github.com/focus-trap/tabbable#testing-in-jsdom
// Load the tabbable version used by focus-trap-react since another version of tabbable is
// being used by MDC components.
const lib = jest.requireActual( 'focus-trap-react/node_modules/tabbable' );

const tabbable = {
...lib,
isFocusable: ( node, options ) =>
lib.isFocusable( node, { ...options, displayCheck: 'none' } ),
isTabbable: ( node, options ) =>
lib.isTabbable( node, { ...options, displayCheck: 'none' } ),
tabbable: ( node, options ) =>
lib.tabbable( node, { ...options, displayCheck: 'none' } ),
focusable: ( node, options ) =>
lib.focusable( node, { ...options, displayCheck: 'none' } ),
};

module.exports = tabbable;
5 changes: 2 additions & 3 deletions assets/js/components/ActivateAnalyticsCTA.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ const { useSelect } = Data;

export default function ActivateAnalyticsCTA( { children } ) {
const activateModuleCallback = useActivateModuleCallback( 'analytics' );
const completeModuleActivationCallback = useCompleteModuleActivationCallback(
'analytics'
);
const completeModuleActivationCallback =
useCompleteModuleActivationCallback( 'analytics' );
const analyticsModuleActive = useSelect( ( select ) =>
select( CORE_MODULES ).isModuleActive( 'analytics' )
);
Expand Down
113 changes: 0 additions & 113 deletions assets/js/components/ActivateModuleCTA.js

This file was deleted.

Loading

0 comments on commit fed8b39

Please sign in to comment.