77 Commits

Author SHA1 Message Date
Chinmay Garde
b648abc8d9 [AutoLayout] Address further concerns raised in https://codereview.chromium.org/1230583003
R=ianh@google.com

Review URL: https://codereview.chromium.org/1230033002 .
2015-07-09 15:29:36 -07:00
Matt Perry
0639922ae5 Animate the snack bar in the stocks app.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1233433002 .
2015-07-09 16:51:36 -04:00
Adam Barth
86cbaead14 Break dependency of AnimationPerformance on AnimatedValue
This CL decouples the new animation system (based on AnimationPerformance and
AnimatedVariable) from the old animation system (based on AnimatedValue). It
introduces a new Ticker and Timeline class to drive AnimationPerformance and
makes it possible for AnimatedComponent to watch performances directly.

R=eseidel@chromium.org, mpcomplete@chromium.org, mpcomplete@google.com

Review URL: https://codereview.chromium.org/1226263003 .
2015-07-09 12:16:55 -07:00
Chinmay Garde
321131b32a Update cassowary dependency to 0.1.7
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231903003 .
2015-07-09 11:10:08 -07:00
Hixie
2a8077f15d Introduce BlockViewport. This class lets you build Widgets dynamically during layout.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1222913013 .
2015-07-09 09:20:53 -07:00
Adam Barth
a40fd86bb3 Build skyx packages by default
Now that we have all the Dart packages we need in //third_party, we can build
skyx bundles by default.

As part of this change, I've made it possible to build skyx bundles on Linux
and I've made the gn target names of the mojoms in //sky/services consistent
with each other and with //mojo/services/public.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1227973002 .
2015-07-09 08:39:45 -07:00
Hans Muller
c61f5461f7 Card "swipe-away" dismiss version 2
Some minor cleanup. Also created a small mess to work around
https://github.com/domokit/mojo/issues/312

- Track event.dx sum; don't listen to the card container
- Support dismissing to the left (too)
- Slow the dismiss "fling" animation down a little.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231693003 .
2015-07-09 08:13:56 -07:00
John McCutchan
0fa1e9fd45 Bump versions to v17
BUG=

Review URL: https://codereview.chromium.org/1231803003 .
2015-07-09 07:08:27 -07:00
Chinmay Garde
f5bb356756 Integrate the linear constraint solver into Sky as a RenderBox subclass.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1230583003 .
2015-07-08 16:11:30 -07:00
Adam Barth
1bc13e1c63 Teach sky_shell.exe to run from a snapshot
Also, make stocks robust to failing network connections.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1229743002 .
2015-07-08 15:50:06 -07:00
Ian Fischer
b286f72509 Make rendering use PaintingNodes for increased efficiency.
WIP -- need to update some tests at the least.

R=abarth@chromium.org, abarth@google.com, ianh@google.com

Review URL: https://codereview.chromium.org/1216833003 .
2015-07-08 15:08:20 -07:00
John McCutchan
c247eeea92 Roll to v16 for republishing with .sdkext support
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1231653002 .
2015-07-08 14:57:05 -07:00
Hans Muller
ca0a1e17bf An example prototype of adding support for
Material-style card dismissal. Many things remain to be done:

- Track event.dx sum; don't listen to the card container
- Make this a feature of Card
- Support dismissing to the left (too)
- Animate the layout change caused by dismissing the card
- Deal with many cards animating away at the same time
- Integrate with TBD VariableHeightScrollable

This version just exists to collect a little feedback,
including about the use of AnimationPerformance

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231603003 .
2015-07-08 14:31:26 -07:00
Eric Seidel
2e8e2d0b72 Make RenderBlock painting match its hittesting
I added a clip in RenderBlock to make the painted pixels
match the hittesting logic.  This at least makes obvious
all the numerous hittesting bugs in our system. :)

I also moved demo_launcher to ScrollableList awesomeness.

R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1223083002 .
2015-07-08 13:47:39 -07:00
Adam Barth
427f162519 mv //sky/services/intents //sky/services/activity
This interface is growing to expose many activity-related functions, more than
just intents.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1223053002 .
2015-07-08 13:37:22 -07:00
Eric Seidel
37fba23b21 Roll to v15 for republishing with skyx enabled
TBR=abarth@google.com

Review URL: https://codereview.chromium.org/1222193008 .
2015-07-08 10:41:33 -07:00
Benjamin Lerman
340db897c2 Remove unused variable.
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1223003002 .
2015-07-08 15:00:38 +02:00
Collin Jackson
ab2722f92d Initial fitness app
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1213603006 .
2015-07-07 17:14:45 -07:00
Collin Jackson
d331a98c22 Support for selected menu items
R=ianh@google.com

Review URL: https://codereview.chromium.org/1226583005 .
2015-07-07 16:44:29 -07:00
Eric Seidel
00adca7710 Roll versions in preparation for deploying demos/packages
TBR=abarth@google.com

Review URL: https://codereview.chromium.org/1216053015 .
2015-07-07 16:23:57 -07:00
Eric Seidel
60b42fdb8f Make examples which do not yet support skyx still work in skyx mode.
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1227663003 .
2015-07-07 16:18:15 -07:00
Eric Seidel
589290add1 Deploy TaskDescription to the rest of our demos
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1218293017 .
2015-07-07 14:31:52 -07:00
Adam Barth
3f3b07ac50 Teach Stocks how to load data when run from a package
When run with a root bundle, the Stocks app now fetches its data from the
Internet.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1208053008 .
2015-07-07 14:15:34 -07:00
Eric Seidel
854745316a Make the TaskDescription background color match the ToolBar on Android
This isn't quite perfect since we seem to do a second layout as the
activity switcher is brought up which is shifting down our
toolbar and making it bleed slightly below the Activity Switcher's
Task description bar.  But at least we're the right color now.

R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1209423008 .
2015-07-07 13:56:06 -07:00
Adam Barth
72cfc2a052 SkyDemo should launch demos in their own windows
R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1214633008 .
2015-07-07 13:35:26 -07:00
Collin Jackson
515c055c8e Back button should kill interactive flex app
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1214073014.
2015-07-07 12:57:52 -07:00
Collin Jackson
01e776e317 Fix back button behavior when returning from settings screen
R=abarth@chromium.org, hixie

Review URL: https://codereview.chromium.org/1209423006.
2015-07-07 10:53:24 -07:00
Adam Barth
213ef6a43f Make interactive_flex and mine_digger work offline
From SkyDemo.apk.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1221143003 .
2015-07-07 10:43:23 -07:00
Adam Barth
9206d80ff9 Factor ScrollableList out of StockList
A ScrollableList seems like a generically useful widget.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1223863003 .
2015-07-07 10:02:56 -07:00
Adam Barth
fa7ec92c67 Make it harder to forget itemCount for FixedHeightScrollable
Previously, if a subclass of FixedHeightScrollable didn't set itemCount,
everything would silently work except that you wouldn't actully be able to
scroll. This CL makes it harder to forget to provide the itemCount by making it
an abstract getter. Now the analyzer will flag it as missing in subclasses and
we'll throw an exception at runtime if you forget it.

R=ianh@google.com, tonyg@google.com

Review URL: https://codereview.chromium.org/1219933004 .
2015-07-07 08:44:29 -07:00
Viktor Lidholt
f156f04930 Adds better explosions, shield, and game over
Renames actions
Fixes smaller bug in particle systems

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1223543004.
2015-07-07 06:42:43 -07:00
Viktor Lidholt
bb8e267b82 Adds ActionSequence to sprites and improved explosions in game demo.
Adds ActionRemoveFromParent
Adds ActionCallFunction

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1224773003.
2015-07-07 00:39:55 -07:00
Adam Barth
61a12040ef Attempt to fix Android gn
TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1218283003.
2015-07-06 18:28:58 -07:00
Collin Jackson
b95ff0270b improve divider appearance in dark mode
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1212343011.
2015-07-06 18:05:16 -07:00
Collin Jackson
ed92b54f18 Back button should be able to close apps (issue 155)
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1213623008.
2015-07-06 18:01:04 -07:00
Adam Barth
8dd60a3c96 SkyDemo.apk should be able to launch Stocks offline
We now put stocks.skyx into the APK so that we can run it offline.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1216673011.
2015-07-06 17:53:41 -07:00
Hixie
3164520701 Fix spinning_mixed.dart, and resulting yak shave.
The initial fix was updating Image to NetworkImage, which is the new
name for the Widget that takes a URL to an image.

However, this exposed an underlying bug: slots given to
MultiChildRenderObjectWrapper children were not getting updated in the
initial build. Initially, we don't have a next sibling for any of the
children's roots, since we haven't yet synced anyone after the one
we're syncing. So we pass null. However, as soon as we build the next
one, the previous one now has an out of date slot: null means
"append", but it needs to be "insert before the newly inserted root of
the next child". So now we update the slot after each insertion.

This returned the spinning_mixed demo to its original state, but that
state was buggy: the image would expand to fit the button and push the
text out of the button. To resolve that, this patch changes how
RenderImage sizes an image that has no desired dimensions but has some
constraints that make it impossible to show the image at full size:
now, we try to maintain the aspect ratio and honour the constraints
all at the same time.

Also, if the constraints are tight we skip all that logic, because
it'd be a waste of time.

To help with the slot issue above, I needed to see the widget tree and
the render tree and compare them (to see where the nodes were getting
out of order), so I also extended Widget.toString() to dump a deep
tree of the widget hierarchy.

Also, while debugging all this I noticed we sometimes walk the tree
into nodes that are null, which causes crashes. So to avoid that I
added null-checks to certain walkChildren() functions.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1212943007.
2015-07-06 17:31:22 -07:00
Collin Jackson
4c353a6511 Refactor stateful parts of Component into StatefulComponent
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1217093005.
2015-07-06 17:09:25 -07:00
Adam Barth
6f19816eaf SkyDemo.apk should show thumbmails when offline
We now get the thumbnails from the root bundle when offline and otherwise fall
back to the network.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1212343009.
2015-07-06 16:32:22 -07:00
Adam Barth
b69a2e761b Make SkyDemo.apk start offline
Offline support isn't complete, but after this CL, SkyDemo.apk is able to start
and show some UI offline.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1225883002.
2015-07-06 16:17:04 -07:00
Collin Jackson
07d3108e86 Use red as floating action button color rather than accent color
R=ianh@google.com

Review URL: https://codereview.chromium.org/1222243007.
2015-07-06 16:04:42 -07:00
Adam Barth
d94e1d6255 Move home.dart into example/demo_launcher
This CL makes home.dart less of a special snowflake and instead makes it a peer
to the other Sky examples. As a result, we can add a sky.yaml file and embed
the thumbnail assets it needs into demo_launcher.skyx.

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1215703010.
2015-07-06 14:49:03 -07:00
Hixie
00dd5d3e99 When syncing a child, we have to update the parent in all cases.
This:

- Adds asserts all over the place to make sure things are working
  right with respect to the parent pointer.

- Fixes the bugs those asserts uncovered. It turns out we were failing
  to update the parent pointer in a couple of cases: when the child
  hadn't changed (but the parent had), and when the node was replaced.

- Remove the operator[] nonsense in scaffold.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1218183009.
2015-07-06 14:16:17 -07:00
Hans Muller
c06fc9580a Scrollable TabBar Version 0
TODO:
- Make fling-scrolling work
- Tune scrolling performance
- When a tab is selected, snap it to the center if possible

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1221673006.
2015-07-06 10:23:31 -07:00
Adam Barth
a090303909 Rename scheduleFrame/setBeginFrameCallback
These are now scheduleFrame/setFrameCallback. Also, update schduler.dart to not
poke at sky.window, which is now always null.

Fixes #178

R=ianh@google.com

Review URL: https://codereview.chromium.org/1214943005.
2015-07-06 09:56:56 -07:00
Collin Jackson
a6f809b3d6 Initial implementation of SnackBar
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1216613004.
2015-07-06 08:40:35 -07:00
Collin Jackson
88b6042846 Refactoring to support dark theme better
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1218153005.
2015-07-06 08:05:29 -07:00
Adam Barth
5d3b218a5a Fix interactive_flex demo
There were two problems:

1) We didn't update the demo's use of RenderImage when we switched RenderImage
   to take a sky.Image rather than a URL.
2) Scheduling a layout no longer ensured a visual update, which meant we'd
   never actually flushLayout unless something else ensured a visual update.

TBR=jackson@google.com

Review URL: https://codereview.chromium.org/1221273002.
2015-07-03 21:34:59 -07:00
Adam Barth
7de453e634 Add skyx packages for all the Sky demos (except game)
This CL factors the skyx build logic out of sky/apk/rules.gni so that we can
build skyx bundles without building entire APKs. This change makes it possible
to build skyx bundles for all the examples (except game).

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1222673003.
2015-07-02 17:07:44 -07:00
Adam Barth
2e477f067e Add a flag for building skyx packages
This CL adds a build-time flag for building skyx packages, which make our
example Sky applications work offline. We can't enable this flag by default yet
because our build bots lack a few Dart packages, but landing this flag will let
folks experiment with this feature locally.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1221203002.
2015-07-02 16:41:35 -07:00