react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

RAC Tree

Open LFDanLu opened this issue 1 year ago โ€ข 8 comments

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:

LFDanLu avatar Jan 26 '24 18:01 LFDanLu

@reidbarber what specifically did you run into for the typeahead?

LFDanLu avatar Feb 16 '24 22:02 LFDanLu

@LFDanLu Looks like I was just pressing keys again before the cooldown period ended. No issues there, ignore that!

reidbarber avatar Feb 16 '24 22:02 reidbarber

## 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-aria/gridlist

useGridListItem

 useGridListItem<T> {
   props: AriaGridListItemOptions
-  state: ListState<T>
+  state: ListState<T> | TreeState<T>
   ref: RefObject<FocusableElement>
   returnVal: undefined
 }

@react-aria/tree

useTreeGridList

changed by:

  • AriaTreeGridListOptions
  • TreeGridListAria
-
+useTreeGridList<T> {
+  props: AriaTreeGridListOptions<T>
+  state: TreeState<T>
+  ref: RefObject<HTMLElement>
+  returnVal: undefined
+}

useTreeGridListItem

changed by:

  • AriaTreeGridListItemOptions
  • TreeGridListItemAria
-
+useTreeGridListItem<T> {
+  props: AriaTreeGridListItemOptions
+  state: TreeState<T>
+  ref: RefObject<FocusableElement>
+  returnVal: undefined
+}

AriaTreeGridListOptions

-
+AriaTreeGridListOptions<T> {
+  keyboardDelegate?: KeyboardDelegate
+}

it changed:

  • useTreeGridList

AriaTreeGridListProps

+AriaTreeGridListProps<T> {
 
+}

TreeGridListAria

-
+TreeGridListAria {
+  gridProps: DOMAttributes
+}

it changed:

  • useTreeGridList

TreeGridListProps

+TreeGridListProps<T> {
 
+}

AriaTreeGridListItemOptions

-
+AriaTreeGridListItemOptions {
+  node: Node<unknown>
+}

it changed:

  • useTreeGridListItem

TreeGridListItemAria

-
+TreeGridListItemAria {
+  descriptionProps: DOMAttributes
+  gridCellProps: DOMAttributes
+  rowProps: DOMAttributes
+}

it changed:

  • useTreeGridListItem

@react-stately/tree

TreeProps

 TreeProps<T> {
-
+  disabledBehavior?: DisabledBehavior
 }

it changed:

  • useTreeState

TreeState

 TreeState<T> {
   collection: Collection<Node<T>>
   disabledKeys: Set<Key>
-  expandedKeys: Set<Key>
+  expandedKeys: 'all' | Set<Key>
   selectionManager: SelectionManager
-  setExpandedKeys: (Set<Key>) => void
+  setExpandedKeys: ('all' | Set<Key>) => void
   toggleKey: (Key) => void
 }

it changed:

  • useTreeState

TreeCollection

 TreeCollection<T> {
   at: (number) => void
   constructor: (Iterable<Node<T>>, {
-    expandedKeys?: Set<Key>
+    expandedKeys?: 'all' | Set<Key>
 }) => void
   getFirstKey: () => void
   getItem: (Key) => void
   getKeyAfter: (Key) => void
   getKeys: () => void
   getLastKey: () => void
   size: any
   undefined: () => void
 }
 

rspbot avatar Mar 01 '24 18:03 rspbot

Merged for testing, feel free to continue reviewing off this PR if need be. I'll capture the followups in a ticket

LFDanLu avatar Mar 01 '24 19:03 LFDanLu