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

Issue 975863003: Don't hardcode the list of events types in fn (Closed)

Created:
5 years, 9 months ago by abarth-chromium
Modified:
5 years, 9 months ago
Reviewers:
rafaelw
CC:
eseidel, esprehn, mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Don't hardcode the list of events types in fn This CL changes how events work in fn. Previously, event listeners were passed in as constructor arguments. Now Nodes hold an |events| object, which contains all the event registrations. When a Component renders, all its |events| are copied onto the Node it produces. When an Element syncs, it walks its |events| and adds them as event listeners on the underlying sky.Element. The net result of this change is increased flexibility in how events are registered. Now components don't need to enumerate all the possible events that they support. Instead, the parent component can listen for whatever events it likes. Also, I've cleaned up the association between DrawerAnimation and Drawer. Now the constructor for Drawer accepts an |animation| object and wires up its internal event handlers itself instead of requiring the constructor to do all the wiring. R=rafaelw@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/56a8123af9e87142f31c63a1051c2d7352c1a36a

Patch Set 1 #

Patch Set 2 : More careful event syncing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -211 lines) Patch
M sky/examples/fn/lib/component.dart View 1 chunk +2 lines, -0 lines 0 comments Download
A sky/examples/fn/lib/event.dart View 1 1 chunk +25 lines, -0 lines 0 comments Download
M sky/examples/fn/lib/fn.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sky/examples/fn/lib/node.dart View 1 9 chunks +46 lines, -127 lines 0 comments Download
M sky/examples/fn/widgets/button.dart View 1 chunk +1 line, -6 lines 0 comments Download
M sky/examples/fn/widgets/buttonbase.dart View 1 chunk +5 lines, -1 line 0 comments Download
M sky/examples/fn/widgets/checkbox.dart View 2 chunks +1 line, -5 lines 0 comments Download
M sky/examples/fn/widgets/drawer.dart View 3 chunks +23 lines, -36 lines 0 comments Download
M sky/examples/fn/widgets/fixedheightscrollable.dart View 2 chunks +5 lines, -5 lines 0 comments Download
M sky/examples/fn/widgets/icon.dart View 2 chunks +1 line, -4 lines 0 comments Download
M sky/examples/fn/widgets/material.dart View 1 chunk +3 lines, -4 lines 0 comments Download
M sky/examples/fn/widgets/menuitem.dart View 1 chunk +1 line, -8 lines 0 comments Download
M sky/examples/fn/widgets/radio.dart View 1 chunk +2 lines, -6 lines 0 comments Download
M sky/examples/stocks-fn/stocksapp.dart View 2 chunks +3 lines, -9 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
abarth-chromium
5 years, 9 months ago (2015-03-04 09:30:57 UTC) #1
abarth-chromium
I've made the event diffing logic fancier. PTAL.
5 years, 9 months ago (2015-03-05 02:45:13 UTC) #2
rafaelw
lgtm
5 years, 9 months ago (2015-03-05 15:27:32 UTC) #3
abarth-chromium
5 years, 9 months ago (2015-03-05 16:00:29 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
56a8123af9e87142f31c63a1051c2d7352c1a36a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698