1479 Commits

Author SHA1 Message Date
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
Adam Barth
27e6381eac Update URLs after moving to the Flutter organization 2015-09-19 09:04:33 -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
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
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
Hixie
d4dd786bd7 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
682116529e 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
80b2c1732a 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
Adam Barth
94b27e7b81 Merge pull request #1234 from abarth/game_imports
SkySprites should import the public libraries
2015-09-18 12:41:11 -07:00
Hixie
1429b15780 Adjust indent in Positioned to match style guide. 2015-09-18 12:08:44 -07:00
Ian Hickson
81e0ea3551 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
490b22874a SkySprites should import the public libraries
Importing the public libraries caused a name conflict with dart:sky because we
assume people will import dart:sky into a namespace, so I've also changed
skysprites to import dart:sky into a namespace.
2015-09-18 11:19:39 -07:00
Adam Barth
62458b7b6d 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
e73bbd949e Require that you pass transitions a performance.
This fixes #1103.
2015-09-18 10:30:47 -07:00
Hixie
01778c4895 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
4467a268ce 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
499d832259 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
c0d326b17f Merge pull request #1218 from Hixie/toString
Improve debugging aids for widgets, rendering.
2015-09-17 16:27:02 -07:00
Ian Fischer
a89fdd92ce 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