Skip to content
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

fix(language-service): Proper completions for properties and events #34445

Closed
wants to merge 1 commit into from

Conversation

@kyliau
Copy link
Member

kyliau commented Dec 17, 2019

This commit fixes autocompletions for properties and events bindings.

The language service will no longer provide bindings like (click) or [id].
Instead, it'll infer the context based on the brackets and provide suggestions
without any brackets.

This fix also adds support for alternative binding syntax such as
bind-, on-, and bindon.

PR closes angular/vscode-ng-language-service#398
PR closes angular/vscode-ng-language-service#474

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kyliau kyliau requested a review from ayazhafiz Dec 17, 2019
@kyliau kyliau requested a review from angular/tools-language-service as a code owner Dec 17, 2019
@ngbot ngbot bot added this to the needsTriage milestone Dec 17, 2019
@googlebot googlebot added the cla: yes label Dec 17, 2019
packages/language-service/src/completions.ts Outdated Show resolved Hide resolved
packages/language-service/src/completions.ts Outdated Show resolved Hide resolved
packages/language-service/src/completions.ts Outdated Show resolved Hide resolved
packages/language-service/src/utils.ts Outdated Show resolved Hide resolved
packages/language-service/src/completions.ts Outdated Show resolved Hide resolved
@kyliau kyliau force-pushed the kyliau:banana branch 2 times, most recently from d71119c to eef30ba Dec 17, 2019
packages/language-service/src/utils.ts Outdated Show resolved Hide resolved
'ngSwitchCase',
'ngSwitchDefault',
'ngPluralCase',
]);

This comment has been minimized.

Copy link
@ayazhafiz

ayazhafiz Dec 17, 2019

Member

Can we add tests for custom TemplateRefs? This can be done in another PR if needed.

This comment has been minimized.

Copy link
@kyliau

kyliau Dec 17, 2019

Author Member

Will do this in another PR. There isn't any existing directives that provide custom TemplateRef.

packages/language-service/test/completions_spec.ts Outdated Show resolved Hide resolved
This commit fixes autocompletions for properties and events bindings.

The language service will no longer provide bindings like (click) or [id].
Instead, it'll infer the context based on the brackets and provide suggestions
without any brackets.

This fix also adds support for alternative binding syntax such as
`bind-`, `on-`, and `bindon`.

PR closes angular/vscode-ng-language-service#398
PR closes angular/vscode-ng-language-service#474
@kyliau kyliau force-pushed the kyliau:banana branch from eef30ba to bd42f26 Dec 17, 2019
@kyliau

This comment has been minimized.

Copy link
Member Author

kyliau commented Dec 18, 2019

caretaker: ci/angular:size got stuck

@kara kara closed this in a04f7c0 Dec 18, 2019
kara added a commit that referenced this pull request Dec 18, 2019
…34445)

This commit fixes autocompletions for properties and events bindings.

The language service will no longer provide bindings like (click) or [id].
Instead, it'll infer the context based on the brackets and provide suggestions
without any brackets.

This fix also adds support for alternative binding syntax such as
`bind-`, `on-`, and `bindon`.

PR closes angular/vscode-ng-language-service#398
PR closes angular/vscode-ng-language-service#474

PR Close #34445
@angular-automatic-lock-bot

This comment has been minimized.

Copy link

angular-automatic-lock-bot bot commented Jan 18, 2020

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 Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.