From f73720d38d269589f23f31b170ac258009949773 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Tue, 28 Jan 2025 16:02:05 -0700 Subject: [PATCH 01/16] Add loading indicator to author selector --- packages/components/src/combobox-control/index.tsx | 3 +++ packages/components/src/combobox-control/types.ts | 5 +++++ packages/editor/src/components/post-author/combobox.js | 6 ++++-- packages/editor/src/components/post-author/hook.js | 7 ++++--- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/components/src/combobox-control/index.tsx b/packages/components/src/combobox-control/index.tsx index 28510c8653d02..33276ed0823f8 100644 --- a/packages/components/src/combobox-control/index.tsx +++ b/packages/components/src/combobox-control/index.tsx @@ -35,6 +35,7 @@ import type { TokenInputProps } from '../form-token-field/types'; import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props'; import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events'; import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size'; +import Spinner from '../spinner'; const noop = () => {}; @@ -126,6 +127,7 @@ function ComboboxControl( props: ComboboxControlProps ) { help, allowReset = true, className, + isLoading = false, messages = { selected: __( 'Item selected.' ), }, @@ -362,6 +364,7 @@ function ComboboxControl( props: ComboboxControlProps ) { onChange={ onInputChange } /> + { isLoading && } { allowReset && (