Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate menutrigger state #5597

Merged
merged 6 commits into from
Dec 19, 2023
Merged

Separate menutrigger state #5597

merged 6 commits into from
Dec 19, 2023

Conversation

snowystinger
Copy link
Member

Closes

Open to better names

✅ 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:

@rspbot
Copy link

rspbot commented Dec 18, 2023

@rspbot
Copy link

rspbot commented Dec 18, 2023

@rspbot
Copy link

rspbot commented Dec 19, 2023

@rspbot
Copy link

rspbot commented Dec 19, 2023

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

@react-stately/combobox

ComboBoxState

 ComboBoxState<T> {
   commit: () => void
+  focusStrategy: FocusStrategy
   inputValue: string
   open: (FocusStrategy | null, MenuTriggerAction) => void
   revert: () => void
   setInputValue: (string) => void
 }
 

it changed:

  • useComboBoxState

@react-stately/menu

UNSTABLE_useSubmenuTriggerState

 UNSTABLE_useSubmenuTriggerState {
   props: SubmenuTriggerProps
-  state: MenuTriggerState
+  state: RootMenuTriggerState
   returnVal: undefined
 }

MenuTriggerState

 MenuTriggerState {
-  UNSTABLE_closeSubmenu: (Key, number) => void
-  UNSTABLE_expandedKeysStack: Array<Key>
-  UNSTABLE_openSubmenu: (Key, number) => void
-  close: () => void
   focusStrategy: FocusStrategy
   open: (FocusStrategy | null) => void
   toggle: (FocusStrategy | null) => void
 }

it changed:

  • useMenuTriggerState

RootMenuTriggerState

-
+RootMenuTriggerState {
+  UNSTABLE_closeSubmenu: (Key, number) => void
+  UNSTABLE_expandedKeysStack: Array<Key>
+  UNSTABLE_openSubmenu: (Key, number) => void
+  close: () => void
+  focusStrategy: FocusStrategy
+  open: (FocusStrategy | null) => void
+  toggle: (FocusStrategy | null) => void
+}

it changed:

  • useMenuTriggerState

@react-stately/select

SelectState

 SelectState<T> {
+  focusStrategy: FocusStrategy
   isFocused: boolean
+  open: (FocusStrategy | null) => void
   setFocused: (boolean) => void
+  toggle: (FocusStrategy | null) => void
 }

it changed:

  • useSelectState

@snowystinger snowystinger merged commit 8ad0c43 into main Dec 19, 2023
26 checks passed
@snowystinger snowystinger deleted the separate-menutrigger-state branch December 19, 2023 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants