-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(drag-drop): add class to indicate whether a container can receiv… #14532
feat(drag-drop): add class to indicate whether a container can receiv… #14532
Conversation
…e an item Adds the `cdk-drop-list-receiving` class to drop containers that are able to receive the item that is currently being dragged. This class can be used to indicate to the user where they can drop an item. Fixes angular#14439.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…e an item (angular#14532) Adds the `cdk-drop-list-receiving` class to drop containers that are able to receive the item that is currently being dragged. This class can be used to indicate to the user where they can drop an item. Fixes angular#14439.
Currently when someone uses single quote import declarations in their project and the `ng update` migration for Material runs, the Material imports are rewritten into multiple imports referring to individual secondary entry-points, but the actual existing quote style is ignored. This means that the linter can sometimes complain after the migration has been performed. Ideally we'd run the tslint fix task after the migration ran in order to fix all lint rule failures which are specific to the given project, but this is not a best-practice yet and we need to decide on the CLI-side whether the CLI should automatically run the fixers after generator/migration schematics ran. See: angular/angular-cli#14532 Unfortunately we can't do the same thing for the whitespace within the `NamedImports` declaration because the whitespace for object literal expressions is hard-coded. See: https://github.com/microsoft/TypeScript/blob/6a559e37ee0d660fcc94f086a34370e79e94b17a/src/compiler/emitter.ts#L3796-L3797 (`emitObjectLiteralExpression` does not allow configuring the format flags) Fixes angular#14532
…#16131) Currently when someone uses single quote import declarations in their project and the `ng update` migration for Material runs, the Material imports are rewritten into multiple imports referring to individual secondary entry-points, but the actual existing quote style is ignored. This means that the linter can sometimes complain after the migration has been performed. Ideally we'd run the tslint fix task after the migration ran in order to fix all lint rule failures which are specific to the given project, but this is not a best-practice yet and we need to decide on the CLI-side whether the CLI should automatically run the fixers after generator/migration schematics ran. See: angular/angular-cli#14532 Unfortunately we can't do the same thing for the whitespace within the `NamedImports` declaration because the whitespace for object literal expressions is hard-coded. See: https://github.com/microsoft/TypeScript/blob/6a559e37ee0d660fcc94f086a34370e79e94b17a/src/compiler/emitter.ts#L3796-L3797 (`emitObjectLiteralExpression` does not allow configuring the format flags) Fixes #14532
…angular#16131) Currently when someone uses single quote import declarations in their project and the `ng update` migration for Material runs, the Material imports are rewritten into multiple imports referring to individual secondary entry-points, but the actual existing quote style is ignored. This means that the linter can sometimes complain after the migration has been performed. Ideally we'd run the tslint fix task after the migration ran in order to fix all lint rule failures which are specific to the given project, but this is not a best-practice yet and we need to decide on the CLI-side whether the CLI should automatically run the fixers after generator/migration schematics ran. See: angular/angular-cli#14532 Unfortunately we can't do the same thing for the whitespace within the `NamedImports` declaration because the whitespace for object literal expressions is hard-coded. See: https://github.com/microsoft/TypeScript/blob/6a559e37ee0d660fcc94f086a34370e79e94b17a/src/compiler/emitter.ts#L3796-L3797 (`emitObjectLiteralExpression` does not allow configuring the format flags) Fixes angular#14532
Is there a way we can keep this cdk-drop-list-receiving class applied to the CdkDropList even while dragging? Once the CdkDrag gets over the container, the class is removed and replaced with the .cdk-drop-list-dragging. Can we keep both classes? |
@MNorgren I feel like that could be confusing. Once the item is inside a new container, the container isn't really receiving anymore, it has received the item already. If you want to capture both states you can target both the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
cdk-drop-list-receiving
class to drop containers that are able to receive the item that is currently being dragged. This class can be used to indicate to the user where they can drop an item.Fixes #14439.