Skip to content

Commit

Permalink
Update the repo with the last changes done in WooCommerce Blocks plug…
Browse files Browse the repository at this point in the history
…in (#69)

* Use the archive-product template to render product attributes pages (#6776)

* Bump mockery/mockery from 1.4.4 to 1.5.0 (#6703)

Bumps [mockery/mockery](https://github.com/mockery/mockery) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/mockery/mockery/releases)
- [Changelog](https://github.com/mockery/mockery/blob/master/CHANGELOG.md)
- [Commits](mockery/mockery@1.4.4...1.5.0)

---
updated-dependencies:
- dependency-name: mockery/mockery
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alba Rincón <[email protected]>

* Update dependency @types/jest to v27.5.2 (#6759)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Ensure addresses sync when loading the checkout shipping address block (#6773)

* Update pull_request_template.md

* Add comment to prevent linting error on commented out code (#6789)

* Update pull_request_template.md

* Update dependency @types/wordpress__blocks to v11.0.5 (#6758)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update babel monorepo to v7.18.9 (#6719)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Refactor external dispatch actions from being called inside useSelect (#6718)

* refactor coupon functions outside of useSelect

* fix test

* Add new icon for mini cart block (#6784)

* Add new icon for mini cart block (inserter).

See woocommerce/woocommerce-blocks#6617.

* Adjust size of SVG

The new SVG was rendering a little bit smaller than the original icon.
Potentially because of the mask and the artboard size.

This commit adjusts the size to render at the same size as the original
version of the icon in the inserter.

* add new action for customer updates (#6792)

* Fix: Replace DropdownSelector with FormTokenField from Gutenberg (#6647)

* Fix missing translations in inspector (#6737)

* Try registering the "cart taxes" inner block

Registering server side. This example isn't working, but I'm pushing to
share it and see what's wrong with this implementation.

* Fix registering the cart taxes inner block issue

* Update translation script loading

* Remove unnecessary JS translation

The translation should work fine by getting the title & description from
the `block.json` file

* Put back the initial code in the 'Cart Taxes' inner block

We didn't provide the correct `block.json` file path server side,
that's why the `metadata` wasn't correctly registered

* Generate `block.json`files for inner blocks

This is the first step on fixing the missing translations of `metadata`
in `block.json` files

* Set the folder name exactly the same as the inner block name

We are doing this first test for the `Cart taxes` inner block.

The `Block` & its containing folder need to have the same name for:
- Consistency
- We use the `Block` name to get the file Path

* Update imports after folder renaming

* Get block name directly from the JSON metadata

Getting the block name from the JSON metadata is less error prone than
extracting it from the file path.

And no need to rename all our `inner-blocks` to get the correct
`block.json` path

* Revert folder naming change of `Cart taxes` inner block

Since we are getting the `block` name directly from the `block.json`
metadata instead of extracting it from the file path, there is no need
to keep their names in sync anymore

* Fix missing translations for the `Cart Subtotal` Block

* Register only the client-side settings on the client

When the block is registered on the server, you only need to register
the client-side settings on the client using the same block’s name.
See [docs](https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#javascript-client-side).

* Add schema validation to `block.json`

Development is improved by using a defined schema definition file.
Supported editors can provide help like tooltips, autocomplete, and
schema validation.

* Use the same `editor_script` as the parent block

This prevents WordPress from generating script tags to inexistant
inner blocks JS files

* Add C&C inner blocks in Cart.php & Checkout.php

This is a refactoring to keep the block types controller file less
overloaded

* Fix all Cart inner blocks missing translations

* Create the "AbstractInnerBlock" class

The "Inner Blocks" will use their parent's script, so no need to create
new scripts for each one of them

And, our "Inner Blocks" should always be registered using the metadata file

* Update the "Inner Blocks" PHP classes

* Fix PHP lint erros & update function description

* Fix missing translations bug for all Checkout Inner Blocks

* Update src/BlockTypes/Checkout.php

Co-authored-by: Seghir Nadir <[email protected]>

* skip lazy loaded scripts

Co-authored-by: Seghir Nadir <[email protected]>

* fix proceed to checkout button (#6804)

* Remove compatibility notice from Mini Cart block (#6803)

* Empty commit for release pull request

* Update 8.2.0 changelog

* Add 8.2.0 testing steps

* Fix typo in 8.2.0 testing steps

* Ensure package names display correctly if only one item is in package (#6815)

* Check package length >= 1 to show package name

* Check shipping rates length in order shipping packages slot

* Fix TS error where boolean value could be undefined

* Show items if there is more than one shipping rate

* Ensure package names display correctly if only one item is in package (#6815)

* Check package length >= 1 to show package name

* Check shipping rates length in order shipping packages slot

* Fix TS error where boolean value could be undefined

* Show items if there is more than one shipping rate

* Update 8.2.0 testing zip

* Add option to hide/show price in Mini Cart block  (#6796)

* Add toggle control to sidebar in editor.

Adds a visibility toggle in the Mini Cart block's sidebar editor
settings for the block price.

* Update name of hasVisiblePrice attrubite.

Adjusts the name of the hasVisiblePrice attribute to hasHiddenPrice.
This seems a bit easier to reason about, where we can set the default
state of the visibility toggle to 'off'.

* Add conditional price rendering to server side.

Since this is a dynamic block, need to add the condidional attribute
state to the server-side render callback.

* Add price visibility setting to block frontend.

We need to prevent pricec from rendering when hidden setting is active
after the JS kicks in on the frontend (i.e., when the Mini Cart is
interacted with by the user).

* Fix logic error in frontend rendering conditional.

* Add unit tests for both show/hide price states.

* Bumping version strings to new version.

* Remove empty element from changelog

* Release: 8.2.0 (#6806)

* Empty commit for release pull request

* Update 8.2.0 changelog

* Add 8.2.0 testing steps

* Fix typo in 8.2.0 testing steps

* Ensure package names display correctly if only one item is in package (#6815)

* Check package length >= 1 to show package name

* Check shipping rates length in order shipping packages slot

* Fix TS error where boolean value could be undefined

* Show items if there is more than one shipping rate

* Update 8.2.0 testing zip

* Bumping version strings to new version.

* Remove empty element from changelog

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Albert Juhé Lluveras <[email protected]>
Co-authored-by: Thomas Roberts <[email protected]>

* Update version to 8.3.0-dev

* Bump @wordpress/is-shallow-equal from 4.12.0 to 4.13.0 (#6710)

Bumps [@wordpress/is-shallow-equal](https://github.com/WordPress/gutenberg/tree/HEAD/packages/is-shallow-equal) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/is-shallow-equal/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/is-shallow-equal)

---
updated-dependencies:
- dependency-name: "@wordpress/is-shallow-equal"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Bump AbleLincoln/push-to-sftp from 1.0 to 1.2 (#6808)

Bumps [AbleLincoln/push-to-sftp](https://github.com/AbleLincoln/push-to-sftp) from 1.0 to 1.2.
- [Release notes](https://github.com/AbleLincoln/push-to-sftp/releases)
- [Commits](AbleLincoln/push-to-sftp@v1.0...v1.2)

---
updated-dependencies:
- dependency-name: AbleLincoln/push-to-sftp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Bump @wordpress/i18n from 4.12.0 to 4.14.0 (#6817)

Bumps [@wordpress/i18n](https://github.com/WordPress/gutenberg/tree/HEAD/packages/i18n) from 4.12.0 to 4.14.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/i18n/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/i18n)

---
updated-dependencies:
- dependency-name: "@wordpress/i18n"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Bump yoast/phpunit-polyfills from 1.0.2 to 1.0.3 (#6704)

Bumps [yoast/phpunit-polyfills](https://github.com/Yoast/PHPUnit-Polyfills) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/Yoast/PHPUnit-Polyfills/releases)
- [Changelog](https://github.com/Yoast/PHPUnit-Polyfills/blob/develop/CHANGELOG.md)
- [Commits](Yoast/PHPUnit-Polyfills@1.0.2...1.0.3)

---
updated-dependencies:
- dependency-name: yoast/phpunit-polyfills
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github/codeql-action from 1 to 2 (#6700)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Bump johnbillion/wp-hooks-generator from 0.7.0 to 0.9.0 (#6705)

Bumps [johnbillion/wp-hooks-generator](https://github.com/johnbillion/wp-hooks-generator) from 0.7.0 to 0.9.0.
- [Release notes](https://github.com/johnbillion/wp-hooks-generator/releases)
- [Commits](wp-hooks/generator@0.7.0...0.9.0)

---
updated-dependencies:
- dependency-name: johnbillion/wp-hooks-generator
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Bump @wordpress/wordcount from 3.12.0 to 3.13.0 (#6711)

Bumps [@wordpress/wordcount](https://github.com/WordPress/gutenberg/tree/HEAD/packages/wordcount) from 3.12.0 to 3.13.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/wordcount/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/wordcount)

---
updated-dependencies:
- dependency-name: "@wordpress/wordcount"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 5.30.5 to 5.31.0 (#6809)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.5 to 5.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.31.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Empty commit for release pull request

* Ensure onChange is set for radio buttons in SavedPaymentMethodOptions (#6825)

Co-authored-by: Seghir Nadir <[email protected]>

* delete renovate bot (#6824)

* Bump @wordpress/api-fetch from 6.9.0 to 6.11.0 (#6833)

Bumps [@wordpress/api-fetch](https://github.com/WordPress/gutenberg/tree/HEAD/packages/api-fetch) from 6.9.0 to 6.11.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/api-fetch/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/api-fetch)

---
updated-dependencies:
- dependency-name: "@wordpress/api-fetch"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* E2E: Try improving product list loading state detection and fix Site Editor URL (#6811)

* e2e:try: detect loading state for product list

* fix: always use site-editor.php

* wait for price filter to be applied before checking the result

* Update renovate configuration (#6836)

* delete renovate bot

* update renovate configuration

* try now

* Bump mini-css-extract-plugin from 1.3.6 to 1.6.2 (#6714)

Bumps [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) from 1.3.6 to 1.6.2.
- [Release notes](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- [Changelog](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/mini-css-extract-plugin@v1.3.6...v1.6.2)

---
updated-dependencies:
- dependency-name: mini-css-extract-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>

* Release: 8.2.1 (#6826)

* Empty commit for release pull request

* Update 8.2.1 changelog

* Ensure onChange is set for radio buttons in SavedPaymentMethodOptions (#6825)

Co-authored-by: Seghir Nadir <[email protected]>

* Add 8.2.1 testing steps

* Bumping version strings to new version.

Co-authored-by: github-actions <[email protected]>
Co-authored-by: Paulo Arromba <[email protected]>
Co-authored-by: Thomas Roberts <[email protected]>
Co-authored-by: Seghir Nadir <[email protected]>

* fix markdownlint violation (#6853)

* Add missing label to dependabot configuration (#6848)

* Fix: Compare action should update its original comment instead of a new comment (#6736)

* Fix: flaky tests related to setMaxPrice (#6856)

* Add font-weight option to Mini Cart block text (#6760)

* Add font-weight option to Mini Cart button text.

Need to repeat steps for icon SVG and cart item count.

* Add font-weight controls to mini-cart item count.

* Add better error handling to PHP style output.

Ensure style value is set for style item in the
get_font_weight_class_and_style attributes array before rendering it to
the output.

* Revert font-weight option for quantity badge.

Per conversation with @vivialice, it looks better for now to keep the
font weight adjustment capabilities to just the price and leave the cart
icon and count as-is.

* Move $typography_styles variable into markup fn.

To resolve merge conflicts and get everything in it's proper place, this
commit will move the $typography_styles variable into the
get_cart_price_markup() function from #6796.

* Fix: Attribute filter flaky test (#6862)

* Fix: Override the description to prevent infinite loop (#6849)

* Update billing address when shipping address gets change in Cart block (#6823)

* Add Style Attributes Hooks to blocks/hooks Directory. (#6870)

* Copy style-attributes file to desired directory.

Add a copy of the style-attributes file in blocks/hooks to the desired
base/hooks directory with the other hooks.

* Remove relative imports in favor of global aliases

Utilizes the custom global project aliases in place of using relative
imports.

Note: seeing some linting issues with the aliases. This seems to be the
case elsewhere so it is likely not a blocker for this effort, however,
it may be worth looking into as a follow-up.

* Adjust all imports to use @woocommerce/base-hooks.

Replace all instances of relative file paths to hooks/style-attributes
to use the custom global alias.

* Remove the hooks dir in `assets/js/blocks/`.

Now that everything is using the `@woocommerce/base-hooks` custom global
alias and we have the `style-attributes` hooks file in the base/hooks
directory, we no longer need the `style-attributes` hooks file in the
aforementioned `assets/js/blocks` directory.

* Split style-attributes.ts out into separate files.

Moved the four hooks in style-attributes.ts out into their own, separate
hook file to be consistent with the rest of our custom hooks.

Additionally, moved the helper function (parseStyle) out into a separate
export in base/utils.

* All Products block: Try hydrating

* Enqueue script that adds <gutenberg-interactive-block> custom element

* Fix nomenclature

* Use BHE hydration for All Products Block

* Fix phpcs issues

* Add block deprecation

* Add StoreNoticesProvider wrapper back to frontend

* Update blockRegistry implementation:

- The registry is now the instance of a BlockRegistry class.
- The BlockRegistry class has a `whenDefined()` method which is used to
 await the registration of a block with a given name.

* Revert "Update blockRegistry implementation:"

This reverts commit 8edc7b2.

Co-authored-by: Alba Rincón <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Thomas Roberts <[email protected]>
Co-authored-by: Niels Lange <[email protected]>
Co-authored-by: Seghir Nadir <[email protected]>
Co-authored-by: Daniel W. Robert <[email protected]>
Co-authored-by: Tung Du <[email protected]>
Co-authored-by: Saad Tarhi <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Albert Juhé Lluveras <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luigi Teschio <[email protected]>
Co-authored-by: Paulo Arromba <[email protected]>
Co-authored-by: Tarun Vijwani <[email protected]>
Co-authored-by: Bernie Reiter <[email protected]>
Co-authored-by: Michal Czaplinski <[email protected]>
  • Loading branch information
18 people authored Aug 11, 2022
1 parent dcb05be commit 8467d25
Show file tree
Hide file tree
Showing 363 changed files with 5,178 additions and 3,848 deletions.
85 changes: 67 additions & 18 deletions .github/compare-assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,45 @@ const runner = async () => {
.filter( Boolean )
);

let reportCommentId;

{
const currentComments = await octokit.rest.issues.listComments( {
owner,
repo,
issue_number: payload.pull_request.number,
} );

if (
Array.isArray( currentComments.data ) &&
currentComments.data.length > 0
) {
const comment = currentComments.data.find(
( comment ) =>
comment.body.includes( 'Script Dependencies Report' ) &&
comment.user.login === 'github-actions[bot]'
);

if ( comment ) {
reportCommentId = comment.id;
}
}
}

if ( Object.keys( changes ).length === 0 ) {
if ( reportCommentId ) {
await octokit.rest.issues.updateComment( {
owner,
repo,
comment_id: reportCommentId,
body:
'# Script Dependencies Report' +
'\n\n' +
'There is no changed script dependency between this branch and trunk.' +
'\n\n' +
'__This comment was automatically generated by the `./github/compare-assets` action.__',
} );
}
return;
}

Expand Down Expand Up @@ -82,24 +120,35 @@ const runner = async () => {
}
);

await octokit.rest.issues.createComment( {
owner,
repo,
issue_number: payload.pull_request.number,
body:
'# Script Dependencies Report' +
'\n\n' +
'The `compare-assets` action has detected some changed script dependencies between this branch and ' +
'trunk. Please review and confirm the following are correct before merging.' +
'\n\n' +
'| Script Handle | Added | Removed | |' +
'\n' +
'| ------------- | ------| ------- | -- |' +
'\n' +
reportContent +
'\n\n' +
'__This comment was automatically generated by the `./github/compare-assets` action.__',
} );
const commentBody =
'# Script Dependencies Report' +
'\n\n' +
'The `compare-assets` action has detected some changed script dependencies between this branch and ' +
'trunk. Please review and confirm the following are correct before merging.' +
'\n\n' +
'| Script Handle | Added | Removed | |' +
'\n' +
'| ------------- | ------| ------- | -- |' +
'\n' +
reportContent +
'\n\n' +
'__This comment was automatically generated by the `./github/compare-assets` action.__';

if ( reportCommentId ) {
await octokit.rest.issues.updateComment( {
owner,
repo,
comment_id: reportCommentId,
body: commentBody,
} );
} else {
await octokit.rest.issues.createComment( {
owner,
repo,
issue_number: payload.pull_request.number,
body: commentBody,
} );
}
} catch ( error ) {
setFailed( error.message );
}
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,29 @@ updates:
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
labels:
- "skip-changelog"
- "type: dependencies"
- "github_actions"

# Maintain dependencies for npm
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
labels:
- "skip-changelog"
- "type: dependencies"
- "javascript"

# Maintain dependencies for Composer
- package-ecosystem: 'composer'
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
labels:
- "skip-changelog"
- "type: dependencies"
- "php"
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Fixes #

#### Other Checks

- [ ] This PR adds/removes a feature flag & I've updated [this doc](../docs/blocks/feature-flags-and-experimental-interfaces.md) .
- [ ] This PR adds/removes an experimental interfaces and I've updated [this doc](../docs/blocks/feature-flags-and-experimental-interfaces.md)
- [ ] This PR adds/removes a feature flag & I've updated [this doc](https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md).
- [ ] This PR adds/removes an experimental interfaces and I've updated [this doc](https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md).
- [ ] I tagged two reviewers because this PR makes queries to the database or I think it might have some security impact.

### Screenshots
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
add-reviews:
if: github.event.pull_request.draft == false
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Check config and assign reviews
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/generate-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: mv woocommerce-gutenberg-products-block.zip wc-blocks-pr-release__temp/woocommerce-gutenberg-products-block-${{ github.event.pull_request.number }}.zip

- name: Transfer ZIP file via SFTP
uses: AbleLincoln/push-to-sftp@v1.0
uses: AbleLincoln/push-to-sftp@v1.2
with:
host: ${{ secrets.FTP_HOST }}
port: 22
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/js-css-md-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
push:
branches: [trunk]
permissions:
actions: write
checks: write
pull-requests: read

jobs:
# cache node and modules
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/project-management-automations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
issues:
types: [edited]
name: Project management automations
permissions:
pull-requests: write
actions: write
jobs:
project-management-automation:
runs-on: ubuntu-latest
Expand Down
12 changes: 6 additions & 6 deletions assets/js/atomic/blocks/product-elements/button/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import {
useStoreEvents,
useStoreAddToCart,
} from '@woocommerce/base-context/hooks';
import {
useBorderProps,
useColorProps,
useTypographyProps,
useSpacingProps,
} from '@woocommerce/base-hooks';
import { decodeEntities } from '@wordpress/html-entities';
import { CART_URL } from '@woocommerce/block-settings';
import { getSetting } from '@woocommerce/settings';
Expand All @@ -21,12 +27,6 @@ import { withProductDataContext } from '@woocommerce/shared-hocs';
* Internal dependencies
*/
import './style.scss';
import {
useBorderProps,
useColorProps,
useTypographyProps,
useSpacingProps,
} from '../../../../hooks/style-attributes';

/**
* Product Button Block Component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import { useColorProps, useTypographyProps } from '@woocommerce/base-hooks';
import { isEmpty } from 'lodash';
import { withProductDataContext } from '@woocommerce/shared-hocs';
import { HTMLAttributes } from 'react';
Expand All @@ -16,10 +17,6 @@ import { HTMLAttributes } from 'react';
*/
import './style.scss';
import { Attributes } from './types';
import {
useColorProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

type Props = Attributes & HTMLAttributes< HTMLDivElement >;

Expand Down
10 changes: 5 additions & 5 deletions assets/js/atomic/blocks/product-elements/image/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import {
useBorderProps,
useSpacingProps,
useTypographyProps,
} from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';
import { useStoreEvents } from '@woocommerce/base-context/hooks';

Expand All @@ -18,11 +23,6 @@ import { useStoreEvents } from '@woocommerce/base-context/hooks';
*/
import ProductSaleBadge from './../sale-badge/block';
import './style.scss';
import {
useBorderProps,
useSpacingProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

/**
* Product Image Block Component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ import { ProductDataContextProvider } from '@woocommerce/shared-context';
*/
import { Block } from '../block';

jest.mock( '@woocommerce/block-settings', () => ( {
...jest.requireActual( '@woocommerce/block-settings' ),
__esModule: true,
PLACEHOLDER_IMG_SRC: 'placeholder.jpg',
} ) );

jest.mock( '../../../../../hooks/style-attributes', () => ( {
jest.mock( '@woocommerce/base-hooks', () => ( {
__esModule: true,
useBorderProps: jest.fn( () => ( {
className: '',
Expand Down
5 changes: 1 addition & 4 deletions assets/js/atomic/blocks/product-elements/price/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import { useColorProps, useTypographyProps } from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';

/**
* Internal dependencies
*/
import {
useColorProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

/**
* Product Price Block Component.
Expand Down
10 changes: 5 additions & 5 deletions assets/js/atomic/blocks/product-elements/rating/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import {
useColorProps,
useSpacingProps,
useTypographyProps,
} from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';

/**
* Internal dependencies
*/
import './style.scss';
import {
useColorProps,
useSpacingProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

/**
* Product Rating Block Component.
Expand Down
12 changes: 6 additions & 6 deletions assets/js/atomic/blocks/product-elements/sale-badge/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import {
useBorderProps,
useColorProps,
useSpacingProps,
useTypographyProps,
} from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';

/**
* Internal dependencies
*/
import './style.scss';
import {
useBorderProps,
useColorProps,
useSpacingProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

/**
* Product Sale Badge Block Component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import { useColorProps, useTypographyProps } from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';

/**
* Internal dependencies
*/
import './style.scss';
import {
useColorProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

/**
* Product Stock Indicator Block Component.
Expand Down
5 changes: 1 addition & 4 deletions assets/js/atomic/blocks/product-elements/summary/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ import {
useInnerBlockLayoutContext,
useProductDataContext,
} from '@woocommerce/shared-context';
import { useColorProps, useTypographyProps } from '@woocommerce/base-hooks';
import { withProductDataContext } from '@woocommerce/shared-hocs';

/**
* Internal dependencies
*/
import './style.scss';
import {
useColorProps,
useTypographyProps,
} from '../../../../hooks/style-attributes';

/**
* Product Summary Block Component.
Expand Down
Loading

0 comments on commit 8467d25

Please sign in to comment.