27629 Commits

Author SHA1 Message Date
Hans Muller
9b6590890a Land snap_scrolling_test.dart 2015-09-29 15:28:42 -07:00
Ian Hickson
2ed1b60808 Merge pull request #1371 from Hixie/fab-snack
Make the FAB move up when a Snack Bar slides in.
2015-09-29 15:23:49 -07:00
Hans Muller
a656d57d0f Merge pull request #1398 from HansMuller/fix_analayzer_warning
Fix _scrollOffsetIsInBounds analayzer warning
2015-09-29 14:41:48 -07:00
Ian Fischer
2bc289dec9 Merge pull request #61 from iansf/android_logs
Add optional prefix to runCommandAndStreamOutput for logs commands.
2015-09-29 14:41:26 -07:00
Ian Fischer
6a5fe19540 Basic sky_tools logs test. 2015-09-29 14:26:42 -07:00
Hans Muller
02152f65fb Fix _scrollOffsetIsInBounds analayzer warning 2015-09-29 14:21:57 -07:00
Hans Muller
42f48b0f0e Fix _scrollOffsetIsInBounds analayzer warning 2015-09-29 14:17:23 -07:00
Ian Fischer
a6635489f5 Add optional prefix to runCommandAndStreamOutput for logs commands. 2015-09-29 14:15:29 -07:00
Jason Simmons
571c7dd9ff Fix a couple of analyzer warnings
* Unused import in editable_text.dart
* Type mismatch in append_child_test.dart
2015-09-29 14:04:47 -07:00
Jason Simmons
02c2e79b64 Merge pull request #1361 from jason-simmons/edit_text_scrollable_fn3
Allow the Input/EditableText widget to scroll horizontally
2015-09-29 13:20:58 -07:00
Collin Jackson
1d66184285 Merge pull request #1393 from collinjackson/back_button
pressing back button should close app if there is no previous route
2015-09-29 12:32:04 -07:00
Collin Jackson
c569758a9a pressing back button should close app if there is no previous route 2015-09-29 12:28:28 -07:00
Hans Muller
e24b4e33e3 -straggler- Rename Scrollbehavior release() to createFlingScrollSimulation() 2015-09-29 12:14:19 -07:00
Ian Fischer
5e11889160 Add logs command and android implementation. 2015-09-29 11:51:33 -07:00
Hans Muller
c3510b7d94 Rename Scrollbehavior release() to createFlingScrollSimulation() 2015-09-29 11:45:18 -07:00
Hans Muller
7385641f6d SnapOffsets for fling Scrolling
Initial snap offset support for ScrollableWidgetList (and ScrollableList<T>) and ScrollableMixedWidgetList. If a ```toSnapOffset(scrollOffset)``` function is provided, fling Scrolls will coast to the returned value. If ```alignmentOffset``` is specified then fling scrolls conclude when toSnapOffset's value lines up with the Scrollable widget's origin + alignmentOffset. For example if the Scrollable widget's height was 200.0, and alignmentOffset:100.0 was specified, then fling scrolls would end with the value returned by toSnapOffset() lined up with the center of the Scrollable.

This approach to Scrollable snapping assumes that the layout of whatever the Scrollable contains is known at the outset. This is often true however a ScrollableMixedWidgetList may not know its items' sizes until they've been reached by scrolling.

This is a first cut at snapping support. Among the things that remain to be done:
- Scrolling limits trump snapping. Snapping should probably trump scrolling limits.
- Drag scrolls aren't snapped. This may be desirable so perhaps the feature should be controlled with a flag.
- Specifying alignmentOffset as a percentage would probably be more convenient.
- It would be nice if one could wrap items in a SnapOffset value like: ```new SnapOffset(0.5, child: myItem)``` to snap to the center of the item.

Updated the CardCollection example: snapping and fixed size items can be turned on/off with Drawer checkboxes.
2015-09-29 11:09:59 -07:00
Jason Simmons
a6f41c8a10 Allow the Input/EditableText widget to scroll horizontally
EditableText is now rendered using a custom RenderObject
(RenderEditableParagraph).  RenderEditableParagraph draws the cursor,
handles scroll offsets, and provides feedback about the size of the text for
use by the scroll behavior.
2015-09-29 10:40:37 -07:00
Ian Fischer
61bfe5ce84 Unify process_wrapper and process to have the same api and logging styles.
Also add unchecked runSync wrapper and use it in places where command failures don’t matter.
2015-09-29 10:30:13 -07:00
Ian Fischer
8cac55a4e2 Add sky_tools start command and associated android support. 2015-09-29 09:54:10 -07:00
Ian Fischer
6bfd60f217 Merge pull request #56 from iansf/android_stop
Add stop command and supporting Android support.
2015-09-29 09:28:23 -07:00
Hixie
4620b63226 fn3: toString() and toStringDeep() debugging aids 2015-09-28 17:09:26 -07:00
Devon Carew
ebd7fa3e36 Merge pull request #1375 from devoncarew/customize_dartdoc
customize the generated dartdoc to look like flutter.io
2015-09-28 12:01:54 -07:00
Hixie
5487b95472 Require giving a GlobalKey to UniqueComponent
Having UniqueComponent automatically generate its own key is a trap. If
anyone ever creates a UniqueComponent in a build function (rather than
ahead of time) and forgets to pass a key, then that entire subtree is
going to be rebuilt, including layout, every time it's updated. Since
there's basically no way for us to catch this, we should at least force
the author to see the explicit "new GlobalKey()" call in their code.
2015-09-28 11:53:03 -07:00
Hixie
066768f096 Make the checkbox in the stocks popup menu work.
Tapping on the menu item didn't animate the checkbox because the menu
takes 300ms to animate entirely away while the checkbox takes 200ms to
animate checked, and since the item with the checkbox was at the bottom,
we were only seeing about 60ms of the entire checkbox animation, which
isn't enough to notice it. So I moved it to the top of the menu.

Tapping on the checkbox didn't animate because nothing caused the menu
to rebuild when the callback was invoked. To trigger a rebuild, I now
call navigator.setState() explicitly, after changing out local state.

To make tapping the checkbox remove the menu, I also explicitly call
navigator.pop() in the code that handles the check. (I still explicitly
change the checkbox to show that that's possible. In principle one could
just treat the checkbox as an inert widget that happens to trigger pop,
and do all the checking/unchecking in the switch statement.)

I also made some minor style tweaks to files I was looking at while
dealing with this issue.
2015-09-28 11:15:05 -07:00
Hixie
56d4033423 Make the FAB move up when a Snack Bar slides in.
This changes how SnackBar works so you can use it anywhere, not just on
the bottom edge of the screen (it used to rely on overflowing its bounds
and having negative offsets... I'm not really sure how hit testing
worked on it before!).

To do this I introduced a new RenderBox, RenderOverflowBox, that lets
you set your child's size independent of your own. I needed this so that
the snack bar could use a SquashTransition to change its size, while not
affecting the layout of its child. This is exposed as OverflowBox in
fn3. I'm not sure if it's the best API. It doesn't let you position the
child (which is an issue if the size you give is smaller), it doesn't
let you give a loose constraint (which maybe you might want?). But it
handles this use case, so for now it's probably ok.

Making the FAB get repositioned out of the way of the Snack Bar is now
done in the Scaffold, which is in charge of positioning both of those
and is the place that knows that both exist.
2015-09-28 10:19:22 -07:00
Adam Barth
64dfb8496c Actually notify GlobalKey listeners in fn3
This patch makes a number of changes:

1) buildDirtyComponents now prevents all calls to setState, not just those
   higher in the tree. This change is necessary for consistency with
   MixedViewport and HomogeneousViewport because those widgets already build
   subwidgets with that restriction. If the "normal" build didn't enforce that
   rule, then some widgets would break when put inside a mixed or homogeneous
   viewport.

2) We now notify global key listeners in a microtask after beginFrame. That
   means setState is legal in these callbacks and that we'll produce another
   frame if someone calls setState in such a callback.
2015-09-27 17:22:48 -07:00
Devon Carew
e7f726c240 customize the generated dartdoc like flutter.io 2015-09-26 23:19:25 -07:00
Adam Barth
f9b5b145f9 Address review comments from @hixie 2015-09-26 20:18:16 -07:00
Adam Barth
6ea83f11c8 Merge pull request #1367 from abarth/update_navigation_example
Update navigation example
2015-09-26 18:39:33 -07:00
Adam Barth
fb58141dc5 Port hello_world to fn3 2015-09-26 13:18:20 -07:00
Adam Barth
bb8e82d053 Port address_book to fn3 2015-09-26 13:16:33 -07:00
Adam Barth
1424f351d9 Update navigation example after Navigator changes
Now this example uses the App widget to drive the adventure game.
2015-09-26 13:07:46 -07:00
Adam Barth
a01aa6ffbb Fix analyzer warnings 2015-09-26 13:07:31 -07:00
Adam Barth
c177ecd86c Add missing export 2015-09-26 13:07:21 -07:00
Adam Barth
e510425609 Add missing .gitignore file 2015-09-26 12:54:17 -07:00
Adam Barth
8e201d7552 Port MineDigger to fn3 2015-09-26 12:53:14 -07:00
Adam Barth
a74d02dadf Rename Sky to Flutter in a few more places 2015-09-26 12:46:03 -07:00
Hixie
0a0a92eb45 Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
James Robinson
f7e20f4a46 Check that the platform is linux before downloading linux-x64 binaries 2015-09-25 17:42:28 -07:00
James Robinson
2fe4484d9c Merge pull request #57 from jamesr/fix_build
Fix sky_tools build command to look for package-root in global args
2015-09-25 17:39:06 -07:00
Adam Barth
93f1ba5dac Add Mimic to fn3 2015-09-25 16:43:22 -07:00
James Robinson
9e2a83cfa3 Fix sky_tools build command to look for package-root in global args 2015-09-25 16:25:48 -07:00
Ian Fischer
fa59233746 Add stop command and supporting Android support. 2015-09-25 16:16:19 -07:00
James Robinson
ed2877c093 Add --checked flag to mojo_run that runs sky_viewer in checked mode
Also refactors the command line assembling to make a bit more sense.

Fixes #53
2015-09-25 16:14:12 -07:00
James Robinson
9996d4255e Configure ArtifactStore for all commands and make 'package-root' universal
This makes the 'package-root' option universal for sky_tools and configures the
ArtifactStore with it statically at startup. The actual sky_engine revision
is computed on demand.
2015-09-25 15:56:20 -07:00
Adam Barth
24171915aa Fix indent 2015-09-25 15:43:03 -07:00
Adam Barth
e1b8f0b659 Add UniqueComponent helper for creating components with unique states 2015-09-25 15:36:25 -07:00
Adam Barth
ff5676952e Add an onScroll callback to Scrollable 2015-09-25 15:08:22 -07:00
James Robinson
be0b3e61be Merge pull request #52 from nlacasse/release-debug
run_mojo: Add --mojo-release and --mojo-debug flags.
2015-09-25 15:07:04 -07:00
Nicolas Lacasse
f600beeb70 run_mojo: Add --mojo-release and --mojo-debug flags.
The flags control which build of mojo to run (Debug or Release).
Default is Release.
2015-09-25 14:51:03 -07:00