From 599d1b445f21fad2cec6a95bec824a409d55bb80 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Date: Fri, 11 Feb 2022 19:26:15 +0100 Subject: [PATCH] fix(material/dialog): Use `align` as `@Input()` in `MatDialogActions` (#24328) * fix(material/dialog): Use align as @Input() in MatDialogActions Squashed commit of the following: commit 1d6daeadf8e06e38c64fec724d5a8d2899b502d3 Merge: 32764325f 3a98da840 Author: Jean-Philippe Green Date: Mon Jan 31 19:24:24 2022 +0100 Merge branch 'master' into align-attr-as-input-in-dialog-actions-#18479-2 commit 32764325fe43737c1c7137b0583d00290af16c25 Merge: 815cf8f26 1f40b7d04 Author: Jean-Philippe Date: Mon Jan 31 18:54:42 2022 +0100 Merge branch 'angular:master' into align-attr-as-input-in-dialog-actions-#18479-2 commit 815cf8f26b2e615e37d00dee0b3471973119a42c Author: Jean-Philippe Green Date: Mon Jan 10 01:23:12 2022 +0100 Use directive binding in mdc-dialog demo for align commit 77fca709f57d6d9396981bef4589a932cb1cae72 Author: Jean-Philippe Green Date: Mon Jan 10 01:20:43 2022 +0100 Change actionsAlignment type in dialog demo commit c87c4aae513d840f6d621ac172915cc25ff5885b Author: Jean-Philippe Green Date: Mon Jan 10 00:21:57 2022 +0100 Revert weird changes to dialog.spec.ts commit d6deb456240553b299aa6e30b496274ccf1b8e8d Author: Jean-Philippe Date: Sun Jan 9 23:30:24 2022 +0100 Use 'start' as default instead of undefined for align attribute in dialog actions commit 8d367c1ef4b10ae865d5e08b101189781eed5263 Author: Jean-Philippe Date: Sun Jan 9 23:05:54 2022 +0100 Update comments in dialog.scss for more clarity commit 9d2ac1600e355d28414f702d2d12baaf9b33dac1 Merge: 54d0a600a 3de4ab8fe Author: Jean-Philippe Date: Sun Jan 9 22:33:13 2022 +0100 Merge branch 'angular:master' into align-attr-as-input-in-dialog-actions-#18479 commit 54d0a600a69f28e8ffc97c0ea5e4a2fd7e605b07 Merge: 462d407b1 c79e1d13c Author: Jean-Philippe Green Date: Wed Jan 5 21:30:29 2022 +0100 Merge branch 'angular-master' into align-attr-as-input-in-dialog-actions-#18479 commit c79e1d13cbd1d81c0b0c3110c42473e00fe0db5b Merge: 462d407b1 03485cd63 Author: Jean-Philippe Green Date: Wed Jan 5 21:23:17 2022 +0100 Merge branch 'master' of https://github.com/angular/components into angular-master commit 462d407b185348404af2b5db8095f069a01b54b5 Author: Jean-Philippe Green Date: Fri Dec 25 16:18:08 2020 +0100 fix(material-experimental/mdc-dialog): make align attr into an input of dialog actions directive Fixes multiple issues, such as self-documentation of the align attribute, type checking, better bindings, and IDE support. Because align is not standard for HTMLDivElement, it doesn't make much sense to assume end users to know they can use the align attribute. Fixes #18479 for material-experimental commit c101f7ff75acdd624e1e599f1f33a67252e36558 Author: Jean-Philippe Green Date: Fri Dec 25 16:15:01 2020 +0100 fix(material/dialog): make align attribute into an input of dialog actions directive instead of css Fixes multiple issues, such as self-documentation of the align attribute, type checking, better bindings, and IDE support. Because align is not standard for HTMLDivElement, it doesn't make much sense to assume end users to know they can use the align attribute. Fixes #18479 * fix(material/dialog): Use align as @Input() in MatDialogActions Squashed commit of the following: commit 1d6daeadf8e06e38c64fec724d5a8d2899b502d3 Merge: 32764325f 3a98da840 Author: Jean-Philippe Green Date: Mon Jan 31 19:24:24 2022 +0100 Merge branch 'master' into align-attr-as-input-in-dialog-actions-#18479-2 commit 32764325fe43737c1c7137b0583d00290af16c25 Merge: 815cf8f26 1f40b7d04 Author: Jean-Philippe Date: Mon Jan 31 18:54:42 2022 +0100 Merge branch 'angular:master' into align-attr-as-input-in-dialog-actions-#18479-2 commit 815cf8f26b2e615e37d00dee0b3471973119a42c Author: Jean-Philippe Green Date: Mon Jan 10 01:23:12 2022 +0100 Use directive binding in mdc-dialog demo for align commit 77fca709f57d6d9396981bef4589a932cb1cae72 Author: Jean-Philippe Green Date: Mon Jan 10 01:20:43 2022 +0100 Change actionsAlignment type in dialog demo commit c87c4aae513d840f6d621ac172915cc25ff5885b Author: Jean-Philippe Green Date: Mon Jan 10 00:21:57 2022 +0100 Revert weird changes to dialog.spec.ts commit d6deb456240553b299aa6e30b496274ccf1b8e8d Author: Jean-Philippe Date: Sun Jan 9 23:30:24 2022 +0100 Use 'start' as default instead of undefined for align attribute in dialog actions commit 8d367c1ef4b10ae865d5e08b101189781eed5263 Author: Jean-Philippe Date: Sun Jan 9 23:05:54 2022 +0100 Update comments in dialog.scss for more clarity commit 9d2ac1600e355d28414f702d2d12baaf9b33dac1 Merge: 54d0a600a 3de4ab8fe Author: Jean-Philippe Date: Sun Jan 9 22:33:13 2022 +0100 Merge branch 'angular:master' into align-attr-as-input-in-dialog-actions-#18479 commit 54d0a600a69f28e8ffc97c0ea5e4a2fd7e605b07 Merge: 462d407b1 c79e1d13c Author: Jean-Philippe Green Date: Wed Jan 5 21:30:29 2022 +0100 Merge branch 'angular-master' into align-attr-as-input-in-dialog-actions-#18479 commit c79e1d13cbd1d81c0b0c3110c42473e00fe0db5b Merge: 462d407b1 03485cd63 Author: Jean-Philippe Green Date: Wed Jan 5 21:23:17 2022 +0100 Merge branch 'master' of https://github.com/angular/components into angular-master commit 462d407b185348404af2b5db8095f069a01b54b5 Author: Jean-Philippe Green Date: Fri Dec 25 16:18:08 2020 +0100 fix(material-experimental/mdc-dialog): make align attr into an input of dialog actions directive Fixes multiple issues, such as self-documentation of the align attribute, type checking, better bindings, and IDE support. Because align is not standard for HTMLDivElement, it doesn't make much sense to assume end users to know they can use the align attribute. Fixes #18479 for material-experimental commit c101f7ff75acdd624e1e599f1f33a67252e36558 Author: Jean-Philippe Green Date: Fri Dec 25 16:15:01 2020 +0100 fix(material/dialog): make align attribute into an input of dialog actions directive instead of css Fixes multiple issues, such as self-documentation of the align attribute, type checking, better bindings, and IDE support. Because align is not standard for HTMLDivElement, it doesn't make much sense to assume end users to know they can use the align attribute. Fixes #18479 * fixup! fix(material/dialog): Use align as @Input() in MatDialogActions ds * fix(material/dialog): fix mismatching test names between mdc and non-mdc * fix(material/dialog): fix mismatching test names between mdc and non-mdc * fix(material/dialog): update golden api for dialog * fix(material/dialog): Fix mdc action align test * fix(material/dialog): update golden api for dialog * fix(material/dialog): Fix mdc action align test * fix(material/dialog): Squashed commit of the following: commit 261cb7ccf4d438a017de1389f45760b42fcd8f5a Author: Jean-Philippe Green Date: Tue Feb 1 21:26:03 2022 +0100 fix(material/dialog): Fix mdc action align test commit b060272e6dc87b4a89d6887eb6ff123cc2ee596b Author: Jean-Philippe Green Date: Tue Feb 1 21:10:12 2022 +0100 fix(material/dialog): update golden api for dialog commit 69491e1efe727ff39b4e23b9598a88e56e20748e Author: Jean-Philippe Green Date: Tue Feb 1 17:50:37 2022 +0100 fix(material/dialog): fix mismatching test names between mdc and non-mdc commit b4a9cb3181c8d2eccf9a947411d250cf0ec485fb Author: Paul Gschwendtner Date: Tue Feb 1 17:09:37 2022 +0100 fixup! fix(material/dialog): Use align as @Input() in MatDialogActions ds commit d7a9cbb709b49881b785881014bf2308fa04c861 Author: Jean-Philippe Green Date: Mon Jan 31 19:27:13 2022 +0100 fix(material/dialog): Use align as @Input() in MatDialogActions Squashed commit of the following: commit 1d6daeadf8e06e38c64fec724d5a8d2899b502d3 Merge: 32764325f 3a98da840 Author: Jean-Philippe Green Date: Mon Jan 31 19:24:24 2022 +0100 Merge branch 'master' into align-attr-as-input-in-dialog-actions-#18479-2 commit 32764325fe43737c1c7137b0583d00290af16c25 Merge: 815cf8f26 1f40b7d04 Author: Jean-Philippe Date: Mon Jan 31 18:54:42 2022 +0100 Merge branch 'angular:master' into align-attr-as-input-in-dialog-actions-#18479-2 commit 815cf8f26b2e615e37d00dee0b3471973119a42c Author: Jean-Philippe Green Date: Mon Jan 10 01:23:12 2022 +0100 Use directive binding in mdc-dialog demo for align commit 77fca709f57d6d9396981bef4589a932cb1cae72 Author: Jean-Philippe Green Date: Mon Jan 10 01:20:43 2022 +0100 Change actionsAlignment type in dialog demo commit c87c4aae513d840f6d621ac172915cc25ff5885b Author: Jean-Philippe Green Date: Mon Jan 10 00:21:57 2022 +0100 Revert weird changes to dialog.spec.ts commit d6deb456240553b299aa6e30b496274ccf1b8e8d Author: Jean-Philippe Date: Sun Jan 9 23:30:24 2022 +0100 Use 'start' as default instead of undefined for align attribute in dialog actions commit 8d367c1ef4b10ae865d5e08b101189781eed5263 Author: Jean-Philippe Date: Sun Jan 9 23:05:54 2022 +0100 Update comments in dialog.scss for more clarity commit 9d2ac1600e355d28414f702d2d12baaf9b33dac1 Merge: 54d0a600a 3de4ab8fe Author: Jean-Philippe Date: Sun Jan 9 22:33:13 2022 +0100 Merge branch 'angular:master' into align-attr-as-input-in-dialog-actions-#18479 commit 54d0a600a69f28e8ffc97c0ea5e4a2fd7e605b07 Merge: 462d407b1 c79e1d13c Author: Jean-Philippe Green Date: Wed Jan 5 21:30:29 2022 +0100 Merge branch 'angular-master' into align-attr-as-input-in-dialog-actions-#18479 commit c79e1d13cbd1d81c0b0c3110c42473e00fe0db5b Merge: 462d407b1 03485cd63 Author: Jean-Philippe Green Date: Wed Jan 5 21:23:17 2022 +0100 Merge branch 'master' of https://github.com/angular/components into angular-master commit 462d407b185348404af2b5db8095f069a01b54b5 Author: Jean-Philippe Green Date: Fri Dec 25 16:18:08 2020 +0100 fix(material-experimental/mdc-dialog): make align attr into an input of dialog actions directive Fixes multiple issues, such as self-documentation of the align attribute, type checking, better bindings, and IDE support. Because align is not standard for HTMLDivElement, it doesn't make much sense to assume end users to know they can use the align attribute. Fixes #18479 for material-experimental commit c101f7ff75acdd624e1e599f1f33a67252e36558 Author: Jean-Philippe Green Date: Fri Dec 25 16:15:01 2020 +0100 fix(material/dialog): make align attribute into an input of dialog actions directive instead of css Fixes multiple issues, such as self-documentation of the align attribute, type checking, better bindings, and IDE support. Because align is not standard for HTMLDivElement, it doesn't make much sense to assume end users to know they can use the align attribute. Fixes #18479 commit a74d92e33df365558eaf54661db32de379d68885 Author: Kristiyan Kostadinov Date: Tue Feb 1 16:43:35 2022 +0100 fix(material/menu): adjust overlay size when amount of items changes (#21457) Currently we lock the menu into a position after it is opened so that it doesn't jump around when the user scrolls, but this means that if the amount of items changes, it might not be the optimal position anymore. These changes add some code to re-calculate the position if the amount of items changes. Fixes #21456. commit f201634243dc8b28d6a08d3eedf9e813668825a4 Author: Kristiyan Kostadinov Date: Tue Feb 1 13:22:16 2022 +0100 build: fix rules_sass error (#24331) Updates to the latest version of `rules_sass` in order to fix an error that is currently breaking the build. Co-authored-by: Paul Gschwendtner --- src/dev-app/dialog/dialog-demo.ts | 6 +++--- src/dev-app/mdc-dialog/mdc-dialog-demo.ts | 6 +++--- .../mdc-dialog/dialog-content-directives.ts | 13 +++++++++++-- src/material-experimental/mdc-dialog/dialog.scss | 11 ++++++----- .../mdc-dialog/dialog.spec.ts | 15 +++++++++++++-- src/material/dialog/dialog-content-directives.ts | 13 +++++++++++-- src/material/dialog/dialog.scss | 11 ++++++----- src/material/dialog/dialog.spec.ts | 16 ++++++++++++++-- tools/public_api_guard/material/dialog.md | 3 ++- 9 files changed, 69 insertions(+), 25 deletions(-) diff --git a/src/dev-app/dialog/dialog-demo.ts b/src/dev-app/dialog/dialog-demo.ts index 09779b331133..cc2ce89bcabd 100644 --- a/src/dev-app/dialog/dialog-demo.ts +++ b/src/dev-app/dialog/dialog-demo.ts @@ -21,7 +21,7 @@ export class DialogDemo { dialogRef: MatDialogRef | null; lastAfterClosedResult: string; lastBeforeCloseResult: string; - actionsAlignment: string; + actionsAlignment: 'start' | 'center' | 'end'; config = { disableClose: false, panelClass: 'custom-overlay-pane-class', @@ -156,7 +156,7 @@ export class JazzDialog {

- +