106 Commits

Author SHA1 Message Date
Adam Barth
273e282554 Make it possible to detect PopupMenuItem presses
R=ianh@google.com

Review URL: https://codereview.chromium.org/1240573007 .
2015-07-14 10:58:35 -07:00
Hixie
29d2362963 We can't use block when we have constrained space anymore. Use Flex instead.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1230053005 .
2015-07-14 10:52:49 -07:00
Adam Barth
fdeb7b670a Remove PopupMenuController
Rather than using a controller, the PopupMenu now takes input via its
constructor. I'm not 100% happy with PopupMenuStatusChangedCallback, but we can
continue to iterate.

Also, fix the positioning of the menu to be correct.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1234063003 .
2015-07-14 10:44:44 -07:00
Adam Barth
692095b56c Rename watchPerformance to watch
Now that we don't have the old animation system, we can use the shorter name
again. Also, move state initialization code into initState().

R=ianh@google.com

Review URL: https://codereview.chromium.org/1231103005 .
2015-07-13 17:17:48 -07:00
Adam Barth
6501df756e Remove unused imports
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1238603002 .
2015-07-13 16:57:16 -07:00
Adam Barth
61aa51fa6c Rename MenuItem to DrawerItem
.. and MenuDivider to DrawerDivider. These widgets are specific to Drawer.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1233983002 .
2015-07-13 16:55:59 -07:00
Adam Barth
ef1a3ec876 Improve drawer menu items
- Use a separate selected and highlight color (now part of ThemeData)
 - Colorize the icon of the selected menu item

R=ianh@google.com

Review URL: https://codereview.chromium.org/1241483002 .
2015-07-13 16:50:05 -07:00
Eric Seidel
a36e246cb4 Roll versions and add a new release_notes directory.
TBR=johhmccutchan@google.com

Review URL: https://codereview.chromium.org/1231413004 .
2015-07-13 14:52:15 -07:00
Adam Barth
1a3adcafb7 Remove onFrame callback
Clients can just register persistent frame callbacks if they want to do some
processing every frame.  Also, add some more trace events.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1237623004 .
2015-07-13 13:43:27 -07:00
Hans Muller
1f68f3851b Dismissable component
Lifted the code from the card_collection example.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1237713002 .
2015-07-13 12:43:56 -07:00
Eric Seidel
eaf7228fff Start an AddressBook example (to test text fields)
Also fixed a bug in tool_bar where not supplying a
center caused right not to be on the right.

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

Review URL: https://codereview.chromium.org/1234963002 .
2015-07-13 11:29:51 -07:00
Adam Barth
cf9d24b75d Fix some info-level warnings from Dart analyzer
TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1226103013 .
2015-07-11 11:23:48 -07:00
Hans Muller
63318886a0 Move VariableHeightScrollable to sdk/lib/widgets
Added a callback to BlockViewport so that the scrollable can
stay in sync with the viewport's contents.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1227823012 .
2015-07-10 17:13:26 -07:00
Hixie
442c55b4c4 Make the drawer, popup menus, dialogs, and settings page scrollable.
Also, fixes the stocks list to work properly including hit testing at
the bottom of the screen.

New classes:

RenderViewport: a class that supports positioning a child inside
itself and offsetting it.

Viewport: a RenderObjectWrapper that wraps RenderViewport.

ScrollableViewport: a Component that hooks Viewport up to some
scrolling behaviour.

Code changes:

RenderBlock now only works when it has an unbounded height constraint.
I removed the clipping in there since it's no longer needed.

I made FixedHeightScrollable use Viewport instead of hand-rolling its
clipping with Transform and Clip. This is what fixes the stocks list
hit testing at the bottom of the screen.

I made anywhere that used to use Block now use ScrollableViewport.

RenderFlex now takes a list of children.

Justifications for test changes:

tests/examples/stocks: changing FixedHeightScrollable to use a
RenderViewport instead of a RenderClipRect/RenderTransform combination
removes the use of an actual transform.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1223153004 .
2015-07-10 16:54:19 -07:00
Hixie
56ef46312f Remove "RenderBlock" class from examples that use it without giving it unrestricted height.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1232063006 .
2015-07-10 16:31:27 -07:00
Collin Jackson
09a82d4935 Add new initState method to widget, rename animated_container to animation_builder and refactor it. This fixes the background color of the settings page.
R=abarth@chromium.org, abarth, mpcomplete

Review URL: https://codereview.chromium.org/1233703003 .
2015-07-10 16:27:17 -07:00
Adam Barth
688a084e86 Switch scroll physics over to using newton
The scroll physics was the last client of the old frame generator. With this
change, we've fully switched over to the new animation system.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1226133004 .
2015-07-10 15:48:03 -07:00
Eric Seidel
4ccdbfd35a Fix more Analyzer warnings in Atom
R=abarth@chromium.org, ianh@google.com

Review URL: https://codereview.chromium.org/1236683003 .
2015-07-10 15:20:59 -07:00
Collin Jackson
fb86cfb561 Make back button on stocks app search bar the accent color. Also, apply text theme to the the entire toolbar rather than just the center.
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1235693002 .
2015-07-10 14:34:52 -07:00
Hixie
e672c1ddd0 Remove redundant 'flex' prefixes on enum values.
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1232063004 .
2015-07-10 13:57:46 -07:00
Eric Seidel
b4aa27685c Fix Asteroids game to paint again and give it an icon.
I also fixed dependencies on Activiy and Keyboard etc
which were incorrectly included only in SkyDemo despite
being depended on by the Sky Framework.

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

Review URL: https://codereview.chromium.org/1225103009 .
2015-07-10 13:42:03 -07:00
Viktor Lidholt
f9d2c42f71 Improved action animations in sprites
Actions can only be added once
Makes sure instant actions are run on Repeat and RepeatForever
Adds ActionGroup which runs actions in parallell
Adds support for animation curves and easing
Makes it possible to animate sizes and rects

Fixes issue with SpriteBox not being updated

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1235653004 .
2015-07-10 12:26:41 -07:00
Collin Jackson
f850f23f23 Support for icon theming
R=ianh@google.com, hixie

Review URL: https://codereview.chromium.org/1235443002 .
2015-07-10 11:14:17 -07:00
Adam Barth
e70c7e05a8 Fix bugs found by Dart analyzer
Now that we have the analyzer working locally, it shows us lots of bugs. This
CL fixes the bugs.

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

Review URL: https://codereview.chromium.org/1233673003 .
2015-07-10 10:21:35 -07:00
Adam Barth
8364a1d6fa Make Sky example game run offline
R=viktorl@google.com, eseidel@google.com

Review URL: https://codereview.chromium.org/1227373004 .
2015-07-10 09:49:09 -07:00
Adam Barth
9b6192bc34 Remove pubspec.yamls for sky/sdk/example
As long as these examples are part of sky/sdk, they don't need pubspec.yamls
because they inherit them from sky/sdk/pubspec.yaml. Eventually we'll want to
move these examples to their own repo, but we're not ready for that yet.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1233453005 .
2015-07-10 09:48:32 -07:00
Hans Muller
a551de395b Card "swipe-away" dismiss version 3: Uses BlockViewport
Scrollable version of the existing demo.

Includes Ian's BlockViewport fixes.

Still TODO: track the layout and update the ScrollBehavior's
contentsHeight as needed. Stop when we've reached the need.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1227963003 .
2015-07-10 08:46:17 -07:00
Adam Barth
f4b51a75a5 Fix analyzer warning
TBR=mpcomplete@google.com

Review URL: https://codereview.chromium.org/1228273002 .
2015-07-09 20:29:16 -07:00
Matt Perry
4c0c3a1aec Use AnimatedContainer for card_collection.dart.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231933006 .
2015-07-09 19:31:35 -04:00
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