This patch changes the timing of the unmount call until after the component is removed (and marked as such) and allows setState to be called after this point. If this happens, setState will still invoke the closer to do any neccesary cleanup, but doesn't schedule the component for render
R=eseidel@chromium.org, eseidel
BUG=
Review URL: https://codereview.chromium.org/985853002
To test:
sky/tools/shelldb analyze sky/examples/stocks-fn/stocksapp.dart
It prints 600+ warnings about the "native" keyword, and after
this change only a couple warnings about missing library names
which I don't fully understand.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/987613002
It's awkward to work on fn.dart in the examples directory so this CL moves it
to /sky/framework. Also, I've merged the whole library into one file instead of
using the |part| mechanism. The whole thing isn't that big.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/987463002
- Removed out-of-date README.md
- Moved fling-curve into the animation directory because it's part of the
animation behavior of the system.
- Moved view-configuration into the theme directory because it's a collection
of constants similar in flavor to the colors and the shadows. Eventually
we'll want to make the theme configurable and have these all together will
hopefully make that easier.
- Moved dom-serializer into tests/resources because it is used only by tests.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/980423002
Previously, the two versions of this sample app had separate copies of the
stock data. This CL moves the common data to the common data directory so that
they can share. Also, I've switched the data files to be |dart| files rather
than |sky| files to make them easier to use from fn examples.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/980953002
This CL removes a bunch of examples that don't actually work in the current
engine. I've also renamed example-element to custom-element and
example-scrollable to scrolling because the word "example" in the name is
redundant with the name of the directory.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/980323003
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
Review URL: https://codereview.chromium.org/975863003
This CL adds license blocks and cleans up a number of Dart idioms in fn.
Specifically, I've marked several fields as |final| and used Map#putIfAbsent in
some appropriate places.
R=rafaelw@chromium.org
Review URL: https://codereview.chromium.org/973613004
If there is jank, we might not get a frame time that's just after the last
frame, which means we'll stop generating animation frames before hitting 1.0
exactly.
In this CL, we introduce state to takeWhile to cancel the stream after emitting the
1.0.
R=rafaelw@chromium.org
Review URL: https://codereview.chromium.org/975153002
This is just a proof of concept. If we like this direction, it will move out of the examples directory (likely re-written) and be committed in smaller pieces with unit tests and formal reviews.
TBR=abarth
BUG=
Review URL: https://codereview.chromium.org/971183002
I removed the green background and added display
of percent change (which is random for now).
I also display a random assortment of stocks every time
instead of always the top 100.
R=rafaelw@chromium.org
Review URL: https://codereview.chromium.org/950073002
This CL updates sky-box, sky-button, sky-checkbox, sky-input, and sky-radio to
work in Dart. We don't have a data binding system yet, so there's a bit more
plumbing in the code.
This CL adds support for sky-element@attributes, which lets you specify which
attributes your element supports. We use this information to synthesize getters
and setters for those attributes and to dispatch to mumbleChanged methods when
the attributes change.
I've also wrapped the widgets demo itself in a sky-scrollable so the whole
thing scrolls.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/946813005