-
Notifications
You must be signed in to change notification settings - Fork 0
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
Upgrade to Polymer 2.0 #5
Comments
I think we'll start with fs-signin and then fs-person-portrait and it's dependencies. Everything should be pretty straightforward after that. |
I have fs-signin, fs-client, and fs-behavior upgraded to Polymer 2. I'm going for legacy mode which lets us continue using the 1.0 API with minimal changes; only changes I've done are related to CSS shims. All changes are being committed to |
While working on the upgrade for |
This jsbin seems to say that the timing I relied on wasn't guaranteed: https://jsbin.com/bewaquwugo/edit?html,console,output I'm seeing observers being called before ready() in 1.x |
Turns out the issue isn't with timing of property observers with relation to |
But I just proved that's not true either: |
I need to create a minimal reproduceable test case. |
The problem can be fixed (circumvented) by wrapping the API request in I tried commenting out I see the right order of events inside <fs-person-chip person-id="KWWC-RCL"></fs-person-chip> That suggests it's something with the complex configuration of I tried changing it from a hard-coded person-id to a binding on the person object, as is done normally in <fs-person-chip person="[[family.father]]"></fs-person-chip> That narrows it down significantly. Something with the timing of property observers and bindings. I still don't understand how that affects the timing of |
🎉 I finally created a reproducable test case in JS Bin: http://jsbin.com/xexuturave/edit?html,console,output |
Reported the issue to Polymer at Polymer/polymer#4447 |
The bug was confirmed by Polymer. There's not much to do until that's fixed. |
Polymer released a fix for the bug. I confirmed that it works. We're back in business. |
I hit an issue when upgrading the sample app. Polymer 2 doesn't guarantee any order of events for children and that's causing the client to not be configured properly. In v1 we relied on the order being guaranteed so we put the fs-client with configuration at the beginning and the client was correctly setup. But now that order isn't guaranteed, it's not necessarily being setup first so a non-configured client is being setup first and it creates the SDK instance with no config properties. Then when the configured fs-client is setup it's properties are ignored because the SDK instance is already setup. So either we need to find a way and rely on ordering or update the SDK to allow config properties to be changed after instantiation. |
Now that FamilySearch/fs-js-lite#28 added the |
I updated fs-client so that it works regardless of order. Next I need to address this issue as reported in the console:
|
There's one last issue. The person history dropdown is not updating properly. The dropdown lists updates as we browse but the label that shows the currently selected value when it's collapsed doesn't update properly. After hours of investigation I believe it's caused by the DOM elements being recycled when the list changes. This causes observers to not detect changes (because the selected DOM element didn't change, just the contents did) and thus change events are not emitted and the dropdown menu doesn't get notified that the list changed. |
Related: Polymer/polymer#4363 |
Bug report: PolymerElements/iron-selector#154 |
After figuring out exactly what the bug was, it was pretty easy to find a work around. So now we're all done with the v2 upgrade. 🎉 |
Polymer 2.0 RC was released this week. Lets work on upgrading the components to 2.0.
The text was updated successfully, but these errors were encountered: