Skip to content

chore: Add code mode for test util API updates #10099

Open
LFDanLu wants to merge 5 commits into
mainfrom
test_util_code_mod
Open

chore: Add code mode for test util API updates #10099
LFDanLu wants to merge 5 commits into
mainfrom
test_util_code_mod

Conversation

@LFDanLu
Copy link
Copy Markdown
Member

@LFDanLu LFDanLu commented May 22, 2026

Since bumping from beta to RC of the test utils has various API updated, added a code mod to handle those. Also tossed in the S2 useDragAndDrop update to omit renderDropIndicator as per audit

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

Feel free to revert the test files back to the commit before the test util update locally via

git checkout f178bc6218d4cbc2bdd7c5c27603190e08ca3204 -- \
  packages/react-aria-components/test/RadioGroup.test.js \
  packages/react-aria-components/test/Treeble.test.js \

and build the codemod locally and run via

cd packages/dev/codemods && yarn build
node packages/dev/codemods/dist/index.js test-utils-rc-update --path packages/react-aria-components/test
node packages/dev/codemods/dist/index.js test-utils-rc-update --path packages/@react-spectrum/s2/test
node packages/dev/codemods/dist/index.js test-utils-rc-update --path packages/@adobe/react-spectrum/test

and verify the changes

🧢 Your Project:

RSP

@github-actions github-actions Bot added the S2 label May 22, 2026
@rspbot
Copy link
Copy Markdown

rspbot commented May 22, 2026

@rspbot
Copy link
Copy Markdown

rspbot commented May 22, 2026

## API Changes

@react-spectrum/s2

/@react-spectrum/s2:DragAndDropOptions

 DragAndDropOptions <T = {}> {
   acceptedDragTypes?: 'all' | Array<string | symbol> = 'all'
   dropTargetDelegate?: DropTargetDelegate
   getAllowedDropOperations?: () => Array<DropOperation>
   getDropOperation?: (DropTarget, DragTypes, Array<DropOperation>) => DropOperation
   getItems?: (Set<Key>, Array<T>) => Array<DragItem> = () => []
   isDisabled?: boolean
   onDragEnd?: (DraggableCollectionEndEvent) => void
   onDragMove?: (DraggableCollectionMoveEvent) => void
   onDragStart?: (DraggableCollectionStartEvent) => void
   onDrop?: (DroppableCollectionDropEvent) => void
   onDropActivate?: (DroppableCollectionActivateEvent) => void
   onDropEnter?: (DroppableCollectionEnterEvent) => void
   onDropExit?: (DroppableCollectionExitEvent) => void
   onInsert?: (DroppableCollectionInsertDropEvent) => void
   onItemDrop?: (DroppableCollectionOnItemDropEvent) => void
   onMove?: (DroppableCollectionReorderEvent) => void
   onReorder?: (DroppableCollectionReorderEvent) => void
   onRootDrop?: (DroppableCollectionRootDropEvent) => void
   renderDragPreview?: (Array<DragItem>) => JSX.Element | {
     element: JSX.Element
   x: number
   y: number
 }
-  renderDropIndicator?: (DropTarget) => JSX.Element
   shouldAcceptItemDrop?: (ItemDropTarget, DragTypes) => boolean
 }

@rspbot
Copy link
Copy Markdown

rspbot commented May 22, 2026

Agent Skills Changes

Modified (4)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/f9b205531c0c36bf80475a32ab14eb1fe2a25570/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/f9b205531c0c36bf80475a32ab14eb1fe2a25570/

@LFDanLu LFDanLu added the no testing Does not require manual testing during testing session label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no testing Does not require manual testing during testing session RAC ready for review release S2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants