-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Rename Templatizer->Templatize & add bc Templatizer behavior #4277
Conversation
@kevinpschaaf could you check these issues please? |
src/templatizer/templatizer.html
Outdated
let Templatizer = { | ||
templatize(template) { | ||
this._userTemplate = template; | ||
this.ctor = Templatize.templatize(template, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed _ctor
toctor
since that is how it was defined in v1.
Having the tests (Templatizer related) for iron-list 2.0 in hybrid mode passing, I think the changes LGTM. Thanks! There are a few remaining issues we can address on separate PRs if necessary:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* `templatizer` folder -> data-elements folder * `templatizer in filenames` -> templatize * `fwdHostPropToInstance` -> forwardHostProp * `fwdInstancePropToHost` -> notifyInstanceProp * behavior `_fwdHostPropToInstance` -> _forwardHostPropV2 * behavior `_ fwdInstancePropToHost` -> _notifyInstancePropV2
* templatize now takes 2nd arg for the binding context of the callbacks * removed first argument of forwardHostProp callback * TemplateInstance constructor no longer takes "host" arugment * TemplateInstance API forwardProperty & flushProperties removed * TemplateInstance API forwardHostProp added, should be called from forwardHostProp callback
@blasten We treated this PR as an overall review of the 2.0 Templatizer API, and made the following changes:
Refer to e.g. |
Rename
Polymer.Templatizer
library toPolymer.Templatize
& add pseudo-backwards-compatiblePolymer.Templatizer
behavior for slightly better hybrid support.For now, users will need to implement both 1.0 & 2.0 callbacks differently (to e.g. deal with path differences due to removal of Collection, different
TemplateInstance
API, etc:Example hybrid element: