Skip to content

fix(ivy): validate props and attrs with "on" prefix at runtime - #28054

Closed
AndrewKushnir wants to merge 2 commits into
angular:masterfrom
AndrewKushnir:FW-786_on_prefixed_props_v2
Closed

AndrewKushnir wants to merge 2 commits into
angular:masterfrom
AndrewKushnir:FW-786_on_prefixed_props_v2

Conversation

@AndrewKushnir

Copy link
Copy Markdown
Contributor

Prior to this change we performed prop and attr name validation at compile time, which failed in case a given prop/attr is an input to a Directive (thus should not be a subject to this check). Since Directive matching in Ivy happens at runtime, the corresponding checks are now moved to runtime as well.

Messages in validateProperty and validateAttribute functions functions were taken from the corresponding functions in Compiler, to make sure all asserts remain the same.

This PR resolves FW-786.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release comp: ivy labels Jan 10, 2019
@AndrewKushnir
AndrewKushnir requested review from a team and kara January 10, 2019 22:15
@ngbot ngbot Bot added this to the needsTriage milestone Jan 10, 2019
@mary-poppins

Copy link
Copy Markdown

You can preview fbec37a at https://pr28054-fbec37a.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview b6f6117 at https://pr28054-b6f6117.ngbuilds.io/.

@pkozlowski-opensource pkozlowski-opensource Jan 11, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: consider removing double negation (rename to sth like validateAttrOrProp and remove !). While we are at the names maybe we should be explicit what the validation is all about. validateName?

@pkozlowski-opensource pkozlowski-opensource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Left one nit, feel free to ignore.

@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 11, 2019
@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

Presubmit

@kara kara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Prior to this change we performed prop and attr name validation at compile time, which failed in case a given prop/attr is an input to a Directive (thus should not be a subject to this check). Since Directive matching in Ivy happens at runtime, the corresponding checks are now moved to runtime as well.
@AndrewKushnir
AndrewKushnir force-pushed the FW-786_on_prefixed_props_v2 branch from b6f6117 to 8535a52 Compare January 12, 2019 01:33
@mary-poppins

Copy link
Copy Markdown

You can preview 8535a52 at https://pr28054-8535a52.ngbuilds.io/.

@angular-automatic-lock-bot

Copy link
Copy Markdown

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 14, 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 target: major This PR is targeted for the next major release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants