X Tutup
Skip to content

feat(ivy): improve ExpressionChangedAfterChecked error message for attributes#34505

Closed
AndrewKushnir wants to merge 1 commit intoangular:masterfrom
AndrewKushnir:cd_error_details_for_attrs
Closed

feat(ivy): improve ExpressionChangedAfterChecked error message for attributes#34505
AndrewKushnir wants to merge 1 commit intoangular:masterfrom
AndrewKushnir:cd_error_details_for_attrs

Conversation

@AndrewKushnir
Copy link
Copy Markdown
Contributor

This commit improves ExpressionChangedAfterChecked error message for attributes by including attribute name and the content of the entire expression that contains interpolation(s). In order to achieve that, metadata is now stored in TData array when attribute and attributeInterpolate instructions are being called (similar to property and propertyInterpolate instructions).

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 target: patch This PR is targeted for the next patch release comp: ivy labels Dec 20, 2019
@ngbot ngbot bot modified the milestone: needsTriage Dec 20, 2019
@AndrewKushnir AndrewKushnir added the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 20, 2019
@AndrewKushnir AndrewKushnir marked this pull request as ready for review December 20, 2019 06:11
@AndrewKushnir AndrewKushnir requested a review from a team December 20, 2019 06:11
@AndrewKushnir AndrewKushnir added feature Label used to distinguish feature request from other issues and removed type: bug/fix labels Dec 20, 2019
…attributes

This commit improves `ExpressionChangedAfterChecked` error message for attributes by including attribute name and the content of the entire expression that contains interpolation(s). In order to achieve that, metadata is now stored in `TData` array when `attribute` and `attributeInterpolate` instructions are being called (similar to `property` and `propertyInterpolate` instructions).
@AndrewKushnir AndrewKushnir force-pushed the cd_error_details_for_attrs branch from 001d288 to f515947 Compare December 20, 2019 23:47
@AndrewKushnir AndrewKushnir changed the title fix(ivy): improve ExpressionChangedAfterChecked error message for attributes feat(ivy): improve ExpressionChangedAfterChecked error message for attributes Dec 20, 2019
import {getLView, getSelectedIndex, nextBindingIndex} from '../state';

import {elementAttributeInternal} from './shared';
import {elementAttributeInternal, storePropertyBindingMetadata} from './shared';
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: what do you think of renaming storePropertyBindingMetadata to storeBindingMetadata (since now it is applied to both property bindings, attributes, interpolations etc.)?

Copy link
Copy Markdown
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM, left one nit comment to be resolved at your discretion

@pkozlowski-opensource pkozlowski-opensource removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 9, 2020
@pkozlowski-opensource
Copy link
Copy Markdown
Member

Oh, I can see that you've changed the storePropertyBindingMetadata name in #34520 so we can land this one. Thnx for doing the rename!

@pkozlowski-opensource pkozlowski-opensource added the action: merge The PR is ready for merge by the caretaker label Jan 9, 2020
@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Jan 9, 2020
@AndrewKushnir
Copy link
Copy Markdown
Contributor Author

Presubmit

@AndrewKushnir
Copy link
Copy Markdown
Contributor Author

Thanks for the review @pkozlowski-opensource! 👍

@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Jan 9, 2020
atscott pushed a commit that referenced this pull request Jan 9, 2020
…attributes (#34505)

This commit improves `ExpressionChangedAfterChecked` error message for attributes by including attribute name and the content of the entire expression that contains interpolation(s). In order to achieve that, metadata is now stored in `TData` array when `attribute` and `attributeInterpolate` instructions are being called (similar to `property` and `propertyInterpolate` instructions).

PR Close #34505
@atscott atscott closed this in c3f14bb Jan 9, 2020
@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 Feb 9, 2020
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 feature Label used to distinguish feature request from other issues target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup