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

fix: relax detaching constraint #4672

Merged
merged 4 commits into from
Jan 6, 2025
Merged

fix: relax detaching constraint #4672

merged 4 commits into from
Jan 6, 2025

Conversation

TrySound
Copy link
Member

Every time somebody is facing invalid constraint issue whole tree is blocked from deleting instances except the problematic one with actual issue.

Here rewrote detachability check to validate only ancestors and avoid traversing potentially problematic siblings.

@TrySound TrySound requested review from kof and johnsicili December 29, 2024 13:07
Copy link
Contributor

@johnsicili johnsicili left a comment

Choose a reason for hiding this comment

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

1 Delete error

  1. Add nav menu
  2. Del menu content
  3. See error
del.mp4

2 Body

Also body in prod is "detachable" as it shows the dragging ability

3 No errors

When dragging internal items that can't leave the parent, we don't show a toast anymore. Not sure if this is intentional.

@TrySound
Copy link
Member Author

TrySound commented Jan 4, 2025

Fixed 1 and 2. And yes we replaced "detachable" flag with constraints so instead of draggability we check if instance can be dropped considering all constraints.

Every time somebody is facing invalid constraint issue
whole tree is blocked from deleting instances except
the problematic one with actual issue.

Here rewrote detachability check to validate only ancestors
and avoid traversing potentially problematic siblings.
@TrySound TrySound merged commit 14494a9 into main Jan 6, 2025
15 checks passed
@TrySound TrySound deleted the relax-const branch January 6, 2025 19:28
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.

4 participants