Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the repo with the last changes done in WooCommerce Blocks plugin #69

Merged
merged 64 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b446a37
Use the archive-product template to render product attributes pages (…
albarin Jul 28, 2022
02ceb0d
Bump mockery/mockery from 1.4.4 to 1.5.0 (#6703)
dependabot[bot] Jul 28, 2022
53f8fa4
Update dependency @types/jest to v27.5.2 (#6759)
renovate[bot] Jul 28, 2022
08798bc
Ensure addresses sync when loading the checkout shipping address bloc…
opr Jul 28, 2022
87af389
Update pull_request_template.md
nielslange Jul 29, 2022
03d909c
Add comment to prevent linting error on commented out code (#6789)
opr Jul 29, 2022
c4b443c
Update pull_request_template.md
nielslange Jul 29, 2022
a49cf63
Update dependency @types/wordpress__blocks to v11.0.5 (#6758)
renovate[bot] Jul 29, 2022
4e4df60
Update babel monorepo to v7.18.9 (#6719)
renovate[bot] Jul 29, 2022
4eed41d
Refactor external dispatch actions from being called inside useSelect…
senadir Jul 29, 2022
e075767
Add new icon for mini cart block (#6784)
danielwrobert Jul 29, 2022
1db184d
add new action for customer updates (#6792)
senadir Aug 1, 2022
28c2a68
Fix: Replace DropdownSelector with FormTokenField from Gutenberg (#6647)
dinhtungdu Aug 1, 2022
9d57054
Fix missing translations in inspector (#6737)
tarhi-saad Aug 1, 2022
33dfd70
fix proceed to checkout button (#6804)
senadir Aug 1, 2022
279d667
Remove compatibility notice from Mini Cart block (#6803)
dinhtungdu Aug 1, 2022
fa30e5f
Empty commit for release pull request
invalid-email-address Aug 1, 2022
218024b
Update 8.2.0 changelog
Aljullu Aug 1, 2022
85c42cc
Add 8.2.0 testing steps
Aljullu Aug 1, 2022
d844a35
Fix typo in 8.2.0 testing steps
Aljullu Aug 2, 2022
84f107a
Ensure package names display correctly if only one item is in package…
opr Aug 2, 2022
43c3037
Ensure package names display correctly if only one item is in package…
opr Aug 2, 2022
a14445c
Update 8.2.0 testing zip
Aljullu Aug 2, 2022
0bc0c75
Add option to hide/show price in Mini Cart block (#6796)
danielwrobert Aug 2, 2022
ac90d3b
Bumping version strings to new version.
Aljullu Aug 2, 2022
477b939
Remove empty element from changelog
Aljullu Aug 2, 2022
747a6e4
Release: 8.2.0 (#6806)
github-actions[bot] Aug 2, 2022
192ba58
Update version to 8.3.0-dev
Aljullu Aug 2, 2022
c5e03b2
Bump @wordpress/is-shallow-equal from 4.12.0 to 4.13.0 (#6710)
dependabot[bot] Aug 2, 2022
b744572
Bump AbleLincoln/push-to-sftp from 1.0 to 1.2 (#6808)
dependabot[bot] Aug 3, 2022
34657e0
Bump @wordpress/i18n from 4.12.0 to 4.14.0 (#6817)
dependabot[bot] Aug 3, 2022
0c77e02
Bump yoast/phpunit-polyfills from 1.0.2 to 1.0.3 (#6704)
dependabot[bot] Aug 3, 2022
f54dffb
Bump github/codeql-action from 1 to 2 (#6700)
dependabot[bot] Aug 3, 2022
4b64133
Bump johnbillion/wp-hooks-generator from 0.7.0 to 0.9.0 (#6705)
dependabot[bot] Aug 3, 2022
56177f2
Bump @wordpress/wordcount from 3.12.0 to 3.13.0 (#6711)
dependabot[bot] Aug 3, 2022
806bbcc
Bump @typescript-eslint/parser from 5.30.5 to 5.31.0 (#6809)
dependabot[bot] Aug 3, 2022
dc3a3f0
Empty commit for release pull request
invalid-email-address Aug 3, 2022
23c8e62
Ensure onChange is set for radio buttons in SavedPaymentMethodOptions…
opr Aug 3, 2022
74a24d8
delete renovate bot (#6824)
gigitux Aug 3, 2022
e270499
Bump @wordpress/api-fetch from 6.9.0 to 6.11.0 (#6833)
dependabot[bot] Aug 3, 2022
c1cecbc
E2E: Try improving product list loading state detection and fix Site …
dinhtungdu Aug 3, 2022
3b2c518
Update renovate configuration (#6836)
gigitux Aug 4, 2022
5ee0293
Bump mini-css-extract-plugin from 1.3.6 to 1.6.2 (#6714)
dependabot[bot] Aug 4, 2022
d1837eb
Release: 8.2.1 (#6826)
github-actions[bot] Aug 4, 2022
2696b84
Merge branch 'release/8.2.0' into trunk
wavvves Aug 4, 2022
4781380
fix markdownlint violation (#6853)
gigitux Aug 4, 2022
2e2cb99
Add missing label to dependabot configuration (#6848)
gigitux Aug 5, 2022
4ad7edb
Fix: Compare action should update its original comment instead of a n…
dinhtungdu Aug 5, 2022
ec33f8f
Fix: flaky tests related to setMaxPrice (#6856)
dinhtungdu Aug 5, 2022
9568e09
Add font-weight option to Mini Cart block text (#6760)
danielwrobert Aug 5, 2022
b61566a
Fix: Attribute filter flaky test (#6862)
dinhtungdu Aug 9, 2022
95edc5e
Fix: Override the description to prevent infinite loop (#6849)
dinhtungdu Aug 9, 2022
49d429f
Update billing address when shipping address gets change in Cart bloc…
Aug 10, 2022
5efb5a5
Add Style Attributes Hooks to blocks/hooks Directory. (#6870)
danielwrobert Aug 11, 2022
0651163
All Products block: Try hydrating
ockham Jul 28, 2022
a64c179
Enqueue script that adds <gutenberg-interactive-block> custom element
michalczaplinski Jul 22, 2022
8d98d1e
Fix nomenclature
ockham Jul 29, 2022
a699499
Use BHE hydration for All Products Block
ockham Jul 29, 2022
4f36cf5
Fix phpcs issues
michalczaplinski Aug 1, 2022
92c93fa
Add block deprecation
ockham Aug 2, 2022
5985811
Add StoreNoticesProvider wrapper back to frontend
ockham Aug 2, 2022
ee3ab9e
Update blockRegistry implementation:
michalczaplinski Aug 4, 2022
3ce8ede
Revert "Update blockRegistry implementation:"
ockham Aug 4, 2022
35dc9ea
Merge branch 'trunk' into update/woo-blocks-to-woo-blocks-bhe
cbravobernal Aug 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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