27629 Commits

Author SHA1 Message Date
Adam Barth
8eb8c47a2d Add CustomPaint and few other basic widgets to fn3
We'll need tag nodes before finishing Flex and Stack.
2015-09-22 11:26:20 -07:00
Ian Fischer
0cc758d24e Set up plumbing for getting relevant paths to the right places without too much global state.
`dart bin/sky_tools.dart --debug --sky-src-path=/path/to/sky/src/ install` now works.
2015-09-22 11:17:39 -07:00
Devon Carew
1532005ee6 fix a path issue when creating new flutter apps 2015-09-22 10:53:55 -07:00
Ian Hickson
61d0ca7779 Merge pull request #1280 from Hixie/block
Fix scrolling of Block.
2015-09-22 10:43:22 -07:00
James Robinson
20d9d6a9e2 Make sky_tools help strings consistently refer to Flutter app, not package 2015-09-22 10:38:54 -07:00
Hixie
59f7e7f08e Fix scrolling of Block.
Since our build function depends on scrollBehavior.isScrollable, any
time we update scrollBehavior we are implicitly updating our state. As
such, we must do so during a setState() call, or else we won't rebuild
and might not bother to listen to the scroll gestures.

This probably broke when we made Block not listen to gestures if it
wasn't overflowing.
2015-09-22 10:36:34 -07:00
Adam Barth
ff5862475a Add a number of basic widgets to fn3
There are some TODOs in this file that I'll address in the next patch.
2015-09-22 10:27:28 -07:00
Adam Barth
244fdab0b1 Merge pull request #1279 from Hixie/fn3
More dartdocs for fn3, refactor buildDirtyElements
2015-09-22 09:41:38 -07:00
Jason Simmons
963fb41334 Merge pull request #1245 from jason-simmons/editable_text_initial_blink
Ensure that EditableText always shows a cursor
2015-09-22 09:29:52 -07:00
Jason Simmons
9b84e6b8e9 Merge pull request #1255 from jason-simmons/skyanalyzer_pub_cache
Some cleanup of the Sky analyzer script
2015-09-22 09:29:27 -07:00
Hixie
de62f1b69a More dartdocs for fn3, refactor buildDirtyElements
The buildDirtyElements() method now enforces that we only build deeper
nodes and never go back to build higher nodes during a frame.
2015-09-22 09:20:30 -07:00
James Robinson
542da8ccd5 Adds a run_mojo command that downloads sky_viewer.mojo and runs an flx in it
This initial version assumes the developer has mojo_shell and all other services
sitting on disk somewhere and that they're on linux and only want to run on
linux. This can be generalized down the line to support more use cases. This
downloads the sky_viewer.mojo corresponding to the packages/sky_engine/REVISION
in the developer's directory, so they can specify whatever revision they want.
sky_tools run_mojo downloads sky_viewer.mojo into its cache directory if it is
not present and constructs a command line to pass to mojo_shell that maps the
shebang stamped into the flx to the downloaded sky_viewer.mojo.

Since sky_viewer.mojo lives in the cloud and mojo_shell can load from the cloud
this could also map to an https URL. This should likely be an option.
2015-09-21 22:06:05 -07:00
Adam Barth
174ee11d39 Fix analyzer warning 2015-09-21 21:35:36 -07:00
Hixie
ba41fd3538 More dartdoc for fn3, and sundry changes.
- move _uniqueChild earlier since a comment now mentions it earlier.
- reorder methods in Element to more closely reflect call order.
- change mount to be the place that sets the parent pointer, for consistency.
- make the lifecycleState a purely debug-time thing for consistency.
- make BuildableElement.unmount set dirty to false so that we won't
  build unmounted objects.
- rename "updated" to "newWidget" for clarity.
- change how we unmount things so that the slot is reset up to a
  RenderObjectElement, but not further, and don't reset the depth.
2015-09-21 17:44:15 -07:00
Adam Barth
12097bdde0 Remove uses of sky.GestureEvent 2015-09-21 17:05:45 -07:00
Adam Barth
051354ae1d Remove EventDisposition
All the use cases for EventDisposition are now addressed by the gesture
detection system.
2015-09-21 16:45:09 -07:00
Adam Barth
1976ae1d5e RenderToggleable should use a gesture recognizer
We no longer have gesture events.
2015-09-21 16:26:28 -07:00
Hixie
205335f0f0 Fix fn3 build errors
Add a LeafRenderObjectElement, fix a test to use the new contract.
2015-09-21 15:45:49 -07:00
Hixie
547c324d4b fn3 review
- adds dartdocs
- replaces config setter with didUpdateConfig() so that you can't replace
the config outside of the system
- renames didUnmount() with destroy().
- rename Component to StatelessComponent, ComponentConfiguration to
StatefulComponent
- move debug dump to end of file
- renamed _holder to _element
2015-09-21 15:42:18 -07:00
Adam Barth
d27f3d5251 Merge pull request #1259 from abarth/fn3_rebuild
fn3 shouldn't rebuild components that don't change identity
2015-09-21 15:05:14 -07:00
Collin Jackson
746134a3c9 Merge pull request #1214 from collinjackson/scale_tests
add a test for scale gestures
2015-09-21 14:47:50 -07:00
Jason Simmons
64f75399ef Some cleanup of the Sky analyzer script
* If no source path is provided, then run the analyzer on the Sky unit tests
* Fix the filter for errors found in pub cache packages
* Generalize the filter for the analyzer's "xx errors/warnings/hints found" status message

Also fix a test that caused a warning in the analyzer.
2015-09-21 14:14:30 -07:00
Jason Simmons
58b421aaf4 Ensure that EditableText always shows a cursor
Previously EditableText would render a text widget with no cursor if the text
value was empty.

Also adjust the height of the cursor widget to reflect the style's line
height, and update the cursor painting to match.
2015-09-21 14:12:55 -07:00
Adam Barth
b361a3b4a8 fn3 shouldn't rebuild components that don't change identity 2015-09-21 14:00:26 -07:00
Adam Barth
5fdd996e00 Rev pub packages 2015-09-21 12:46:47 -07:00
Adam Barth
a1b8e4f9d4 Make big_red_button work with the current Dart SDK
Previously --stage-two would error out because the LICENSE was git ignored.
This patch includes the LICENSE file in the repo to avoid the error. Also,
refactor the big_red_button.py to be clearer about what's shared between stage
one and stage two of the release process.
2015-09-21 12:43:57 -07:00
Adam Barth
88a5cf95d2 Rev pub package 2015-09-21 11:04:40 -07:00
Adam Barth
b9c06c0ade Make stateful components work in fn3 2015-09-21 11:02:36 -07:00
Ian Hickson
6a88ec6d71 Merge pull request #1248 from abarth/fn3
Prototype of fn3
2015-09-21 10:26:25 -07:00
Adam Barth
130a5cb6dc 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
Devon Carew
9e02fed4e4 Merge pull request #35 from devoncarew/check_all_code
check all the dart code in the project, not just selected libraries
2015-09-19 13:48:00 -07:00
Adam Barth
27e6381eac Update URLs after moving to the Flutter organization 2015-09-19 09:04:33 -07:00
Adam Barth
fe5d511340 Update README.md
s/sky_tools/tools/
2015-09-19 08:50:26 -07:00
Adam Barth
577f8e4a1e Update README.md
s/domokit/flutter/
2015-09-19 08:45:18 -07:00
Adam Barth
76ed7ae20c Update README.md
s/domokit/flutter/
2015-09-19 08:42:10 -07:00
Adam Barth
32ff3e59b4 Update README.md
s/domokit/flutter/
2015-09-19 08:41:31 -07:00
Adam Barth
b4ff5ca6ae 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
Devon Carew
a4ff100408 check all the dart code in the project, not just selected libraries 2015-09-18 20:59:32 -07:00
James Robinson
a320e712de Address review feedback from pull request #30 2015-09-18 17:03:51 -07:00
James Robinson
7f8319fd25 Merge pull request #30 from jamesr/download_sky_snapshot
Download sky_snapshot from the cloud
2015-09-18 17:02:25 -07:00
James Robinson
cbc35dfacb Download sky_snapshot from the cloud
This adds logic to download and use the sky_snapshot binary from
Google cloud storage when running the 'sky_tools build' command.
The downloaded binary is put into lib/cache/... The binary is
chosen to match the REVISION in the sky_engine package in the
packages directory of whichever package the user wishes to
build a flx from.

Known issues:
*) Assumes linux-x64 host
*) Assumes download will always produce valid executable
*) No clearing of stale cache entries
2015-09-18 16:58:57 -07:00
Hixie
a3ae46b97e 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 Fischer
670f14e0f8 Add missing semicolon 2015-09-18 16:29:47 -07:00
Viktor Lidholt
f15b948060 Merge pull request #1246 from vlidholt/master
Improvements to EffectLine in sprites
2015-09-18 16:28:29 -07:00
Ian Hickson
a9ad84a871 Merge pull request #1241 from Hixie/ancestorOfType
Move findAncestorRenderObjectWrapper to RenderObjectWrapper
2015-09-18 16:13:40 -07:00
Viktor Lidholt
a66a5c4bff Improvements to EffectLine in sprites 2015-09-18 15:58:16 -07:00
krisgiesing
93ebc9e417 Merge pull request #1242 from krisgiesing/master
Fix Rect intersection; add test
2015-09-18 15:28:35 -07:00
Kris Giesing
c52b6fb9e8 Fix Rect intersection; add test 2015-09-18 15:22:59 -07:00
Adam Barth
127cd14bf7 Rev pub package 2015-09-18 15:21:54 -07:00
Hixie
c363a9a240 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