2195 Commits

Author SHA1 Message Date
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
Viet-Trung Luu
bd499730b7 Delete interface_impl.h.
R=rudominer@chromium.org

Review URL: https://codereview.chromium.org/1219893005 .
2015-07-07 16:37:47 -07:00
Collin Jackson
509cdbf2c5 Update material design icons
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1223843014 .
2015-07-07 16:28:45 -07:00
Eric Seidel
766bbf5e33 Add big_red_button script so that others can deploy
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1214193007 .
2015-07-07 16:28:13 -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
c1ebc56e38 Fix demo_launcher location for realz
TBR=abarth@google.com

Review URL: https://codereview.chromium.org/1222313014 .
2015-07-07 16:22:52 -07:00
Eric Seidel
3c6cfb958e Update demo_launcher apk location in roll_versions.py
TBR=abarth@google.com

Review URL: https://codereview.chromium.org/1220393004 .
2015-07-07 16:20:27 -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
Ian Fischer
95e86b76c7 Attempt to stop sky_server before starting it to avoid confusion and the warning message.
R=abarth@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1222913006 .
2015-07-07 15:47:38 -07:00
Adam Barth
c9edc0acb3 Remove GC prolog and epilog
We don't need these anymore.

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

Review URL: https://codereview.chromium.org/1226773009 .
2015-07-07 15:41:13 -07:00
Collin Jackson
fe8c1e6b52 Tab bar should have white indicator if primary and accent color are the same
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1215313004 .
2015-07-07 15:35:19 -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
Viet-Trung Luu
d510c25a12 Include mojo/public/cpp/bindings/binding.h wherever mojo::Binding<> is used.
Currently, these places are picking it up via some include chain
involving interface_impl.h, which is bad since I'm going to delete that
file (since InterfaceImpl<> is deprecated and no longer used) -- I'll do
this separately.

R=rudominer@chromium.org

Review URL: https://codereview.chromium.org/1214633009 .
2015-07-07 13:57:02 -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
0ce1409322 Add .sdkext file to make Dart analyzer understand dart:sky
This file will be used by a future version of the Dart analyzer to understand
Dart code that uses the dart:sky package.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1214433006 .
2015-07-07 13:46:54 -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
Eric Seidel
63cefd8bc1 Use sky_shell instead of mojo_shell for testing.
This does way more than a single CL should do, sorry.
- Fixed a bunch of logging/error reporting during loads.
- Made it possible for --package-root to be absolute.
- Fixed (hypothetically) parts of iOS build to be clang-plugin-compliant.
- Made all tests pass in sky_shell
- Removed a bunch of layout_tests including windows support.

I'll remove all the mojo test harness stuff in a follow-up patch.

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

Review URL: https://codereview.chromium.org/1215953006.
2015-07-06 17:45:49 -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
749bd906db Set the default whitespace mode to pre-wrap
This CL makes it easier to insert line breaks into text runs.

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

Review URL: https://codereview.chromium.org/1221913003.
2015-07-06 15:44:54 -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
2fdb5b3d9c Scrollable TabBar Version 1 - support for flinging
As far as I can tell, Material TabBars are not supposed
to overscroll/bounce. The new TabBarScrollBehavior
class supports fling, but it doesn't overscroll/bounce.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1215713009.
2015-07-06 13:52:37 -07:00
Matt Perry
ba2fb3cf31 Fix regressions with Drawer animations that I introduced.
- The drawer mask was too dark.
- The drawer didn't track the user's finger when dragging.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1220973005.
2015-07-06 16:46:02 -04:00
John McCutchan
edbb38a586 Add mojo_services pub dependency from sky sdk
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1224623007.
2015-07-06 13:31:23 -07:00
Hixie
05aae0ce69 Trivial parts of https://codereview.chromium.org/1218183009/ so that that patch isn't confused by variable renames.
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1222393002.
2015-07-06 13:25:13 -07:00
Hixie
a2d9ff60b9 Make the menu items in the drawer change colour when tapped, per Material spec.
This is done by the following steps:

- Make Inherited classes notify their descendants when their state
  changes.

- Make Components track which Inherited classes they looked at.

- Make Components handle being notified of state changes by rebuilding
  if the changed ancestor is of a type we've looked at.

- Refactor setState() and scheduleBuild().

- Make the "buildDirtyComponents" phase support incrementally building
  more components as each one finds it needs to update itself.

The way this works is that when the menu item updates its color, it
does so by changing a DefaultTextStyle (Inherited) node in its tree.
That node then notifies its ancestors, which include in particular the
Text component, which uses DefaultTextStyle. The notification is
received, and, even though we're already in the rebuild phase, the
Text queues itself up to be rebuilt as well. Since we now support
adding people to the rebuild phase while it's active, it gets rebuilt
as well, and all is well.

This CL depends on the fix in https://codereview.chromium.org/1218183009

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1222823004.
2015-07-06 13:17:23 -07:00
Adam Barth
3dd427d6f5 Update test expectations after view padding change
We no longer have view padding during testing so these values change a bit.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1225703003.
2015-07-06 12:40:19 -07:00
Adam Barth
8031ab6bd7 Add padding values to View.idl
Rather than hardcoding the size and presence of the notification area in Dart,
we now expose padding values on the view. These values are set to non-zero
values when there are UI elements that overlap the view. We currently respect
only the top padding, but this CL paves the way to respect padding in other
directions.

We still hardcode the size of the notification area in Java. A future CL will
retrieve this value from the Android framework.

Fixes #257

R=ianh@google.com

Review URL: https://codereview.chromium.org/1220353002.
2015-07-06 10:56:02 -07:00
Adam Barth
13dc6e2172 left + right mouse button causes dart exception
We should remove the state from our map only if the last button is going up.

Fixes #260

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1215743003.
2015-07-06 10:44:11 -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
Benjamin Lerman
7600714a6f Do not use android specific API in mojo/java.
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1217573005.
2015-07-06 14:56:14 +02:00