-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(stepper): remove dependency on @angular/forms #15134
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
Conversation
I think this is technically a breaking change. Anyone who is extending and trying to use other properties of AbstractControl in their derived class would need to add a line re-declaring the property. I also just wonder if this is really worth it, I would expect the CDK to have other forms related stuff in the future (e.g. some common component for displaying error messages) |
I can expand the typing to include the rest of the properties from |
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
@crisbeto actually, can you update the Caretaker note: we need to remove this dependency in the Google build file as well |
While looking at angular#15085, I noticed that the only place in the CDK where we use `@angular/forms` is to type an optional input in the stepper. These changes replace the typing with a partial representation of the `AbstractControl` so that we can drop the dependency.
5014a46
to
5189898
Compare
While looking at #15085, I noticed that the only place in the CDK where we use `@angular/forms` is to type an optional input in the stepper. These changes replace the typing with a partial representation of the `AbstractControl` so that we can drop the dependency.
Unannounced breaking change. Thanks for that! |
@rcketscientist the assumption was that it shouldn't be a breaking change and none of the apps in Google that use Material hit the issue. What error did you get? |
As you mentioned in the PR it didn't map the full API. We use CDK extensively for many material-like widgets that have slightly different functionality/styling. |
I see. I'll submit a hotfix for it. Sorry for the breaking change. |
Much appreciated :) |
In angular#15134 we reworked the stepper not to depend on `@angular/forms` under the assumption that our limited `FormControl` interface would be enough to avoid a breaking change. Some people ended up being broken by the change so this PR reworks the `stepControl` type to avoid the breaking change. Fixes angular#15462.
In angular#15134 we reworked the stepper not to depend on `@angular/forms` under the assumption that our limited `FormControl` interface would be enough to avoid a breaking change. Some people ended up being broken by the change so this PR reworks the `stepControl` type to avoid the breaking change. Fixes angular#15462.
In #15134 we reworked the stepper not to depend on `@angular/forms` under the assumption that our limited `FormControl` interface would be enough to avoid a breaking change. Some people ended up being broken by the change so this PR reworks the `stepControl` type to avoid the breaking change. Fixes #15462.
In #15134 we reworked the stepper not to depend on `@angular/forms` under the assumption that our limited `FormControl` interface would be enough to avoid a breaking change. Some people ended up being broken by the change so this PR reworks the `stepControl` type to avoid the breaking change. Fixes #15462.
In #15134 we reworked the stepper not to depend on `@angular/forms` under the assumption that our limited `FormControl` interface would be enough to avoid a breaking change. Some people ended up being broken by the change so this PR reworks the `stepControl` type to avoid the breaking change. Fixes #15462.
Thanks for the lightning fast patch guys! |
In angular#15134 we reworked the stepper not to depend on `@angular/forms` under the assumption that our limited `FormControl` interface would be enough to avoid a breaking change. Some people ended up being broken by the change so this PR reworks the `stepControl` type to avoid the breaking change. Fixes angular#15462.
…pe checking Before angular#15134 landed, the stepper accepted an`AbstractControl` from `@angular/forms`. Unfortunately this PR accidentally changed the type for the `stepControl` input from `AbstractControl` to `FormControl`. This means that with strict template type checking, passing a `FormGroup` (like we do in our dev-app various times) causes type check failures. We need to adjust the `stepControl` type to accept an abstract control which is the base of a `FormControl` and `FormmGroup`.
…pe checking Before angular#15134 landed, the stepper accepted an`AbstractControl` from `@angular/forms`. Unfortunately this PR accidentally changed the type for the `stepControl` input from `AbstractControl` to `FormControl`. This means that with strict template type checking, passing a `FormGroup` (like we do in our dev-app various times) causes type check failures. We need to adjust the `stepControl` type to accept an abstract control which is the base of a `FormControl` and `FormmGroup`.
…pe checking Before angular#15134 landed, the stepper accepted an`AbstractControl` from `@angular/forms`. Unfortunately this PR accidentally changed the type for the `stepControl` input from `AbstractControl` to `FormControl`. This means that with strict template type checking, passing a `FormGroup` (like we do in our dev-app various times) causes type check failures. We need to adjust the `stepControl` type to accept an abstract control which is the base of a `FormControl` and `FormmGroup`.
…pe checking Before angular#15134 landed, the stepper accepted an`AbstractControl` from `@angular/forms`. Unfortunately this PR accidentally changed the type for the `stepControl` input from `AbstractControl` to `FormControl`. This means that with strict template type checking, passing a `FormGroup` (like we do in our dev-app various times) causes type check failures. We need to adjust the `stepControl` type to accept an abstract control which is the base of a `FormControl` and `FormmGroup`.
…pe checking Before angular#15134 landed, the stepper accepted an`AbstractControl` from `@angular/forms`. Unfortunately this PR accidentally changed the type for the `stepControl` input from `AbstractControl` to `FormControl`. This means that with strict template type checking, passing a `FormGroup` (like we do in our dev-app various times) causes type check failures. We need to adjust the `stepControl` type to accept an abstract control which is the base of a `FormControl` and `FormmGroup`.
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. |
While looking at #15085, I noticed that the only place in the CDK where we use
@angular/forms
is to type an optional input in the stepper. These changes replace the typing with a partial representation of theAbstractControl
so that we can drop the dependency.