Skip to content

feat(cdk/drag-drop): add mixed orientation support using transform #29394

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

Closed
wants to merge 1 commit into from

Conversation

nghiadg
Copy link

@nghiadg nghiadg commented Jul 7, 2024

Feature Description

These changes implement a new DropListSortStrategy that allows sorting of lists that can wrap by moving them using a transform which keeps the DOM stable and allows for the sorting to be animated

The new strategy can be enabled by setting cdkDropListOrientation="mixed".

Fixed: #29393

@nghiadg nghiadg requested a review from a team as a code owner July 7, 2024 09:40
@nghiadg nghiadg requested review from crisbeto and andrewseguin and removed request for a team July 7, 2024 09:40
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jul 7, 2024
@crisbeto
Copy link
Member

crisbeto commented Jul 7, 2024

Thank you for the contribution, but we can't accept it because it would increase our maintenance burden without much of a benefit. We intentionally didn't use transform for the mixed strategy because it's much harder to account for all the use cases and we've noticed that users don't seem to care that much about animating the sorting. E.g. in your change you have to special-case things like gap and margin, but there are likely many more cases that we'd have to account for. Furthermore, this will likely have some performance implications because of the need to call getComputedStyle several times when swapping.

@nghiadg
Copy link
Author

nghiadg commented Jul 7, 2024

Thank you so much.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
detected: feature PR contains a feature commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cdk/drag-drop): add mixed orientation support using transform
2 participants