From d7783511fffc1279bcad199ae0a05be9fb160c73 Mon Sep 17 00:00:00 2001 From: Gabriel Manussakis <9420947+Manussakis@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:57:38 -0300 Subject: [PATCH] [WIP][Accessibility] Fix inline documentation typos in woocommerce-blocks (#50737) * Fix inline documentation typos in woocommerce-blocks * Add changelog file * Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce * Remove original changelog --------- Co-authored-by: github-actions Co-authored-by: Mike Jolley --- .../assets/js/atomic/blocks/product-elements/price/block.tsx | 2 +- .../assets/js/atomic/blocks/product-elements/sku/edit.tsx | 2 +- .../atomic/blocks/product-elements/stock-indicator/edit.tsx | 2 +- .../assets/js/base/components/block-error-boundary/types.ts | 4 ++-- .../assets/js/base/components/price-slider/index.tsx | 2 +- .../js/base/context/hooks/collections/use-collection.ts | 2 +- .../assets/js/base/context/hooks/test/use-query-state.jsx | 2 +- .../assets/js/blocks/active-filters/block.tsx | 2 +- .../assets/js/blocks/cart-checkout-shared/hacks.ts | 2 +- plugins/woocommerce-blocks/assets/js/data/checkout/actions.ts | 2 +- .../editor-components/search-list-control/test/hierarchy.js | 2 +- plugins/woocommerce-blocks/assets/js/interactivity/vdom.js | 2 +- plugins/woocommerce-blocks/bin/gen-block-list-doc.js | 4 ++-- plugins/woocommerce-blocks/phpcs.xml | 2 +- plugins/woocommerce-blocks/readme.txt | 2 +- plugins/woocommerce-blocks/storybook/main.js | 2 +- .../changelog/50737-fix-37502-inline-doc-typos-in-woo-blocks | 4 ++++ 17 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 plugins/woocommerce/changelog/50737-fix-37502-inline-doc-typos-in-woo-blocks diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx index 63bdef4842a..8296928e1a3 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx @@ -118,7 +118,7 @@ export const Block = ( props: Props ): JSX.Element | null => { }; export default ( props: Props ) => { - // It is necessary because this block has to support serveral contexts: + // It is necessary because this block has to support several contexts: // - Inside `All Products Block` -> `withProductDataContext` HOC // - Inside `Products Block` -> Gutenberg Context // - Inside `Single Product Template` -> Gutenberg Context diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/sku/edit.tsx b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/sku/edit.tsx index 17032101036..fcc09be82ee 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/sku/edit.tsx +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/sku/edit.tsx @@ -60,7 +60,7 @@ const Edit = ( {
{ * arguments. * * @param {Function} hookTested The hook being tested to use in the - * test comopnent. + * test component. * @param {Array} propKeysForArgs An array of keys for the props that * will be used on the test component that * will have values fed to the tested diff --git a/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.tsx b/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.tsx index 8ec946a1970..8db3adcf3a3 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.tsx +++ b/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.tsx @@ -212,7 +212,7 @@ const ActiveFiltersBlock = ( { ] ); /** - * Parse the filter URL to set the active rating fitlers. + * Parse the filter URL to set the active rating filters. * This code should be moved to Rating Filter block once it's implemented. */ useEffect( () => { diff --git a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/hacks.ts b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/hacks.ts index e541ffe9cf9..253d7b46c22 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/hacks.ts +++ b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/hacks.ts @@ -142,7 +142,7 @@ const useLockedChildren = ( { const clientId = targetNode.dataset.block; const isLocked = isBlockLocked( clientId ); - // Prevent the keyboard event from propogating if it supports locking. + // Prevent the keyboard event from propagating if it supports locking. if ( isLocked ) { event.preventDefault(); event.stopPropagation(); diff --git a/plugins/woocommerce-blocks/assets/js/data/checkout/actions.ts b/plugins/woocommerce-blocks/assets/js/data/checkout/actions.ts index 0f039081dfa..4c77250338a 100644 --- a/plugins/woocommerce-blocks/assets/js/data/checkout/actions.ts +++ b/plugins/woocommerce-blocks/assets/js/data/checkout/actions.ts @@ -63,7 +63,7 @@ export const __internalSetRedirectUrl = ( redirectUrl: string ) => ( { /** * Set whether the checkout has an error or not * - * @param hasError Wether the checkout has an error or not + * @param hasError Whether the checkout has an error or not */ export const __internalSetHasError = ( hasError = true ) => ( { type: types.SET_HAS_ERROR, diff --git a/plugins/woocommerce-blocks/assets/js/editor-components/search-list-control/test/hierarchy.js b/plugins/woocommerce-blocks/assets/js/editor-components/search-list-control/test/hierarchy.js index e4fb1def8a2..018723a06c7 100644 --- a/plugins/woocommerce-blocks/assets/js/editor-components/search-list-control/test/hierarchy.js +++ b/plugins/woocommerce-blocks/assets/js/editor-components/search-list-control/test/hierarchy.js @@ -153,7 +153,7 @@ describe( 'buildTermsTree', () => { ] ); } ); - test( 'should return a tree of items, with orphan categories appended to the end, with children of thier own', () => { + test( 'should return a tree of items, with orphan categories appended to the end, with children of their own', () => { const filteredList = [ { id: 1, name: 'Apricots', parent: 0 }, { id: 3, name: 'Elderberry', parent: 2 }, diff --git a/plugins/woocommerce-blocks/assets/js/interactivity/vdom.js b/plugins/woocommerce-blocks/assets/js/interactivity/vdom.js index f399d658a47..7934a73f860 100644 --- a/plugins/woocommerce-blocks/assets/js/interactivity/vdom.js +++ b/plugins/woocommerce-blocks/assets/js/interactivity/vdom.js @@ -21,7 +21,7 @@ const directiveParser = new RegExp( // segments. It excludes underscore intentionally to prevent confusion. // E.g., "custom-directive". '([a-z0-9]+(?:-[a-z0-9]+)*)' + - // (Optional) Match '--' followed by any alphanumeric charachters. It + // (Optional) Match '--' followed by any alphanumeric characters. It // excludes underscore intentionally to prevent confusion, but it can // contain multiple hyphens. E.g., "--custom-prefix--with-more-info". '(?:--([a-z0-9_-]+))?$', diff --git a/plugins/woocommerce-blocks/bin/gen-block-list-doc.js b/plugins/woocommerce-blocks/bin/gen-block-list-doc.js index a4283e99328..3fb13fbec01 100644 --- a/plugins/woocommerce-blocks/bin/gen-block-list-doc.js +++ b/plugins/woocommerce-blocks/bin/gen-block-list-doc.js @@ -103,12 +103,12 @@ function processObjWithInnerKeys( obj ) { * not disabled. So adding { color: 'link' } support also brings along * background and text. * - * @param {Object} supports - keys supported by blokc + * @param {Object} supports - keys supported by block * @return {Object} supports augmented with defaults */ function augmentSupports( supports ) { if ( supports && 'color' in supports ) { - // If backgroud or text is not specified (true or false) + // If background or text is not specified (true or false) // then add it as true.a if ( typeof supports.color === 'object' && diff --git a/plugins/woocommerce-blocks/phpcs.xml b/plugins/woocommerce-blocks/phpcs.xml index 51ada14dae7..9369e670336 100644 --- a/plugins/woocommerce-blocks/phpcs.xml +++ b/plugins/woocommerce-blocks/phpcs.xml @@ -9,7 +9,7 @@ diff --git a/plugins/woocommerce-blocks/readme.txt b/plugins/woocommerce-blocks/readme.txt index bf4f237bcf8..951a43ab579 100644 --- a/plugins/woocommerce-blocks/readme.txt +++ b/plugins/woocommerce-blocks/readme.txt @@ -2723,7 +2723,7 @@ This release fixes an error that some users experienced when their site automati - Fix - Ensure empty categories are correctly hidden in the product categories block. ([3765](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3765)) - Fix - Added missing wrapper div within FeaturedCategory and FeatureProduct blocks. ([3746](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3746)) -- Fix - Set correct text color in BlockErrorBoundry notices. ([3738](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3738)) +- Fix - Set correct text color in BlockErrorBoundary notices. ([3738](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3738)) - Hidden cart item meta data will not be rendered in the Cart and Checkout blocks. ([3732](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3732)) - Fix - Improved accessibility of product image links in the products block by using correct aria tags and hiding empty image placeholders. ([3722](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3722)) - Add missing aria-label for stars image in the review-list-item component. ([3706](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3706)) diff --git a/plugins/woocommerce-blocks/storybook/main.js b/plugins/woocommerce-blocks/storybook/main.js index a1f07ef3e8a..4a16e281158 100644 --- a/plugins/woocommerce-blocks/storybook/main.js +++ b/plugins/woocommerce-blocks/storybook/main.js @@ -35,7 +35,7 @@ module.exports = { }, // webpackFinal field was added in following PR: https://github.com/woocommerce/woocommerce-blocks/pull/7514 // This fixes "storybook build issue" related to framer-motion library. - // Solution is from this commment: https://github.com/storybookjs/storybook/issues/16690#issuecomment-971579785 + // Solution is from this comment: https://github.com/storybookjs/storybook/issues/16690#issuecomment-971579785 webpackFinal: async ( config ) => { config.module.rules.push( { test: /\.mjs$/, diff --git a/plugins/woocommerce/changelog/50737-fix-37502-inline-doc-typos-in-woo-blocks b/plugins/woocommerce/changelog/50737-fix-37502-inline-doc-typos-in-woo-blocks new file mode 100644 index 00000000000..797c128d011 --- /dev/null +++ b/plugins/woocommerce/changelog/50737-fix-37502-inline-doc-typos-in-woo-blocks @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak +Comment: Fix inline documentation typos in woocommerce-blocks. +