diff --git a/packages/block-editor/src/components/url-input/README.md b/packages/block-editor/src/components/url-input/README.md index 714f7f062990f6..5a65177254f8fe 100644 --- a/packages/block-editor/src/components/url-input/README.md +++ b/packages/block-editor/src/components/url-input/README.md @@ -128,7 +128,7 @@ _Optional._ Provides additional control over whether suggestions are disabled. When hiding the URLInput using CSS (as is sometimes done for accessibility purposes), the suggestions can still be displayed. This is because they're rendered in a popover in a different part of the DOM, so any styles applied to the URLInput's container won't affect the popover. -This prop allows the suggestions list to be programmatically not rendered by passing a boolean—it can be `true` to make sure suggestions aren't rendered, or `false`/`undefined` to fall back to the default behaviour of showing suggestions when matching autocompletion items are found. +This prop allows the suggestions list to be programmatically not rendered by passing a boolean—it can be `true` to make sure suggestions aren't rendered, or `false`/`undefined` to fall back to the default behavior of showing suggestions when matching autocompletion items are found. ## Example diff --git a/packages/block-editor/src/components/writing-flow/readme.md b/packages/block-editor/src/components/writing-flow/readme.md index eb8c720ca12e78..25e23c56e765c8 100644 --- a/packages/block-editor/src/components/writing-flow/readme.md +++ b/packages/block-editor/src/components/writing-flow/readme.md @@ -5,7 +5,7 @@ This hook handles selection across blocks. ## Partial multi-block selection Selecting across blocks is possible by temporarily setting the `contentEditable` -attribute to `true`. This sounds scary, but we prevent all default behaviours +attribute to `true`. This sounds scary, but we prevent all default behaviors except for selection, so don't worry. :) * For selection by mouse, we make everything editable when the mouse leaves an diff --git a/packages/block-editor/src/components/writing-flow/use-arrow-nav.js b/packages/block-editor/src/components/writing-flow/use-arrow-nav.js index 44051b324ff64d..1031d69a9d39ee 100644 --- a/packages/block-editor/src/components/writing-flow/use-arrow-nav.js +++ b/packages/block-editor/src/components/writing-flow/use-arrow-nav.js @@ -167,7 +167,7 @@ export default function useArrowNav() { return useRefEffect( ( node ) => { // Here a DOMRect is stored while moving the caret vertically so // vertical position of the start position can be restored. This is to - // recreate browser behaviour across blocks. + // recreate browser behavior across blocks. let verticalRect; function onMouseDown() { diff --git a/packages/block-editor/src/components/writing-flow/use-clipboard-handler.js b/packages/block-editor/src/components/writing-flow/use-clipboard-handler.js index bed07b183cc0cc..313d541f0078fd 100644 --- a/packages/block-editor/src/components/writing-flow/use-clipboard-handler.js +++ b/packages/block-editor/src/components/writing-flow/use-clipboard-handler.js @@ -61,7 +61,7 @@ export default function useClipboardHandler() { return; } - // Let native copy/paste behaviour take over in input fields. + // Let native copy/paste behavior take over in input fields. // But always handle multiple selected blocks. if ( ! hasMultiSelection() ) { const { target } = event; @@ -74,7 +74,7 @@ export default function useClipboardHandler() { : documentHasSelection( ownerDocument ) && ! ownerDocument.activeElement.isContentEditable; - // Let native copy behaviour take over in input fields. + // Let native copy behavior take over in input fields. if ( hasSelection ) { return; } diff --git a/packages/block-editor/src/components/writing-flow/use-input.js b/packages/block-editor/src/components/writing-flow/use-input.js index 0f10cc9c2d1c75..d92d15dc55a76a 100644 --- a/packages/block-editor/src/components/writing-flow/use-input.js +++ b/packages/block-editor/src/components/writing-flow/use-input.js @@ -157,7 +157,7 @@ export default function useInput() { __unstableDeleteSelection( event.keyCode === DELETE ); } else { event.preventDefault(); - // Safari does not stop default behaviour with either + // Safari does not stop default behavior with either // event.preventDefault() or node.contentEditable = false, so // remove the selection to stop browser manipulation. node.ownerDocument.defaultView @@ -178,7 +178,7 @@ export default function useInput() { __unstableDeleteSelection(); } else { event.preventDefault(); - // Safari does not stop default behaviour with either + // Safari does not stop default behavior with either // event.preventDefault() or node.contentEditable = false, so // remove the selection to stop browser manipulation. node.ownerDocument.defaultView.getSelection().removeAllRanges(); diff --git a/packages/block-editor/src/components/writing-flow/use-tab-nav.js b/packages/block-editor/src/components/writing-flow/use-tab-nav.js index 46c40d56fe96d9..53513ecb4db910 100644 --- a/packages/block-editor/src/components/writing-flow/use-tab-nav.js +++ b/packages/block-editor/src/components/writing-flow/use-tab-nav.js @@ -157,7 +157,7 @@ export default function useTabNav() { const next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef; // Disable focus capturing on the focus capture element, so it - // doesn't refocus this block and so it allows default behaviour + // doesn't refocus this block and so it allows default behavior // (moving focus to the next tabbable element). noCaptureRef.current = true; diff --git a/packages/block-editor/src/utils/pasting.js b/packages/block-editor/src/utils/pasting.js index 2e97849904c68b..4eeafafdf9d971 100644 --- a/packages/block-editor/src/utils/pasting.js +++ b/packages/block-editor/src/utils/pasting.js @@ -58,7 +58,7 @@ export function getPasteEventData( { clipboardData } ) { } catch ( error ) { // Some browsers like UC Browser paste plain text by default and // don't support clipboardData at all, so allow default - // behaviour. + // behavior. return; } diff --git a/packages/block-library/src/embed/util.js b/packages/block-library/src/embed/util.js index eae45cc397e7b7..065d6943a41abd 100644 --- a/packages/block-library/src/embed/util.js +++ b/packages/block-library/src/embed/util.js @@ -248,7 +248,7 @@ export function getClassNames( } /** - * Fallback behaviour for unembeddable URLs. + * Fallback behavior for unembeddable URLs. * Creates a paragraph block containing a link to the URL, and calls `onReplace`. * * @param {string} url The URL that could not be embedded. diff --git a/packages/block-library/src/list-item/hooks/use-space.js b/packages/block-library/src/list-item/hooks/use-space.js index ee4d8bdbf8786e..61f3a3275fd118 100644 --- a/packages/block-library/src/list-item/hooks/use-space.js +++ b/packages/block-library/src/list-item/hooks/use-space.js @@ -41,7 +41,7 @@ export default function useSpace( clientId ) { selectionEnd.offset === 0 ) { if ( shiftKey ) { - // Note that backspace behaviour in defined in onMerge. + // Note that backspace behavior in defined in onMerge. if ( keyCode === TAB ) { if ( outdentListItem() ) { event.preventDefault(); diff --git a/packages/block-library/src/page-list/editor.scss b/packages/block-library/src/page-list/editor.scss index b3f70746acd57f..d72d451e7ef628 100644 --- a/packages/block-library/src/page-list/editor.scss +++ b/packages/block-library/src/page-list/editor.scss @@ -44,7 +44,7 @@ gap: $grid-unit-15; } -// Simulate open on click behaviour in the editor by opening on focus instead. +// Simulate open on click behavior in the editor by opening on focus instead. .wp-block-page-list { .open-on-click:focus-within { diff --git a/packages/block-library/src/query/edit/inspector-controls/taxonomy-controls.js b/packages/block-library/src/query/edit/inspector-controls/taxonomy-controls.js index 447b667cdacb56..5aee1c099abaa3 100644 --- a/packages/block-library/src/query/edit/inspector-controls/taxonomy-controls.js +++ b/packages/block-library/src/query/edit/inspector-controls/taxonomy-controls.js @@ -34,7 +34,7 @@ const getTermIdByTermValue = ( terms, termValue ) => { /** * Here we make an extra check for entered terms in a non case sensitive way, - * to match user expectations, due to `FormTokenField` behaviour that shows + * to match user expectations, due to `FormTokenField` behavior that shows * suggestions which are case insensitive. * * Although WP tries to discourage users to add terms with the same name (case insensitive), diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 8c710eb93a9ee5..90d42715263340 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1112,7 +1112,7 @@ - `Dropdown` and `DropdownMenu`: support controlled mode for the dropdown's open/closed state ([#54257](https://github.com/WordPress/gutenberg/pull/54257)). - `BorderControl`: Apply proper metrics and simpler text ([#53998](https://github.com/WordPress/gutenberg/pull/53998)). - `FormTokenField`: Update styling for consistency and increased visibility ([#54402](https://github.com/WordPress/gutenberg/pull/54402)). -- `CircularOptionPicker`: Add option to use previous non-listbox behaviour, for contexts where buttons are more appropriate than a list of options ([#54290](https://github.com/WordPress/gutenberg/pull/54290)). +- `CircularOptionPicker`: Add option to use previous non-listbox behavior, for contexts where buttons are more appropriate than a list of options ([#54290](https://github.com/WordPress/gutenberg/pull/54290)). - `DuotonePicker/ColorListPicker`: Adds appropriate labels to 'Duotone Filter' color pickers ([#54468](https://github.com/WordPress/gutenberg/pull/54468)). - `SearchControl`: support new `40px` and `32px` sizes ([#54548](https://github.com/WordPress/gutenberg/pull/54548)). - `FormTokenField`: Add `tokenizeOnBlur` prop to add any incompleteTokenValue as a new token when field loses focus ([#54445](https://github.com/WordPress/gutenberg/pull/54445)). @@ -1590,7 +1590,7 @@ - `Modal`: Fix unexpected modal closing in IME Composition ([#46453](https://github.com/WordPress/gutenberg/pull/46453)). - `Toolbar`: Fix duplicate focus style on anchor link button ([#46759](https://github.com/WordPress/gutenberg/pull/46759)). - `useNavigateRegions`: Ensure region navigation picks the next region based on where the current user focus is located instead of starting at the beginning ([#44883](https://github.com/WordPress/gutenberg/pull/44883)). -- `ComboboxControl`: Fix unexpected behaviour in IME Composition ([#46827](https://github.com/WordPress/gutenberg/pull/46827)). +- `ComboboxControl`: Fix unexpected behavior in IME Composition ([#46827](https://github.com/WordPress/gutenberg/pull/46827)). ### Enhancements @@ -2189,7 +2189,7 @@ - `ColorPicker`: Strip leading hash character from hex values pasted into input. ([#41223](https://github.com/WordPress/gutenberg/pull/41223)) - `ColorPicker`: Display detailed color inputs by default. ([#41222](https://github.com/WordPress/gutenberg/pull/41222)) - Updated design for the `DateTimePicker`, `DatePicker` and `TimePicker` components ([#41097](https://github.com/WordPress/gutenberg/pull/41097)). -- `DateTimePicker`: Add `__nextRemoveHelpButton` and `__nextRemoveResetButton` for opting into new behaviour where there is no Help and Reset button ([#41097](https://github.com/WordPress/gutenberg/pull/41097)). +- `DateTimePicker`: Add `__nextRemoveHelpButton` and `__nextRemoveResetButton` for opting into new behavior where there is no Help and Reset button ([#41097](https://github.com/WordPress/gutenberg/pull/41097)). ### Internal diff --git a/packages/components/src/box-control/index.tsx b/packages/components/src/box-control/index.tsx index d4d4b03f893036..cee32382fc22f0 100644 --- a/packages/components/src/box-control/index.tsx +++ b/packages/components/src/box-control/index.tsx @@ -106,7 +106,7 @@ function BoxControl( { // Tracking selected units via internal state allows filtering of CSS unit // only values from being saved while maintaining preexisting unit selection - // behaviour. Filtering CSS only values prevents invalid style values. + // behavior. Filtering CSS only values prevents invalid style values. const [ selectedUnits, setSelectedUnits ] = useState< BoxControlValue >( { top: parseQuantityAndUnitFromRawValue( valuesProp?.top )[ 1 ], right: parseQuantityAndUnitFromRawValue( valuesProp?.right )[ 1 ], diff --git a/packages/components/src/higher-order/with-focus-return/index.tsx b/packages/components/src/higher-order/with-focus-return/index.tsx index 196226def624c1..f2c8e07782fe2a 100644 --- a/packages/components/src/higher-order/with-focus-return/index.tsx +++ b/packages/components/src/higher-order/with-focus-return/index.tsx @@ -32,7 +32,7 @@ type Props = { * describing the component and the * focus return characteristics. * - * @return Higher Order Component with the focus restauration behaviour. + * @return Higher Order Component with the focus restauration behavior. */ export default createHigherOrderComponent( // @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types diff --git a/packages/components/src/slot-fill/README.md b/packages/components/src/slot-fill/README.md index 3f14b9ccde9eeb..c553dd3729b9a2 100644 --- a/packages/components/src/slot-fill/README.md +++ b/packages/components/src/slot-fill/README.md @@ -63,7 +63,7 @@ The `SlotFillProvider` component does not accept any props (except `children`). Both `Slot` and `Fill` accept a `name` string prop, where a `Slot` with a given `name` will render the `children` of any associated `Fill`s. -`Slot` accepts a `bubblesVirtually` prop which changes the method how the `Fill` children are rendered. With `bubblesVirtually`, the `Fill` is rendered using a React portal. That affects the event bubbling and React context propagation behaviour: +`Slot` accepts a `bubblesVirtually` prop which changes the method how the `Fill` children are rendered. With `bubblesVirtually`, the `Fill` is rendered using a React portal. That affects the event bubbling and React context propagation behavior: ### `bubblesVirtually=false` diff --git a/packages/compose/README.md b/packages/compose/README.md index b4e20a79bab0cc..76f76f909f3fee 100644 --- a/packages/compose/README.md +++ b/packages/compose/README.md @@ -448,7 +448,7 @@ If you don't wish a ref callback to be called after every render, wrap it with ` To make ref callbacks easier to use, you can also pass the result of `useRefEffect`, which makes cleanup easier by allowing you to return a cleanup function instead of handling `null`. -It's also possible to _disable_ a ref (and its behaviour) by simply not passing the ref. +It's also possible to _disable_ a ref (and its behavior) by simply not passing the ref. ```jsx const ref = useRefEffect( ( node ) => { diff --git a/packages/compose/src/hooks/use-constrained-tabbing/index.js b/packages/compose/src/hooks/use-constrained-tabbing/index.js index b9aca94222db6a..3133619e3d1f59 100644 --- a/packages/compose/src/hooks/use-constrained-tabbing/index.js +++ b/packages/compose/src/hooks/use-constrained-tabbing/index.js @@ -68,7 +68,7 @@ function useConstrainedTabbing() { // If the element that is about to receive focus is outside the // area, move focus to a div and insert it at the start or end of // the area, depending on the direction. Without preventing default - // behaviour, the browser will then move focus to the next element. + // behavior, the browser will then move focus to the next element. const domAction = shiftKey ? 'append' : 'prepend'; const { ownerDocument } = node; const trap = ownerDocument.createElement( 'div' ); diff --git a/packages/compose/src/hooks/use-merge-refs/index.js b/packages/compose/src/hooks/use-merge-refs/index.js index ed7f4247018be1..4fa64985cff72b 100644 --- a/packages/compose/src/hooks/use-merge-refs/index.js +++ b/packages/compose/src/hooks/use-merge-refs/index.js @@ -46,7 +46,7 @@ function assignRef( ref, value ) { * `useRefEffect`, which makes cleanup easier by allowing you to return a * cleanup function instead of handling `null`. * - * It's also possible to _disable_ a ref (and its behaviour) by simply not + * It's also possible to _disable_ a ref (and its behavior) by simply not * passing the ref. * * ```jsx diff --git a/packages/compose/src/hooks/use-resize-observer/legacy/index.tsx b/packages/compose/src/hooks/use-resize-observer/legacy/index.tsx index fe765810982226..9c83c30f0f8ef7 100644 --- a/packages/compose/src/hooks/use-resize-observer/legacy/index.tsx +++ b/packages/compose/src/hooks/use-resize-observer/legacy/index.tsx @@ -56,7 +56,7 @@ const extractSize = ( entry: ResizeObserverEntry ): ObservedSize => { entrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ]; } else { // TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's buggy - // behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`. + // behavior of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`. const contentBoxSize = entry.contentBoxSize as unknown as ResizeObserverSize; entrySize = [ contentBoxSize.inlineSize, contentBoxSize.blockSize ]; diff --git a/packages/data/CHANGELOG.md b/packages/data/CHANGELOG.md index b134a93aa77f6f..f1325fad7dc1dc 100644 --- a/packages/data/CHANGELOG.md +++ b/packages/data/CHANGELOG.md @@ -292,7 +292,7 @@ ### Bug Fixes -- Restore functionality of action-generators returning a Promise. Clarify intent and behaviour for `dispatch` behaviour. Dispatch actions now always +- Restore functionality of action-generators returning a Promise. Clarify intent and behavior for `dispatch` behavior. Dispatch actions now always return a promise ([#14830](https://github.com/WordPress/gutenberg/pull/14830) ### Enhancements diff --git a/packages/data/src/components/with-select/test/index.js b/packages/data/src/components/with-select/test/index.js index 9e01bb17cbb7e1..ccf8b40933f200 100644 --- a/packages/data/src/components/with-select/test/index.js +++ b/packages/data/src/components/with-select/test/index.js @@ -137,7 +137,7 @@ describe( 'withSelect', () => { expect( OriginalComponent ).toHaveBeenCalledTimes( 2 ); } ); - describe( 'expected behaviour when dispatching actions during mount', () => { + describe( 'expected behavior when dispatching actions during mount', () => { const testRegistry = createRegistry(); testRegistry.registerStore( 'counter', { reducer: ( state = 0, action ) => { @@ -155,7 +155,7 @@ describe( 'withSelect', () => { }, } ); - // @todo Should we allow this behaviour? Side-effects + // @todo Should we allow this behavior? Side-effects // on mount are discouraged in React (breaks Suspense and React Async Mode) // leaving in place for now under the assumption there's current usage // of withSelect in GB that expects support. diff --git a/packages/dataviews/src/dataviews-layouts/table/index.tsx b/packages/dataviews/src/dataviews-layouts/table/index.tsx index 855e0584563b71..81e3d510b3e1d5 100644 --- a/packages/dataviews/src/dataviews-layouts/table/index.tsx +++ b/packages/dataviews/src/dataviews-layouts/table/index.tsx @@ -103,7 +103,7 @@ function TableRow< Item >( { // Will be set to true if `onTouchStart` fires. This happens before // `onClick` and can be used to exclude touchscreen devices from certain - // behaviours. + // behaviors. const isTouchDeviceRef = useRef( false ); const columns = view.fields ?? []; const hasPrimaryColumn = diff --git a/packages/edit-site/lib/inflate.js b/packages/edit-site/lib/inflate.js index 596d1cb5b8013c..b2f1dde21fcbcb 100644 --- a/packages/edit-site/lib/inflate.js +++ b/packages/edit-site/lib/inflate.js @@ -2921,7 +2921,7 @@ * class Inflate * * Generic JS-style wrapper for zlib calls. If you don't need - * streaming behaviour - use more simple functions: [[inflate]] + * streaming behavior - use more simple functions: [[inflate]] * and [[inflateRaw]]. **/ @@ -3213,7 +3213,7 @@ * will be string. * * By default, stores data blocks in `chunks[]` property and glue - * those in `onEnd`. Override this handler, if you need another behaviour. + * those in `onEnd`. Override this handler, if you need another behavior. **/ Inflate.prototype.onData = function (chunk) { this.chunks.push(chunk); diff --git a/packages/editor/src/components/post-title/index.js b/packages/editor/src/components/post-title/index.js index 090beb57f6170e..b5607e11d40ff4 100644 --- a/packages/editor/src/components/post-title/index.js +++ b/packages/editor/src/components/post-title/index.js @@ -116,7 +116,7 @@ const PostTitle = forwardRef( ( _, forwardedRef ) => { } catch ( error ) { // Some browsers like UC Browser paste plain text by default and // don't support clipboardData at all, so allow default - // behaviour. + // behavior. return; } diff --git a/packages/format-library/src/link/inline.js b/packages/format-library/src/link/inline.js index 964e9a4271dda9..68fb6f69d9d5b9 100644 --- a/packages/format-library/src/link/inline.js +++ b/packages/format-library/src/link/inline.js @@ -184,7 +184,7 @@ function InlineLinkUI( { // with incorrectly targetted replacements. // See: https://github.com/WordPress/gutenberg/issues/41771. // Note original formats will be lost when applying this change. - // That is expected behaviour. + // That is expected behavior. // See: https://github.com/WordPress/gutenberg/pull/33849#issuecomment-936134179. const newValAfter = replace( valAfter, richTextText, newValue ); diff --git a/packages/react-native-aztec/README.md b/packages/react-native-aztec/README.md index 79dfb6ea8d3677..b2c03d0042e92d 100644 --- a/packages/react-native-aztec/README.md +++ b/packages/react-native-aztec/README.md @@ -219,7 +219,7 @@ Called when then selection of the native component changed. ### iOS On iOS we use a native view called RCTAztecView that inherits an Aztec TextView class. -RCTAztecView adds the following custom behaviours to the TextView class: +RCTAztecView adds the following custom behaviors to the TextView class: - Overlays a UILabel to display placeholder text - Overrides the `onPaste` method to intercept paste actions and send them to the JS implementation