472 Commits

Author SHA1 Message Date
Adam Barth
4d84e1b732 Disallow negative padding and margins
They're just as crazy in this system as they are in the web.
2015-09-04 12:25:26 -07:00
Hans Muller
4e01c05469 Add Dismissable support for DismissDirection
```
enum DismissDirection {
  vertical,
  horizontal,
  left,
  right,
  up,
  down
}
```

To only enable dismissing to the right create the `Dismissable` with `direction: DismissDirection.right`. By default direction is `DismissDirection.horizontal` (left or right).

Updated the card_collection "Swipe Away" demo with a drawer that can be used to select one of the three X axis dismiss directions. Currently the MixedViewport class doesn't support horizontal scrolling, so the demo doesn't support the X axis dismiss directions.
2015-09-04 11:31:15 -07:00
Adam Barth
7d11cfa481 Merge pull request #1056 from abarth/event_ordering
Events should bubble up the tree
2015-09-04 09:31:55 -07:00
Ian Fischer
3f2172432e Merge pull request #1054 from iansf/start_error_code
Error out on start if nothing started.
2015-09-04 07:53:48 -07:00
Alex Fandrianto
38bc97b6e6 Address Pull Request feedback
(optional param default value + newlines)
2015-09-03 19:14:22 -07:00
Adam Barth
f5102d1137 Events should bubble up the tree
Previously we reversed the event path by mistake before dispatching events.
2015-09-03 18:20:38 -07:00
Alex Fandrianto
dde3dd9121 This makes it easier for apps to control whether an IgnorePointer
widget is actively ignoring or not by changing a boolean instead of
the tree structure. ignoring defaults to true.
2015-09-03 17:45:44 -07:00
Ian Fischer
bd125e2e33 Return 0 or 2 from start and install commands. 2015-09-03 17:20:55 -07:00
Adam Barth
bc169671c8 Merge pull request #1051 from abarth/default_hit_test_children
defaultHitTestChildren should return whether it hit something
2015-09-03 17:18:02 -07:00
Adam Barth
5ea4763025 defaultHitTestChildren should return whether it hit something
Some clients want to know whether they hit their children.
2015-09-03 16:12:25 -07:00
Hans Muller
952e73583f Fix minor problems in _ScrollGestureRecognizer, Dismissable
Alternating scroll gestures would sometimes be ignored because _ScrollGestureRecognizer didn't always reset its _state when the pointer[s] went up.

A Dismissable dismiss triggered by a drag and then a fling could cause the next attempt to drag-dimiss to fail.

Fixed the definition of lerpColor().
2015-09-03 13:40:35 -07:00
Adam Barth
d0ad775ef2 Remove lerp.dart
These functions are now in sky:dart.
2015-09-03 12:36:24 -07:00
Adam Barth
c2ee2db555 Merge pull request #1041 from abarth/overconstrainted_flex
RenderFlex should handle overconstrainted constraints
2015-09-03 11:27:12 -07:00
Adam Barth
671b2bfeb9 Merge pull request #1044 from abarth/disable_reparent_during_sync
Disable reparent during sync
2015-09-03 11:26:52 -07:00
Andrew Wilson
2b25c33b4a Fix hairline border seen if border width is 0.0 2015-09-03 11:14:25 -07:00
Adam Barth
7d711b9ee0 Disable reparent during sync
This feature is causing a bug because the widget tree isn't correctly
synchronized with the render tree.
2015-09-03 10:59:26 -07:00
Adam Barth
2473346fce RenderFlex should handle overconstrainted constraints
Rather than reading out the maxWidth, we should call constrainWidth to factor
in the minWidth, which might be bigger.
2015-09-03 10:35:40 -07:00
Ian Fischer
1245aa7929 Correctly handle logging when devices are disconnected or logging processes otherwise crash. 2015-09-03 10:30:57 -07:00
Ian Fischer
c3e618fe37 Add a clear flag for sky_tool logs on Android. 2015-09-03 09:36:15 -07:00
Adam Barth
aa8942f4cf Merge pull request #1034 from abarth/rm_view_picture
Remove all clients of sky.view.picture
2015-09-03 00:26:15 -07:00
Adam Barth
52790aedf2 Use null-aware operators in package:sky 2015-09-03 00:03:00 -07:00
Adam Barth
36c62edffb Remove all clients of sky.view.picture
Everyone uses sky.view.scene now. This patch also cleans up the raw examples
and makes them follow a consistent pattern.
2015-09-02 23:35:29 -07:00
Ian Fischer
1800c88967 Guard sky_tool logs against failures due to missing idevicesyslog 2015-09-02 17:08:32 -07:00
Ian Fischer
3b6c6611d8 Merge pull request #1027 from iansf/sky_tool_logs
Add sky_tool logs command
2015-09-02 16:54:15 -07:00
Hans Muller
ed8c1cb69e Enable dynamic changes to itemsWrap in PageableList 2015-09-02 16:00:53 -07:00
Ian Fischer
fcdd5f96de Expose logs for Sky apps running on connected devices with sky_tool logs. 2015-09-02 15:42:27 -07:00
Hans Muller
75a63e0b82 fix typos in GestureDetector syncConstructorArguments 2015-09-02 14:05:22 -07:00
Adam Barth
693ddcd8dd Move widgets and rendering inside src
Code outside of package:sky should import this code using

package:sky/rendering.dart
package:sky/widgets.dart

Moving this code into the "src" directory is a convention that signifies that
and it cleans up the generated dartdoc because the libraries in the src
directory aren't included in the generated documentation. Instead, the classes
are documented in the widgets.dart and rendering.dart libraries.
2015-09-02 13:38:00 -07:00
Hans Muller
a69a95df26 Restore PageableList itemsWrap:true
Makes PageableList with itemsWrap:true work again.

Plumbed the itemsWrap parameter through to HomogenousViewport.

Fixes issue #877.
2015-09-02 10:56:19 -07:00
Ian Hickson
9dd84d6c8e Merge pull request #978 from Hixie/sync-removal
Still try to sync even if a node has been removed from the tree.
2015-09-01 14:08:23 -07:00
Ian Fischer
9510ea91ed Log a warning when developers are using a dev build of the sky package. 2015-09-01 13:42:00 -07:00
Ian Fischer
e2f78a98e5 Merge pull request #990 from iansf/remove_required_arg
Don't require -p for ios_sim commands
2015-09-01 13:39:51 -07:00
Hixie
aae2426000 Still try to sync even if a node has been removed from the tree.
This should handle a case like a stateful component inside a Container
inside another Container having one of those Containers removed while
still keeping that stateful component around with its state.

The problem of how to handle the Container then being reinserted is a
separate issue not handled by this patch.
2015-09-01 13:32:28 -07:00
Adam Barth
aa5504c7f3 Merge pull request #979 from abarth/render_object_docs
Add dartdocs for RenderObject
2015-09-01 12:25:04 -07:00
Adam Barth
c1bd6af997 Add dartdocs for RenderObject
... and other code in object.dart.
2015-09-01 12:24:27 -07:00
Ian Fischer
f8fbe12bce Don’t require specifying -p in ios_sim commands under normal circumstances. 2015-09-01 11:26:46 -07:00
Ian Fischer
e8dadb3a12 Refactor sky_tool install slightly and fix non-local builds. 2015-09-01 10:37:27 -07:00
Ian Fischer
2b1f00b0b4 Fix missing paren 2015-09-01 10:07:20 -07:00
Ian Fischer
0d7e90d590 Make it possible to download trace files on rooted devices using sky_tool stop_trace 2015-08-31 17:12:09 -07:00
Hans Muller
9d1bb04a71 Merge pull request #974 from HansMuller/dismissable-uses-gestures
Convert Dismissable to use gestures

Convert Dismissable to use the ScrollStart, ScrollUpdate, and ScrollEnd gestures. Support for fling gestures is TBD.

Included a basic unit test that checks that one item can be dismissed with a press-drag-release gesture.

Fixed the scroll gesture recognizer: if the last pointer goes up and candidate recognizers still exist, then reject the gesture.
2015-08-31 16:46:26 -07:00
Hans Muller
7a42fe3482 Convert Dismissable to use gestures
Convert Dismissable to use the ScrollStart, ScrollUpdate, and ScrollEnd gestures. Support for fling gestures is TBD.

Included a basic unit test that checks that one item can be dismissed with a press-drag-release gesture.

Fixed the scroll gesture recognizer: if the last pointer goes up and candidate recognizers still exist, then reject the gesture.
2015-08-31 16:44:25 -07:00
Adam Barth
bd038cfc53 Merge pull request #972 from abarth/parent_data_madness
Positioned 'remembers' things it shouldn't
2015-08-31 16:41:36 -07:00
Adam Barth
64a784141e Positioned 'remembers' things it shouldn't
This patch makes ParentDataNode less general purpose and instead teaches Flex
and Stack how to program the parent data for their children. We used to have
this general system because parent data used to carry CSS styling, but we don't
need it anymore.

Fixes #957
2015-08-31 16:41:14 -07:00
Hixie
820137b7f9 Remove the inner SizeObserver from ScrollableWidgetList.
Adds a HomogeneousViewport class that works like MixedViewport but
handles only children that have all the same height.

Converts ScrollableWidgetList to use that, so that we don't waste a
frame looking at the size of the contents each time we change size.

This allows a number of seemingly pointless double-pumps in the tests
to be removed.

Other changes that were necessary to support the above:

 - RenderBlock now supports minExtent (think 'min-height' in CSS)
 - RenderBlock now supports itemExtent (forces the height of each
   child to be the same, so that the itemExtent passed to the fixed-
   height scrollables are all authoritative instead of a source of
   bugs when they don't match)
 - RenderBlockViewport now supports horizontal scrolling
 - improved the style of the isInfinite assert in box.dart
 - fixed the position of a comment in mixed_viewport.dart
 - added a test
 - made the logic for how many items to show be more precise
2015-08-31 15:57:45 -07:00
Adam Barth
916e4fabe4 Make these constants private
These constants aren't useful outside these files and are cause noise in the
dartdoc.
2015-08-31 15:53:33 -07:00
Ian Fischer
333e611585 Merge pull request #969 from iansf/extract_install
Extract install from StartSky
2015-08-31 14:30:29 -07:00
Ian Fischer
0c089cb323 Extract install into its own sky_tool command. 2015-08-31 14:20:18 -07:00
Adam Barth
0b690583c9 Basic widgets should validate their parameters with asserts
Also fixes #937.
2015-08-31 13:34:30 -07:00
Adam Barth
fefdb92e5e Merge pull request #961 from abarth/transform_origin
Add an origin parameter to transforms
2015-08-31 13:22:01 -07:00
Adam Barth
ffc6eaa9bd Add an origin parameter to transforms
This parameter makes it easier to do math when you don't want to center your
tranform at (0, 0).
2015-08-31 13:21:26 -07:00