-
Notifications
You must be signed in to change notification settings - Fork 397
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: show deprecated related information in material/tooltip
#1274
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
d2c1e1f
to
33d57e7
Compare
(apologies for ping) @crisbeto @devversion can we land this since angular/components#29873 is merged? |
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.
Ty. This looks great. A few minors nits, but otherwise that's great.
(Sorry for slow responses; we've been on a full day summit)
}) | ||
export class DeprecatedFieldComponent { | ||
/** Message regarding the deprecation */ | ||
@Input() message!: string; |
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.
Nit: consider using input.required
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.
i'm not sure how will i set the value for this input dynamically via ComponentPortal if we use signal based input.
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.
Ohh. It doesn't need to be an input at all then, I think 😄
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.
yes, true. I missed that! 😄
// all of the deprecated markers end with `deprecated-marker` | ||
// in their class name | ||
const deprecatedElements = | ||
this._elementRef.nativeElement.querySelectorAll(`[class$=deprecated-marker]`); |
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.
Is the $=
needed?
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.
its shorter for like:
querySelectorAll('.docs-api-deprecated-marker, .docs-api-class-deprecated-marker, .docs-api-class-interface-marker, .some-more')
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.
I see. How about adding a small comment illustrating the pattern + using -deprecated-marker
as suffix test?
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.
should be good now, lemme know if it needs rewording cause my english isn't so good.
previously we weren't showing any other information other than `breaking-change` for deprecated fields, this commit adds a component that protrays information regarding deprecation in tooltips rather than `title` attribute closes angular/components#29839
previously we weren't showing any other information other than
breaking-change
for deprecated fields, this commit adds a component that protrays information regarding deprecation in tooltips rather thantitle
attributecloses angular/components#29839