Skip to content

Commit

Permalink
Updated Several Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
shail-mehta committed Jan 2, 2025
1 parent b71aa0a commit 6e4f566
Show file tree
Hide file tree
Showing 26 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/url-input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/utils/pasting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/embed/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/list-item/hooks/use-space.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/page-list/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/box-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/slot-fill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion packages/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
2 changes: 1 addition & 1 deletion packages/compose/src/hooks/use-merge-refs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down
2 changes: 1 addition & 1 deletion packages/data/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/data/src/components/with-select/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) => {
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/dataviews-layouts/table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions packages/edit-site/lib/inflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]].
**/

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/format-library/src/link/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-aztec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e4f566

Please sign in to comment.