Skip to content

fix(RAC): Tree DnD followup #8302

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

fix(RAC): Tree DnD followup #8302

wants to merge 8 commits into from

Conversation

reidbarber
Copy link
Member

Story fixes:

  • fixed drop indicator not showing outside of iframe
  • fixed child items not moving when dragged to second tree
  • enabled dragging in second tree

DnD fixes:

  • enabled mouse dropping 'after last child' or 'after parent' based on drag direction
  • fixed drop target not scrolling into view
  • added aria-expanded to drop indicator

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

let distanceFromLastSwitch = Math.abs(y - context.lastSwitchY);

// Switch logic based on continued movement direction
if (distanceFromLastSwitch > 12) { // Threshold for smooth switching
Copy link
Member Author

Choose a reason for hiding this comment

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

Hard-coded now, but maybe this should be relative to the item height? Or be dynamic based on input type (touch or mouse)

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.

1 participant