1361 Commits

Author SHA1 Message Date
Hans Muller
1e18c38380 Uncomment the Dismissable unit test that checks for a #1068 fix 2015-09-11 10:44:38 -07:00
Hixie
5125bd5d0b Change how we decide if two nodes can sync.
If it's a StatefulComponent, then it's ok to reuse it so long as it
hasn't been initialised.

If it's a regular Component or a TagNode, then it's always ok to reuse.

If it's a RenderObjectWrapper, then it's ok to reuse so long as it
doesn't have a renderObject.

To put it another way, this changes how we prevent the following
nonsensical situations from arising:

 - Sync two stateful StatefulComponents together
 - Sync two RenderObjectWrappers with RenderObjects together

When either of those cases happen, we just drop the old one on the
ground and use the new one unchanged.
2015-09-11 10:26:36 -07:00
Hans Muller
639f9d9b06 Finish converting Dismissable from Listener to GestureDetector
Dismissable now only depends on GestureDetector.

Added a unit test that verifies that issue #1068 has been fixed. It's commented out for now.

Cleaned up VelocityTracker.cc et al a little.
2015-09-11 09:37:55 -07:00
Adam Barth
63101e49bc Fold fling gesture into onDragEnd
That way the fling engages in the same direction as the scroll. For example, if
you have a horizontal scroll nested inside a vertical scroll, the fling will
take place in the same direction as the scroll.
2015-09-10 12:38:11 -07:00
Adam Barth
d76f5652e6 Merge pull request #1120 from abarth/fewer_handlers
Don't register gesture detectors when Scrollable can't scroll
2015-09-10 12:10:09 -07:00
Adam Barth
707d8606c8 Don't register gesture detectors when Scrollable can't scroll
Previously, if you used a number of nested Blocks, they'd each try to register
drag gesture detectors even though they can't actually scroll. This CL teaches
Scrollable to watch for drag gestures only when it can actually scroll.
2015-09-10 12:03:35 -07:00
Matt Perry
dfab52c706 Compare versions before updating an app bundle.
The version and update URL are stored in the app's manifest (sky.yaml).
2015-09-10 14:17:58 -04:00
Scott Graham
c1262abc03 Merge pull request #1108 from sgraham/android-home
Look in $ANDROID_HOME/platform-tools/adb too
2015-09-10 11:00:51 -07:00
Scott Graham
f2075ebb2e Look in ANDROID_HOME/platform-tools/adb for adb too 2015-09-10 09:55:21 -07:00
Adam Barth
87c75d6e76 Remove redundant enum declarations from text_style.dart
These are now declared in dart:sky as part of ParagraphBuilder.
2015-09-10 08:03:48 -07:00
Adam Barth
a6aa0265bd Rev pub package 2015-09-09 17:24:06 -07:00
Adam Barth
3d80c2b61f Merge pull request #1115 from abarth/no_more_disqualify
Remove "disqualified" concept
2015-09-09 17:18:29 -07:00
Adam Barth
2234294dd4 Remove "disqualified" concept
Allows a non-initialised stateful component to be used as a source of
settings more than once. Instead of asserting that it was only being
used once, we assert that once you are stateful you don't get used as a
bag of settings, which is the real thing we were trying to avoid.

A lot of code ends up using StatefulComponents as a source multiple
times in a row, and before this would fail.

Patch by Ian Hickson
2015-09-09 17:17:03 -07:00
Adam Barth
829645c151 Merge pull request #1107 from sgraham/fiddle-mine-digger
mine_digger: Fix not being able to de-flag on Android
2015-09-09 17:10:04 -07:00
Hans Muller
67410a5add Initial support for the fling gesture detector
Added FlingGestureRecognizer and exposed it in the GestureDetector class. FlingGestureRecognizer is based on the Android/Chromium VelocityTracker class which computes a velocity vector for for a list of X,Y,Time tuples.

The Scrollable classes now use the FlingGestureRecognizer. Dismissable and Drawer still need to be updated
2015-09-09 16:49:31 -07:00
Scott Graham
4a7718d344 mine_digger: Fix not being able to de-flag on Android 2015-09-09 14:53:35 -07:00
Adam Barth
c5edfa19d6 Rev pub package 2015-09-09 14:50:27 -07:00
Ian Fischer
c8278303af Merge pull request #1106 from iansf/sky_tool_log_tag
Only log the tag and the message from Android, so logs look like “ANDROID: I/sky     : Hello from Sky!”.
2015-09-09 14:25:20 -07:00
Ian Fischer
c5735d3e01 Only log the tag and the message from Android, so logs look like “ANDROID: I/sky : Hello from Sky!”. 2015-09-09 14:22:48 -07:00
Adam Barth
b4ea078f6b Merge pull request #1102 from abarth/mv_getting_started
Move Getting Started and Tutorial to GitHub pages
2015-09-09 14:12:51 -07:00
Adam Barth
b136dedac1 Move Getting Started and Tutorial to GitHub pages
Along with some other docs.
2015-09-09 13:52:03 -07:00
Ian Fischer
ab33604b84 Change warning to info when there are no running simulators. 2015-09-09 13:44:13 -07:00
Adam Barth
0f4d376543 Add dartdoc to RenderBlock and RenderFlex 2015-09-09 10:34:32 -07:00
Misha Dynin
161789dbdf Merge pull request #1089 from mishadynin/input_value
Allow setting of initial value in the Input component.
2015-09-08 17:46:19 -07:00
Misha Dynin
a47520a157 Allow setting of initial value in the Input component. 2015-09-08 17:35:08 -07:00
Ian Fischer
caa7af00fe Make it possible to start a sky app in an arbitrary relative path, rather than requiring the dart file to be in the current directory. 2015-09-08 17:13:41 -07:00
Hixie
9fcdce393a Fix signature of toStringName()
...which I accidentally changed in a previous commit.
2015-09-08 14:06:18 -07:00
Ian Hickson
832da04002 Merge pull request #1083 from Hixie/card-bug
Avoid infinite loop in syncChildren().
2015-09-08 14:03:51 -07:00
Adam Barth
05c9ca916e Add dartdoc for the animation library 2015-09-08 13:22:54 -07:00
Hixie
b9888c072d Avoid infinite loop in syncChildren().
This was a typo in #1062.

Also, some minor code cleanup and expose (in the app dump) the
_disqualifiedFromEverAppearingAgain boolean for debugging purposes.
2015-09-08 12:16:34 -07:00
Adam Barth
6fc343a097 Remove package:sky/base
These files really belong on other libraries.
2015-09-08 10:59:07 -07:00
Adam Barth
5108e15ed0 Introduce painting.dart and move painting code to src/painting 2015-09-08 10:36:14 -07:00
Adam Barth
25b8039958 Merge pull request #1076 from abarth/docs_animation
Introduce package:sky/animation.dart
2015-09-08 09:51:14 -07:00
Adam Barth
b356d14635 Introduce package:sky/animation.dart
Move the animation libraries into src/animation and change importers to use
package:sky/animation.dart. Also, move scheduler.dart into the animation
library so that the animation library can be self-contained.
2015-09-08 09:44:01 -07:00
Hixie
0a37e06b4d Fix breakage caused by sync-across-removal patch.
This makes the sync code stop if it would have to rearrange the
RenderObjects. I'll make it handle the cross-RenderObject case, as well
as the insertion-sync case, in subsequent patches.
2015-09-08 09:28:08 -07:00
Adam Barth
318b69be10 Fold package:sky/editing/* into package:sky/widgets.dart
The editing directory just defined two widgets. We might as well fold them into
the main widgets library.
2015-09-07 10:07:41 -07:00
Adam Barth
7e1e9ef351 Add dartdoc for RenderBox 2015-09-06 12:36:47 -07:00
Adam Barth
958de183c4 Merge pull request #1073 from abarth/box_docs
Document and bring sanity to BoxConstraints
2015-09-05 12:51:46 -07:00
Adam Barth
95277953aa Document and bring sanity to BoxConstraints
Turns out many of the functions on BoxConstraints weren't used or had callers
that could easily be updated to other functions. I've added dartdoc to all the
public functions as well as renamed some functions that had similar names but
did different things.
2015-09-05 11:33:02 -07:00
Adam Barth
d810b583f9 Merge pull request #1067 from devoncarew/gen_docs
working on generating docs as part of the build
2015-09-04 19:28:33 -07:00
Devon Carew
eb869d096e working on generating docs as part of the build
revert PATH changes

fix typo

some dartdoc changes in files
2015-09-04 19:21:53 -07:00
Adam Barth
48f600f85d Merge pull request #1071 from abarth/center_expand
Center and Align should expand by default
2015-09-04 16:21:07 -07:00
Adam Barth
5af85d9045 Center and Align should expand by default
This patch makes Center and Align expand by default, which is usually what you
want. It also adds a ShrinkWrap option to let you shrink wrap in one or both
directions if that's really what you want to do.
2015-09-04 16:11:58 -07:00
Hans Muller
18e512d3a2 Replace Scroll with Drag in names in GestureRecognizer et al 2015-09-04 16:02:30 -07:00
Hans Muller
e6d48ac5b9 Merge pull request #1066 from HansMuller/more-dismissable-unit-tests
Add Dismissable unit tests

Add coverage for the DismissDirection paramter.
2015-09-04 14:45:46 -07:00
Hans Muller
b02531a9c2 Add Dismissable unit tests 2015-09-04 14:31:03 -07:00
Adam Barth
5ce23e5ac3 Update links to READMEs
These needed to be updated because we moved the widgets directory into the src
directory to hide it from dartdoc.
2015-09-04 14:09:07 -07:00
Ian Hickson
931d5e7511 Merge pull request #1062 from Hixie/reposition
Handle Widget instances being moved as-is to different parts of the tree.
2015-09-04 13:41:55 -07:00
Chinmay Garde
6063ac8772 Merge pull request #1063 from chinmaygarde/master
Setup mac target for Fitness app
2015-09-04 13:34:14 -07:00
Chinmay Garde
ea4d52720a Setup mac target for Fitness app 2015-09-04 13:29:47 -07:00