|
Adds support for Observable objects in web_ui.
This includes @observable annotation for automatic transformation by DWC. It also includes ObservableList/Map/Set types.
Observables use a batch-notification system where changes are queued up and sent to the handler during the "next microtask". This is similar to ES7 Object.observe proposal.
We don't have detailed change records yet but I plan to work on that in a follow up change. Keep that in mind when reviewing ObservableList/Map/Set types because they're in for an overhaul. The CL for that isn't ready but for comparison purposes you can find it here: https://chromiumcodereview.appspot.com/12096106/
All tests have been converted. Since I had to go through every single test, I took the liberty of removing incorrect <title> attributes throughout.
I still need to convert the MDV and explainer examples. I'm also interested in more perf tests. I'll work on that now, but would prefer not expanding the scope of this (already big) change :)
Feature request: https://github.com/dart-lang/web-ui/issues/259
Committed: https://github.com/dart-lang/web-ui/commit/749924d
Total comments: 71
Total comments: 65
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+3041 lines, -1089 lines) |
Patch |
 |
M |
example/todomvc/editable_label.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
example/todomvc/main.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -13 lines |
0 comments
|
Download
|
 |
M |
example/todomvc/model.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
example/todomvc/router_options.html
|
View
|
1
2
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
A |
lib/observe.dart
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+494 lines, -0 lines |
0 comments
|
Download
|
 |
A |
lib/observe/html.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
 |
A |
lib/observe/list.dart
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+235 lines, -0 lines |
0 comments
|
Download
|
 |
A |
lib/observe/map.dart
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+221 lines, -0 lines |
0 comments
|
Download
|
 |
A |
lib/observe/reference.dart
|
View
|
1
2
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
 |
A |
lib/observe/set.dart
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+181 lines, -0 lines |
0 comments
|
Download
|
 |
M |
lib/src/analyzer.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
lib/src/codegen.dart
|
View
|
1
2
3
|
3 chunks |
+9 lines, -34 lines |
0 comments
|
Download
|
 |
M |
lib/src/compiler.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
7 chunks |
+233 lines, -51 lines |
0 comments
|
Download
|
 |
A |
lib/src/dart_parser.dart
|
View
|
1
2
3
|
1 chunk |
+174 lines, -0 lines |
0 comments
|
Download
|
 |
D |
lib/src/directive_parser.dart
|
View
|
1
2
3
|
1 chunk |
+0 lines, -388 lines |
0 comments
|
Download
|
 |
M |
lib/src/emitters.dart
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+62 lines, -38 lines |
0 comments
|
Download
|
 |
M |
lib/src/files.dart
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/src/info.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
7 chunks |
+34 lines, -44 lines |
0 comments
|
Download
|
 |
A |
lib/src/observable_transform.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+211 lines, -0 lines |
0 comments
|
Download
|
 |
A |
lib/src/refactor.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+105 lines, -0 lines |
0 comments
|
Download
|
 |
M |
lib/templating.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
12 chunks |
+41 lines, -14 lines |
0 comments
|
Download
|
 |
M |
lib/watcher.dart
|
View
|
1
2
3
4
5
6
|
6 chunks |
+24 lines, -26 lines |
0 comments
|
Download
|
 |
M |
lib/web_ui.dart
|
View
|
|
2 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
pubspec.yaml
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
test/data/expected/element_ctor_test.html.txt
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/attr_multiple_bindings_test.html
|
View
|
1
2
3
|
2 chunks |
+5 lines, -9 lines |
0 comments
|
Download
|
 |
M |
test/data/input/bind_hyphenated_attribute_test.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/code_in_dart_file_component.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
test/data/input/code_in_dart_file_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/common.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/component_field_2way_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/component_field_test.html
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+10 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/component_imports_component2_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/component_imports_component3_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/component_imports_component_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/component_in_main_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/component_inherit_noscript_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/component_inherit_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/conditional2_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/conditional3_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/conditional4_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/conditional5_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/conditional_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/constant_argument_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/css_classes_binding_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/custom_radio_button_test.html
|
View
|
1
2
3
|
4 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/data/input/dir3/bootstrap_path_test_main.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/dom_accessor_binding2_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/dom_accessor_binding_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/duplicate_event_listeners_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/element_ctor_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/data/input/empty2_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/empty_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/ensure_parent_test.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/escape2_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/data/input/escape_test.html
|
View
|
1
2
3
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/escape_uri_test.html
|
View
|
1
2
3
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/html_escape_test.html
|
View
|
1
2
3
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
test/data/input/if_attribute_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/if_children_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/if_fragments2_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/if_fragments3_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/if_fragments4_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/if_fragments_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/iterate_attribute_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/iterate_fragments_test.html
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list2_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list3_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list4_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list5_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list6_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list_children_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/list_component_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/list_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/main_code_in_dart_file.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/mix_iterate_if_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/news_index_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/path_normalization_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/query_in_main_test.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/radio_button_test.html
|
View
|
1
2
3
|
4 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/data/input/recursive_component_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/data/input/recursive_test_data.dart
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/root_query_no_shadowroot_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/style_binding_test.html
|
View
|
1
2
3
|
2 chunks |
+14 lines, -4 lines |
0 comments
|
Download
|
 |
M |
test/data/input/table_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+17 lines, -13 lines |
0 comments
|
Download
|
 |
M |
test/data/input/template_multiple_children_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/template_zero_children_test.html
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/text_multiple_bindings_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
 |
M |
test/data/input/text_top_level2_test.html
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/text_top_level_test.html
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/text_tostring_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
test/data/input/todomvc_listorder_shadowdom_test.html
|
View
|
1
2
3
|
2 chunks |
+16 lines, -14 lines |
0 comments
|
Download
|
 |
M |
test/data/input/todomvc_listorder_test.html
|
View
|
1
2
3
|
1 chunk |
+17 lines, -14 lines |
0 comments
|
Download
|
 |
M |
test/data/input/todomvc_mainpage2_test.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/todomvc_mainpage_test.html
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/data/input/todomvc_markdone_test.html
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/data/input/watch_global_var2_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/data/input/watch_global_var3_test.html
|
View
|
1
2
3
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
test/data/input/watch_global_var_test.html
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
D |
test/directive_parser_test.dart
|
View
|
1
2
3
|
1 chunk |
+0 lines, -170 lines |
0 comments
|
Download
|
 |
M |
test/emitter_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
A |
test/observe_test.dart
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+611 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
test/perf/input/change_1_of_100_test.html
|
View
|
|
2 chunks |
+19 lines, -19 lines |
0 comments
|
Download
|
 |
A |
test/perf/input/observe_model.dart
|
View
|
1
2
3
4
5
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
test/run_all.dart
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 9 (0 generated)
|