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

Legacy warnings 3.x #5474

Merged
merged 10 commits into from Feb 5, 2019
Merged

Legacy warnings 3.x #5474

merged 10 commits into from Feb 5, 2019

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

lib/mixins/property-effects.js Outdated Show resolved Hide resolved
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.

None yet

3 participants