1804 Commits

Author SHA1 Message Date
Chinmay Garde
cb6b303996 Fix sky_tool start/listen on iOS 2015-09-23 12:54:29 -07:00
Adam Barth
8c6073a5f4 Merge pull request #1304 from abarth/simple_widgets
Port some widgets to fn3
2015-09-23 12:34:55 -07:00
Matt Perry
707d84cd26 Merge pull request #1288 from mpcomplete/dart
Replace C++ UpdateTask with an empty dart version, loaded as a snapshot
2015-09-23 14:33:12 -04:00
Adam Barth
da2ee9129a Port some widgets to fn3 2015-09-23 11:26:55 -07:00
Hixie
6ea86b6a2f fn3: Listener
In this new world, Listener is just a wrapper around a node in the
render tree that hooks directly into the event handling logic.
2015-09-23 11:22:51 -07:00
Hixie
b3ebd4406b Expose _descendantRenderObject as 'renderer'
This allows people to use localToGlobal and company.
2015-09-23 11:13:45 -07:00
Matt Perry
10ca050890 Replace C++ UpdateTask with an empty dart version, loaded as a snapshot.
This adds a new placeholder dart package updater in sky/packages. This is built
into a snapshot and compiled into the Sky engine binary using the same
mechanism as the Dart isolate.

I also added a SkyHeadless class, similar to SkyView, used for running Dart
code without a view.
2015-09-23 14:09:38 -04:00
Viktor Lidholt
4bc4c978c9 Merge pull request #1299 from vlidholt/master
Removes artifacts from textured lines in sprites
2015-09-23 11:07:42 -07:00
Adam Barth
fa119c38b9 Add tests for ParentData 2015-09-23 10:59:49 -07:00
Adam Barth
82e8e3f079 Rev pub package 2015-09-23 10:38:25 -07:00
Hixie
2a5fad937b fn3: Minor cleanup
- Remove the unique objects used as slots since we decided 'null' was
  fine after all
- Rename 'slot' to 'newSlot' when it's used as an argument to change the
  _slot field, to clarify which variable has the newer value
- Remove the RenderObject registry since we'll do listeners a different
  way. This also removes handleEvent for the same reason.
- Remove the TODOs for mount/unmount becoming didMount/didUnmount since
  the methods do in fact do the mounting/unmounting.
2015-09-23 09:24:13 -07:00
Hixie
555138e60e fn3: Binding to RenderView
In the old world, we had two ways to bind a Widget tree to a
RenderObject node, one way for RenderView and one mostly untested way
for other cases (it's only tested by the spinning_mixed.dart demo). For
fn3, I made these the same code path.

This patch also introduces GlobalKey, though the GlobalKey logic isn't
hooked in yet.

This is Hello World in the new world:

```dart
import 'package:sky/src/fn3.dart';

void main() {
  runApp(new Text('Hello World!'));
}
```
2015-09-23 09:12:01 -07:00
Adam Barth
8b162b5950 Add tests for MultiChildRenderWidget 2015-09-23 08:52:15 -07:00
Viktor Lidholt
ac6cda4d20 Removes some of the artifacts from textured lines 2015-09-23 08:33:48 -07:00
Viktor Lidholt
53f83f795e Adds method for calculating intersection between two lines 2015-09-23 08:31:04 -07:00
Adam Barth
436fb0ee5f Add support for multichild widgets to fn3 2015-09-22 17:52:40 -07:00
Adam Barth
de70bd950b Merge pull request #1291 from abarth/fn2_tag_widgets
Add TagWidget to fn3
2015-09-22 16:14:36 -07:00
Adam Barth
fb4a87ad68 Add ParentDataWidget and InheritedWidget to fn3 2015-09-22 16:07:27 -07:00
Hans Muller
d9cb525146 bumped newton to version 0.1.3 2015-09-22 16:00:21 -07:00
Hans Muller
0597d8acb8 Merge pull request #1286 from HansMuller/limit_scrolling_animation
Currently, fling scrolls animate far too long after the display has effectively stopped moving. Use the ScrollSimulation's tolerance property to stop the scrolling roughly when the display stops changing.
2015-09-22 15:48:24 -07:00
Hixie
5fb2cb3297 Fix warnings and build errors
Fixes errors from #1285 and #1281.
2015-09-22 15:32:41 -07:00
Hans Muller
abd7059ffa Set simulation tolerance field 2015-09-22 15:08:13 -07:00
Hans Muller
720a913e10 replace endDistance and endVelocity parameters with tolerance 2015-09-22 14:50:27 -07:00
Hans Muller
461b191487 Added velocity and distance thresholds to ScrollSimulation, ScrollBehavior 2015-09-22 13:34:57 -07:00
Hixie
b73b06e4ad fn3: Add a binding for fn3 and sky.
- I extracted the BuildScheduler into a separate binding.dart file.
- Various changes to expose private members that are needed by
  binding.dart.
- Registering the render objects for event dispatch.
- Convert the tests to use the new binding mechanism.

This doesn't yet have a RenderView or event handling.
2015-09-22 12:30:37 -07:00
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 Hickson
61d0ca7779 Merge pull request #1280 from Hixie/block
Fix scrolling of Block.
2015-09-22 10:43:22 -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
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
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