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(compiler): correct the KeySpan for animation events and properties #40347

Closed
wants to merge 2 commits into from

Conversation

ivanwonder
Copy link
Contributor

Now the KeySpan for animation includes @, animate-,
this PR will correct the position.

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

@google-cla google-cla bot added the cla: yes label Jan 8, 2021
@pullapprove pullapprove bot requested a review from alxhub January 8, 2021 01:10
@atscott atscott added the area: compiler Issues related to `ngc`, Angular's template compiler label Jan 8, 2021
@ngbot ngbot bot added this to the Backlog milestone Jan 8, 2021
@atscott atscott self-requested a review January 8, 2021 17:28
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

LGTM with a minor nit in the compiler code style

Also, could you please update the commit message to better describe what this change is? It's not clear what the existing behavior is and what this commit will change it to be. It also doesn't describe why this change is more correct.

Thanks!

packages/compiler/src/template_parser/binding_parser.ts Outdated Show resolved Hide resolved
@atscott atscott added target: patch This PR is targeted for the next patch release target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Jan 11, 2021
We should provide the completion when the cursor is in the attribute
name after the `@` and `animate-`, but now the `KeySpan` starts from the
`@` or `animate-`. For example, the animation event `(@name.done)="v"`,
we can know where the cursor is by the `KeySpan` of `name.done` exactly,
it's in the event name or in the phase name.
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

👍 This looks correct to me. @alxhub will need to provide approval for fw-compiler

@atscott atscott added target: rc This PR is targeted for the next release-candidate and removed target: minor This PR is targeted for the next minor release labels Jan 13, 2021
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jan 15, 2021
AndrewKushnir pushed a commit that referenced this pull request Jan 15, 2021
…ies (#40347)

We should provide the completion when the cursor is in the attribute
name after the `@` and `animate-`, but now the `KeySpan` starts from the
`@` or `animate-`. For example, the animation event `(@name.done)="v"`,
we can know where the cursor is by the `KeySpan` of `name.done` exactly,
it's in the event name or in the phase name.

PR Close #40347
@ivanwonder ivanwonder deleted the keyspan-for-animation branch January 16, 2021 12:17
@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 Feb 16, 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 area: compiler Issues related to `ngc`, Angular's template compiler cla: yes target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants