658 Commits

Author SHA1 Message Date
Adam Barth
496e0b40ed Make stateful components work in fn3 2015-09-21 11:02:36 -07:00
Ian Hickson
785769db18 Merge pull request #1248 from abarth/fn3
Prototype of fn3
2015-09-21 10:26:25 -07:00
Adam Barth
dcb968c420 Fix analyzer warnings
We were just missing a few type casts in tests to make the analyzer happy.
2015-09-19 19:21:11 -07:00
Adam Barth
1468e23311 Update URLs after moving to the Flutter organization 2015-09-19 09:04:33 -07:00
Adam Barth
d0e3139182 Prototype of fn3
This patch contains a prototype of a new widget framework. In this framework,
Components can be reused in the tree as many times as the author desires. Also,
StatefulComponent is split into two pieces, a ComponentConfiguration and a
ComponentState. The ComponentConfiguration is created by the author and can be
reused as many times as desired. When mounted into the tree, the
ComponentConfiguration creates a ComponentState to hold the state for the
component. The state remains in the tree and cannot be reused.
2015-09-18 23:17:52 -07:00
Hixie
16f28c7939 Introduce a showPopupMenu() function
Instead of having to manage the popup menu from your app's build
function, you now just call showPopupMenu() with the menu's position and
it takes care of everything for you.

This solves the problem that the popup menu was trying to mutate the
state of the navigator from within its own initState() function.

Also, remove the "route" argument to RouteBase.build() since it equals
"this" by definition...

Also, remove ModalOverlay, and instead put that logic in the navigator.
2015-09-18 16:57:15 -07:00
Ian Hickson
6ed9d7de0b Merge pull request #1241 from Hixie/ancestorOfType
Move findAncestorRenderObjectWrapper to RenderObjectWrapper
2015-09-18 16:13:40 -07:00
Adam Barth
fc6523a357 Rev pub package 2015-09-18 15:21:54 -07:00
Adam Barth
abfb3b6379 Rev pub packages 2015-09-18 15:16:28 -07:00
Hixie
19825d6574 Move findAncestorRenderObjectWrapper to RenderObjectWrapper
That way it's closer to where it's used, and it's more obvious that
anyone can write such functions.
2015-09-18 15:02:14 -07:00
Hixie
e56f8322e8 Allow route transitions to be more flexible
- Fix AnimationTiming to have defaults for 'interval' and 'curve' since
  that seems to be how we use it.

- Merge RouteBase.build and RouteBase.buildTransition

- Get rid of HistoryEntry, since it added nothing

- Broke out RouteBase.createPerformance() so subclasses can change what
  is created.

- Build the routes backwards so that we more efficiently avoid building
  hidden routes.

- Introduce an explicit way (!hasContent) for RouteState to avoid
  building, rather than the implicit "build returns null" we had before.
2015-09-18 14:25:18 -07:00
jason-simmons
ca9a7d7d82 Merge pull request #1229 from jason-simmons/editable_text_placeholder_flex
In EditableText, wrap the placeholder text in a Row so it will expand to its parent's width
2015-09-18 14:24:26 -07:00
Jason Simmons
88314a80ad In EditableText, wrap the placeholder text in a Row so it will expand to its parent's width
This will ensure that the width of an empty Input is consistent with the
width of an Input that contains text.

Also add a unit test for the Input widget and a way for tests to provide mock
implementations of Mojo services such as the keyboard.
2015-09-18 13:46:31 -07:00
Hixie
0c7dc4ccb6 Adjust indent in Positioned to match style guide. 2015-09-18 12:08:44 -07:00
Ian Hickson
c07f8aaa61 Merge pull request #1175 from Hixie/performance-view
Require that you pass transitions a performance.
2015-09-18 11:53:58 -07:00
Adam Barth
11dea8921a Lift docs from Markdown to dartdoc
I've also removed the top-level description of the Sky package. Instead, we
should host that content on flutter.io.
2015-09-18 10:50:45 -07:00
Hixie
8dcec9bf93 Require that you pass transitions a performance.
This fixes #1103.
2015-09-18 10:30:47 -07:00
Hixie
cbb6e05523 Provide hooks for when exceptions are thrown.
This might be helpful for #1219.

Also, remove inDebugMode since it's redundant with just using asserts,
which compile entirely out in release mode.
2015-09-18 10:23:58 -07:00
Adam Barth
9cef3e61e9 Move theme into material.dart
Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
2015-09-18 09:57:21 -07:00
Hixie
6ef9d188e8 Handle the case of a Widget being moved down
When we sync() a Component, we need to clear the old Component's _child
pointer, otherwise if we reuse that Component we'll get confused about
what the old child is.
2015-09-17 17:23:20 -07:00
Ian Hickson
881e597e99 Merge pull request #1218 from Hixie/toString
Improve debugging aids for widgets, rendering.
2015-09-17 16:27:02 -07:00
Ian Fischer
885474650b Kill the sky_server on Mac in a way that works to avoid unexpected behavior when working with more than one app at once. 2015-09-17 16:03:29 -07:00
Adam Barth
e650fd58da Merge pull request #1222 from abarth/rm_skyx
Remove the skyx package
2015-09-17 16:00:39 -07:00
Adam Barth
2fceed4672 Remove the skyx package
This code is now part of sky_tools.
2015-09-17 16:00:28 -07:00
Hixie
8d2851a931 Improve debugging aids for widgets, rendering.
We need a short name more often than a tree dump, so toString() should
be the short name.

Make debugDumpRenderTree() a global like debugDumpApp(), for
consistency. It's hard to remember the
SkyBinding.instance.dumpRenderTree() incantation.

Fixes #1179.
2015-09-17 13:59:46 -07:00
Hixie
bb0a7f2b64 Fix removal logic in widgets
We were not removing children if they were more recently synced than we
were. This makes no sense. We should remove all children unless they
were synced this very generation already (in which case they'll be
somewhere else in the tree by now).
2015-09-17 13:30:27 -07:00
Adam Barth
d9d3c2b06f Remove reference to oblique
We removed this value from the engine because it's not useful.
2015-09-17 11:19:24 -07:00
Adam Barth
0cc094288e Move mojo frontend into services.dart
What's important about this code is that it's presenting services outside the
VM, not the particular technology used to present the services.
2015-09-16 19:13:50 -07:00
Adam Barth
9251203829 Create gestures.dart
This patch is part of a sequence of patches towards fewer top-level libraries.
In this patch, the gesture libraries are combined into one gestures.dart
library.
2015-09-16 18:25:00 -07:00
Collin Jackson
aa6251a276 Update scale API and add example 2015-09-16 17:20:23 -07:00
Collin Jackson
256b33562e First pass at support for pinch gestures; panning issues (needs testing)
Conflicts:
	sky/packages/sky/lib/gestures/drag.dart
2015-09-16 17:20:23 -07:00
Adam Barth
9b05a68ca0 Rev pub packages 2015-09-16 17:13:38 -07:00
Adam Barth
21c73de8f5 Rev pub packages 2015-09-16 17:11:26 -07:00
Adam Barth
4dcd995d30 Update sky_tools 2015-09-16 16:49:27 -07:00
Hixie
595857045c Improve debugging aids in framework.dart 2015-09-16 16:08:05 -07:00
Adam Barth
7e18c717c7 Remove extra return 2015-09-16 14:28:44 -07:00
Ian Hickson
b3b70a2739 Merge pull request #1197 from Hixie/mimic
Factor out GlobalKeyWatcher
2015-09-16 14:27:44 -07:00
Hixie
18ee265a34 Minor clean up of animation_performance.dart
- Reorder the methods so they are closer to run order.
- Reindent the code to match style guide.
2015-09-16 14:09:51 -07:00
Hixie
6345637835 Factor out GlobalKeyWatcher
This also moves the logic that tracks what Widget is being watched into
GlobalKeyWatcher, and much simplifies Mimic based on this.
2015-09-16 13:20:09 -07:00
Ian Hickson
a2e9e91b9a Merge pull request #1191 from Hixie/flex
FlexAlignItems.stretch didn't stretch
2015-09-16 13:09:08 -07:00
Adam Barth
01c437587d Remove support for onGestureFoo from Listener
Please use GestureDetector instead.
2015-09-16 12:43:33 -07:00
Adam Barth
863d3f119e Move Drawer to GestureDetector
This fixes an issue in the stocks app in horizontal mode where you could both
scroll and drag the drawer at the same time.
2015-09-16 12:33:51 -07:00
Hixie
ebf1256a6c FlexAlignItems.stretch didn't stretch 2015-09-16 12:22:37 -07:00
Adam Barth
8f8e955bb0 Merge pull request #1192 from abarth/simplify_test_runner
Simplify TestRunner now that we don't have test_sky
2015-09-16 12:00:15 -07:00
Adam Barth
d5b2969546 Simplify TestRunner now that we don't have test_sky 2015-09-16 11:00:33 -07:00
Ian Hickson
afd05899d0 Merge pull request #1188 from Hixie/animatedcontainer
AnimatedContainer isn't an AnimatedComponent.
2015-09-16 10:41:43 -07:00
Hixie
f429d21c96 AnimatedContainer isn't an AnimatedComponent.
Turns out it gets nothing out of inheriting from AnimatedComponent.
2015-09-16 09:29:54 -07:00
Adam Barth
db9c46213b Remove MimicOverlay
This widget has no client.
2015-09-16 09:27:50 -07:00
Adam Barth
fc125715cc Fix analyzer warnings 2015-09-16 09:07:23 -07:00
Ian Hickson
9e8c7bc84b Merge pull request #1182 from Hixie/ancestor
Clarify why we don't assert that ancestor != null.
2015-09-16 09:06:14 -07:00