Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Issue 24149003: Port of github.com/polymer/polymer. (Closed)

Created:
7 years, 3 months ago by Jennifer Messerly
Modified:
7 years, 2 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Port Polymer.js Core, the github.com/polymer/polymer code. Ports all features except where JS interop is blocking us (declaration/path.js and instance/style.js). In particular, this has: // src/declaration/attributes.js // src/declaration/events.js // src/declaration/polymer-element.js // src/declaration/properties.js // src/declaration/prototype.js // src/declaration/styles.js // src/instance/attributes.js // src/instance/base.js // src/instance/events.js // src/instance/mdv.js // src/instance/properties.js // src/instance/utils.js // src/lib/deserialize.js // src/lib/job.js // src/lib/dom.js -- not needed in Dart // src/lib/lang.js -- not needed in Dart // src/lib/super.js -- not needed in Dart There's also a big architectural change: polymer-element data is now stored in the PolymerDeclaration class, which is separate from PolymerElement. This allows us to avoid duplicate work on every constructor, and should significantly speed up instance creation. All code is from the same revision: https://github.com/Polymer/polymer/blob/4dc481c11505991a7c43228d3797d28f21267779 The remaining unported files are for relatively minor features. "declaration/path.js" is for asset URL resolution, and we might have a Pub-based solution instead. "instance/style.js" has an opt-in, advanced style polyfill. It needs "ShadowCSS.shimPolyfillDirectives", and probably isn't too hard to make work in a follow up change. Other changes: * attributeChanged lifecycle method is implemented. * ObservableAnnotation is public so Polymer's @published can subclass it * bindProperty renamed to onPropertyChange to avoid conflict with Polymer member of the same name. * polymer/lib/boot.js preload's polymer-element and link[rel=stylesheet] R=blois@google.com Committed: https://code.google.com/p/dart/source/detail?r=28134

Patch Set 1 #

Patch Set 2 : moar porting #

Patch Set 3 : more porting progress, need tests ported #

Patch Set 4 : using Polymer.register, and other fixes #

Patch Set 5 : rm duplicate file #

Patch Set 6 : #

Patch Set 7 : todomvc working #

Patch Set 8 : few small fixes to published attributes #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Total comments: 30

Patch Set 12 : #

Patch Set 13 : test fixes #

Patch Set 14 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2646 lines, -913 lines) Patch
M pkg/custom_element/lib/custom_element.dart View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +10 lines, -9 lines 0 comments Download
A pkg/custom_element/lib/src/attribute_map.dart View 1 2 3 1 chunk +85 lines, -0 lines 0 comments Download
M pkg/observe/lib/src/bind_property.dart View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M pkg/observe/lib/src/observable.dart View 1 3 chunks +12 lines, -8 lines 0 comments Download
M pkg/pkg.status View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +24 lines, -5 lines 0 comments Download
M pkg/polymer/example/component/news/web/news-component.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M pkg/polymer/lib/boot.js View 1 2 3 1 chunk +24 lines, -2 lines 0 comments Download
M pkg/polymer/lib/component_build.dart View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
A pkg/polymer/lib/deserialize.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +51 lines, -0 lines 0 comments Download
A pkg/polymer/lib/job.dart View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
A pkg/polymer/lib/platform.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +41 lines, -0 lines 0 comments Download
M pkg/polymer/lib/polymer.dart View 1 2 3 1 chunk +17 lines, -122 lines 0 comments Download
M pkg/polymer/lib/polymer_element.dart View 1 2 3 1 chunk +1 line, -552 lines 0 comments Download
M pkg/polymer/lib/src/build/linter.dart View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +51 lines, -7 lines 0 comments Download
M pkg/polymer/lib/src/build/runner.dart View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -2 lines 0 comments Download
A + pkg/polymer/lib/src/build/utils.dart View 1 2 3 4 5 6 7 8 9 10 11 0 chunks +-1 lines, --1 lines 0 comments Download
A pkg/polymer/lib/src/declaration.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +713 lines, -0 lines 0 comments Download
A pkg/polymer/lib/src/instance.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +930 lines, -0 lines 0 comments Download
A + pkg/polymer/lib/src/loader.dart View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -57 lines 0 comments Download
D pkg/polymer/lib/src/utils.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -34 lines 0 comments Download
M pkg/polymer/lib/transformer.dart View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M pkg/polymer/pubspec.yaml View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
A pkg/polymer/test/attr_deserialize_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +45 lines, -0 lines 0 comments Download
A pkg/polymer/test/attr_deserialize_test.html View 1 2 3 4 5 6 7 8 1 chunk +29 lines, -0 lines 0 comments Download
A pkg/polymer/test/attr_mustache_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +50 lines, -0 lines 0 comments Download
A pkg/polymer/test/attr_mustache_test.html View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -0 lines 0 comments Download
M pkg/polymer/test/build/linter_test.dart View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +32 lines, -5 lines 0 comments Download
A + pkg/polymer/test/build/utils_test.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
A pkg/polymer/test/prop_attr_reflection_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +110 lines, -0 lines 0 comments Download
A pkg/polymer/test/prop_attr_reflection_test.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +32 lines, -0 lines 0 comments Download
A pkg/polymer/test/publish_attributes_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +53 lines, -0 lines 0 comments Download
A pkg/polymer/test/publish_attributes_test.html View 1 2 3 4 5 6 7 8 9 1 chunk +29 lines, -0 lines 0 comments Download
A pkg/polymer/test/take_attributes_test.dart View 1 2 3 4 5 6 7 8 9 1 chunk +109 lines, -0 lines 0 comments Download
A pkg/polymer/test/take_attributes_test.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +75 lines, -0 lines 0 comments Download
D pkg/polymer/test/utils_test.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -86 lines 0 comments Download
M samples/third_party/todomvc/web/app.dart View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M samples/third_party/todomvc/web/editable_label.dart View 1 2 3 4 5 6 3 chunks +5 lines, -4 lines 0 comments Download
M samples/third_party/todomvc/web/editable_label.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
M samples/third_party/todomvc/web/model.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M samples/third_party/todomvc/web/router_options.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M samples/third_party/todomvc/web/todo_row.dart View 1 2 3 4 5 6 1 chunk +3 lines, -5 lines 0 comments Download
M samples/third_party/todomvc/web/todo_row.html View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Jennifer Messerly
Hey Pete, I'm still porting more tests, but I think this is ready to start ...
7 years, 2 months ago (2013-09-27 19:14:33 UTC) #1
blois
https://codereview.chromium.org/24149003/diff/42001/pkg/observe/lib/src/bind_property.dart File pkg/observe/lib/src/bind_property.dart (right): https://codereview.chromium.org/24149003/diff/42001/pkg/observe/lib/src/bind_property.dart#newcode28 pkg/observe/lib/src/bind_property.dart:28: void callback()) { Not related to this change, but ...
7 years, 2 months ago (2013-09-27 21:40:51 UTC) #2
Jennifer Messerly
thanks Pete! Sounds like we've got a lot to discuss with Polymer team :). I ...
7 years, 2 months ago (2013-09-30 17:44:37 UTC) #3
blois
lgtm
7 years, 2 months ago (2013-09-30 19:40:52 UTC) #4
Jennifer Messerly
7 years, 2 months ago (2013-10-01 23:46:14 UTC) #5
Message was sent while issue was closed.
Committed patchset #14 manually as r28134 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698