Skip to content

docs(chips): make separatorKeysCodes readonly #11830

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 2 commits into from
Jun 26, 2018

Conversation

jhuang314
Copy link
Contributor

Make separatorKeysCodes readonly because it isn't changed after component is intialized.

Make separatorKeysCodes readonly because it isn't changed after component is intialized.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 18, 2018
@@ -17,7 +17,7 @@ export class ChipsInputExample {
addOnBlur: boolean = true;

// Enter, comma
separatorKeysCodes = [ENTER, COMMA];
readonly separatorKeysCodes = [ENTER, COMMA];
Copy link
Member

Choose a reason for hiding this comment

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

Is there a strong reason to do this in the example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the example, it looks like the key codes are essentially constants, so I think it would make sense if we add the readonly modifier. The motivation for this change proposal came from a teammate who copy pasted the code from the example and interpreted the example code as best practices (i.e. omitting the readonly).

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm docs This issue is related to documentation action: merge The PR is ready for merge by the caretaker labels Jun 19, 2018
@ngbot
Copy link

ngbot bot commented Jun 19, 2018

I see that you just added the pr: merge ready label, but the following checks are still failing:
    failure status "continuous-integration/travis-ci/pr" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@tinayuangao
Copy link
Contributor

@jhuang314 Could you please rebase? Thanks!

@ngbot
Copy link

ngbot bot commented Jun 20, 2018

Hi @jhuang314! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@josephperrott josephperrott removed the action: merge The PR is ready for merge by the caretaker label Jun 20, 2018
@josephperrott josephperrott added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Jun 26, 2018
@josephperrott josephperrott merged commit 9a5fad6 into angular:master Jun 26, 2018
@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 Sep 9, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants