Skip to content

Conversation

@yihuiliao
Copy link
Member

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

position: 'absolute',
top: 8,
left: 8,
insetStart: 8,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noticed that the checkbox was showing up on the wrong side when i added it to chromatic

/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
/*
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just changed this to match how our files do it

</div>
)
),
tags: ['!autodocs']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could either remove this and rely on chromatic or leave this in storybook and remove it from the docs

@rspbot
Copy link

rspbot commented Aug 21, 2025

@yihuiliao
Copy link
Member Author

gonna add some stuff from the audit to this PR as well

import {TextContext} from './Content';
import {useSpectrumContextProps} from './useSpectrumContextProps';

type ExcludedListBoxProps =
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like we were excluding these but maybe they weren't picked up on the tsdiff? anyway, i decided to remove them and just add them directly to the Omit

@rspbot
Copy link

rspbot commented Aug 21, 2025

@rspbot
Copy link

rspbot commented Aug 21, 2025

## API Changes

@react-spectrum/s2

/@react-spectrum/s2:SelectBox

 SelectBox {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
-  children?: ReactNode
+  children: ReactNode
   isDisabled?: boolean
   styles?: StylesProp
   value: string
 }

/@react-spectrum/s2:SelectBoxGroup

-SelectBoxGroup <T> {
+SelectBoxGroup <T extends {}> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoFocus?: boolean | FocusStrategy
   children: ReactNode
-  className?: ClassNameOrFunction<ListBoxRenderProps>
   defaultSelectedKeys?: 'all' | Iterable<Key>
-  dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   disallowEmptySelection?: boolean
-  dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>
   escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
   id?: string
   isDisabled?: boolean
   items?: Iterable<T>
-  layout?: 'stack' | 'grid' = 'stack'
-  onAction?: (Key) => void
   onBlur?: (FocusEvent<Target>) => void
   onFocus?: (FocusEvent<Target>) => void
   onFocusChange?: (boolean) => void
   onSelectionChange?: (Selection) => void
   orientation?: Orientation = 'vertical'
-  renderEmptyState?: (ListBoxRenderProps) => ReactNode
   selectedKeys?: 'all' | Iterable<Key>
-  selectionBehavior?: SelectionBehavior = "toggle"
   selectionMode?: 'single' | 'multiple' = 'single'
-  shouldFocusOnHover?: boolean
   shouldFocusWrap?: boolean
   shouldSelectOnPressUp?: boolean
   slot?: string | null
-  style?: StyleOrFunction<ListBoxRenderProps>
   styles?: StylesProp
 }

/@react-spectrum/s2:SelectBoxProps

 SelectBoxProps {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
-  children?: ReactNode
+  children: ReactNode
   isDisabled?: boolean
   styles?: StylesProp
   value: string
 }

/@react-spectrum/s2:SelectBoxGroupProps

 SelectBoxGroupProps <T> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoFocus?: boolean | FocusStrategy
   children: ReactNode
-  className?: ClassNameOrFunction<ListBoxRenderProps>
   defaultSelectedKeys?: 'all' | Iterable<Key>
-  dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   disallowEmptySelection?: boolean
-  dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>
   escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
   id?: string
   isDisabled?: boolean
   items?: Iterable<T>
-  layout?: 'stack' | 'grid' = 'stack'
-  onAction?: (Key) => void
   onBlur?: (FocusEvent<Target>) => void
   onFocus?: (FocusEvent<Target>) => void
   onFocusChange?: (boolean) => void
   onSelectionChange?: (Selection) => void
   orientation?: Orientation = 'vertical'
-  renderEmptyState?: (ListBoxRenderProps) => ReactNode
   selectedKeys?: 'all' | Iterable<Key>
-  selectionBehavior?: SelectionBehavior = "toggle"
   selectionMode?: 'single' | 'multiple' = 'single'
-  shouldFocusOnHover?: boolean
   shouldFocusWrap?: boolean
   shouldSelectOnPressUp?: boolean
   slot?: string | null
-  style?: StyleOrFunction<ListBoxRenderProps>
   styles?: StylesProp
 }

@yihuiliao yihuiliao added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit d55c920 Aug 22, 2025
32 checks passed
@yihuiliao yihuiliao deleted the selectbox-storybook branch August 22, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants