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 JavaScript errors in the demo (closes #43) #44

Merged
merged 1 commit into from
Jun 23, 2016

Conversation

philipwalton
Copy link
Member

It appears that the styling issue in #43 was caused by JavaScript errors on the page that were preventing the styles from fully loading.

I've update the code to work around these errors, but I'm a little concerned about the fact that they happened in the first place. Here's what happened:

  1. Change GoogleWebComponents/google-chart@4cd73d1 introduced a new default value for the options property which broke the <google-analytics-chart> element. Arguably this change shouldn't have been introduced without a major version bump for this exact reason.
  2. In <google-analytics-dashboard>, the queryUpdated event listener is getting called prior to the query property being initialized with its default value. I don't think this is WAI; it seems like it might be a bug in Polymer, though I don't have time to track down what may have caused the change in behavior.

I'm happy to have these updates merged to fix the immediate styling issue, but if someone else has an answer to the second problem above, I think it would be better to figure out the source of the problem rather than merging in a temporary hack.

@philipwalton
Copy link
Member Author

@ebidel PTAL

@ebidel
Copy link
Contributor

ebidel commented Jun 23, 2016

Yea that should have been a major release if it's a breaking change for consumers.

Re 2, it's probably a good idea to put the check in place like you have. Another way to guard against the timing issue is to setup a listener in attached. That way you know your properties object is ready to go at that point.

@ebidel
Copy link
Contributor

ebidel commented Jun 23, 2016

LGTM

@ebidel ebidel merged commit a09d6c0 into GoogleWebComponents:master Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants