Skip to content

docs(cdk/coercion): expand overview #22791

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

Merged
merged 1 commit into from
May 26, 2021
Merged

Conversation

crisbeto
Copy link
Member

Companion PR to angular/material.angular.io#994. Expands the overview of the coercion package so that we have more than one sentence to show.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent docs This issue is related to documentation merge safe target: patch This PR is targeted for the next patch release labels May 25, 2021
@crisbeto crisbeto requested review from jelbourn and andrewseguin May 25, 2021 18:13
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 25, 2021
Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start to the doc! I wonder if we eventually want to add some kind of table that helps users know what different values turn into, e.g. `` turns to true, `"false"` is `false`, etc


### Example

```ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this a full example? It's pretty extensive for a code block

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning for keeping it inline is that the example won't be particularly visual since the coercion only affects the public API of the component.

Companion PR to angular/material.angular.io#994. Expands the overview of the coercion package so that we have more than one sentence to show.
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 26, 2021
// It also allows for a string to be passed like `<my-button disabled="true"></my-button>`.
@Input()
get disabled() { return this._disabled; }
set disabled(value: any) {
Copy link

@dev054 dev054 May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to ask, but is any correct here (and in the other example)? I ask therefore, because as it is a bad practice, IMHO it shouldn't be in official docs as this can influence bad habits for other devs. Note that a simple boolean/number would solve it (as you already does in majority of your components).

@mmalerba mmalerba merged commit 0b04570 into angular:master May 26, 2021
mmalerba pushed a commit that referenced this pull request May 26, 2021
Companion PR to angular/material.angular.io#994. Expands the overview of the coercion package so that we have more than one sentence to show.

(cherry picked from commit 0b04570)
@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 Jun 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement docs This issue is related to documentation P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants