Skip to content

Conversation

kevinpschaaf
Copy link
Member

Adds warnings for a couple of subtle changes in behavior between 1.x and 2.x:

Reference Issue

Fixes #5473 and #5468.

Copy link
Contributor

@sorvell sorvell left a comment

Choose a reason for hiding this comment

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

Let's consider also warning if a user tries to change readOnly or reflectToAttribute or notify.

We should remove the doc line about "consider adding warnings" since we are doing that here.

@@ -2390,6 +2390,9 @@ export const PropertyEffects = dedupingMixin(superClass => {
* @protected
*/
static _addTemplatePropertyEffect(templateInfo, prop, effect) {
if (legacyOptimizations && !(prop in templateInfo.dynamicFns)) {
console.warn(`Property '${prop}' used in template but not declared in 'properties'.`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.warn(`Property '${prop}' used in template but not declared in 'properties'.`);
console.warn(`Property '${prop}' used in template but not declared in 'properties'. Setting an attribute will not set the corresponding property unless the property is declared in 'properties'.`;

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@sorvell sorvell left a comment

Choose a reason for hiding this comment

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

LGTM, pending tests passing

@kevinpschaaf kevinpschaaf merged commit cb86634 into master Feb 5, 2019
@kevinpschaaf kevinpschaaf deleted the legacy-warnings-3.x branch February 5, 2019 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants