2276 Commits

Author SHA1 Message Date
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
Hixie
93a94f315b Put back the setter being used by the test harness...
TBR=abarth

Review URL: https://codereview.chromium.org/1232483004 .
2015-07-10 15:33:51 -07:00
Hixie
a5f5666ca4 Support getting baseline from paint as well as layout.
To make sure this doesn't break the markNeedsLayout() logic, I added members to track who is currently painting.
Also, some minor rearrangements of the code in object.dart about painting.
Also, make exceptions in debug mode rethrow so we get a stack trace.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1235713002 .
2015-07-10 15:25:55 -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
Hixie
2904bac1a6 Support for FlexAlignItems.stretch.
R=jackson@google.com

Review URL: https://codereview.chromium.org/1229353002 .
2015-07-10 14:35:09 -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
22e9c9c618 Make RenderFlex support taking children in the constructor.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231203002 .
2015-07-10 14:29:33 -07:00
Collin Jackson
a3de4bd879 Make performance and position private since they don’t sync
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1230273004 .
2015-07-10 14:12:17 -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
Hixie
87f477eb93 Minor style fixes to TaskDescription.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1233513003 .
2015-07-10 13:39:33 -07:00
Adam Barth
bb57df4092 Generate Sky's _sdkext file using the build system
This CL removes sky/sdk/lib/_sdkext from the source tree so that we can have a
tweaked version during development.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1233493008 .
2015-07-10 13:04:47 -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
Adam Barth
9c5a4433a7 Fix typos and error handling in setup_dart_analyzer
TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1235673002 .
2015-07-10 12:12:10 -07:00
Adam Barth
740b12a9d1 Add a script to setup source tree for Dart analyzer
Once the new Dart analyzer server rolls in, this script will set up your source
tree to integrate with it properly.

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

Review URL: https://codereview.chromium.org/1227913007 .
2015-07-10 12:02:35 -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
Eric Seidel
6f0c2d0983 Teach SkyShell.apk to stop posting frames when not visible
This listens to both surface destruction as well as activity
pause/unpause.

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

Review URL: https://codereview.chromium.org/1230073002 .
2015-07-10 10:26:54 -07:00
Adam Barth
896c97b90c Delete AnimationValue
Please use AnimationType and AnimationPerformance instead.

R=mpcomplete@chromium.org

Review URL: https://codereview.chromium.org/1232473003 .
2015-07-10 10:25:50 -07:00
Adam Barth
b0c4a8c15e Port PopupMenu to the new animation system
This CL is the first step in the port. The second step will be to decompose the
animation in to a number of variables, one for the menu itself and one for each
of the menu items.

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

Review URL: https://codereview.chromium.org/1228233004 .
2015-07-10 10:23:51 -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
Adam Barth
6cd88affcb Add package:newton as a dependency of package:sky
Also, update the dependency versions for other packages to be more realistic.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1233663002 .
2015-07-10 09:25:49 -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
Matt Perry
2a127e7fba Fix crash when toggling "Everything is awesome" in Stock's Settings.
Material.backgroundColor can be null.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1225153003 .
2015-07-09 19:28:44 -04:00
Collin Jackson
d9f4561053 rename sky_apk to sky_dev
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1232483002 .
2015-07-09 16:26:47 -07:00
Adam Barth
da3ac5c916 Port Toggleable to the new animation system
R=mpcomplete@chromium.org, mpcomplete@google.com

Review URL: https://codereview.chromium.org/1226143010 .
2015-07-09 15:47:45 -07: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
Adam Barth
f830dffc55 Update ink splash to new animation system
R=mpcomplete@chromium.org, mpcomplete@google.com

Review URL: https://codereview.chromium.org/1231893006 .
2015-07-09 15:26:37 -07:00
Adam Barth
024a5d3a32 Ban dart:mirrors in Sky
We don't use dart:mirrors and we don't want to start because it prevents some
sorts of static analysis.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1233463002 .
2015-07-09 14:07:51 -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
fdb030a242 demo_launcher/lib/main.dart does not have bottom-overscroll
Rather than trying to clamp the scroll offset during scrolling, we detect when
we might have exceeded our maxScrollOffset and settle the scroll offset back in
bounds.

Fixes #287

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

Review URL: https://codereview.chromium.org/1226373003 .
2015-07-09 13:43:30 -07:00
Hixie
61c2a1695b Make sure to sync the widgets even when we don't do a relayout.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1225093007 .
2015-07-09 13:06:36 -07:00
Matt Perry
c73f65312b Fix test failures from AnimatedContainer patch.
- Needed to move properties into AnimatedContainer to create a full BoxDecoration.
- Updated test expectations because backgroundColor animates now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1224223004 .
2015-07-09 15:26:39 -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
Adam Barth
92132213f1 Rebaseline tests after f66984e72a2b5db0f7c4db4f05829118defe6640
TBR=mpcomplete@google.com

Review URL: https://codereview.chromium.org/1230893002 .
2015-07-09 12:11:16 -07:00
Matt Perry
301194ed41 AnimatedContainer: generalized Container widget that handles animating values
when they change via syncFields.

Very early so far. Only supports animating shadow, position, and backgroundColor.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1223073002 .
2015-07-09 14:12:27 -04:00
Chinmay Garde
961d0c428e [Sky] Fix iOS build breaks
R=abarth@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1229093002 .
2015-07-09 11:10:43 -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
05668e5ee2 Implement hit testing and baseline alignment for RenderBlockViewport.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231943002 .
2015-07-09 10:55:33 -07:00
Chinmay Garde
319c94e041 Add generated files to Sky .gitignore when working on the same using Dart IDEs
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1231913002 .
2015-07-09 10:24:10 -07:00
Adam Barth
566110a8f8 Stop leaking temp directories in SkyShell
At startup, we make a list of all the temp directories that already exist and
then nuke them on a background thread after a five second delay. The five
second delay isn't particularly satisfying, but I think it's wortwhile to get
this work off the critical path of startup.

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

Review URL: https://codereview.chromium.org/1228083003 .
2015-07-09 09:57:41 -07:00
Hixie
09ee39f744 BlockViewport didn't implement the intrinsic dimension functions correctly.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1230833002 .
2015-07-09 09:57:03 -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