Commit graph

15125 commits

Author SHA1 Message Date
Viktor Lidholt 80f8435916 Merge pull request #273 from vlidholt/master
Optimizations for Particle Systems
2015-07-24 13:04:34 -07:00
Viktor Lidholt 45399c7a53 Fixes formatting and abstraction in GameMath 2015-07-24 12:59:08 -07:00
Adam Barth 544e19d48c Merge pull request #265 from abarth/workbench
Create //sky/packages/workbench
2015-07-24 12:50:51 -07:00
Viktor Lidholt ab2b791866 Optimizes ColorSequence 2015-07-24 12:39:02 -07:00
Jim Simon 3089686eeb Converted examples to libraries
Converted demo launcher example to library

Converted fitness example to library

Converted hello world example to library

Converted mine digger example to library

Converted stocks example to library
2015-07-24 12:27:27 -07:00
Viktor Lidholt 2e2331ab5e Merge branch 'master' of github.com:domokit/sky_engine
Conflicts:
	sky/sdk/example/game/lib/particle_system.dart
2015-07-24 12:17:18 -07:00
Viktor Lidholt 53c66a5f4c Optimizations to particle systems. Uses single instance of Random and faster atan2 function. 2015-07-24 12:14:22 -07:00
Eric Seidel 4f8de2ee82 Merge pull request #271 from eseidelGoogle/draw_atlas
Use Skia's drawAtlas now that we've rolled to a newer Skia
2015-07-24 11:27:15 -07:00
Hans Muller 9ac347da62 Dismissable animation simplifications; added backgrounds to CardCollection cards 2015-07-24 11:15:37 -07:00
Eric Seidel 7a1e3bb389 Use Skia's drawAtlas now that we've rolled to a newer Skia
Roll was ff8bbe4e1674ae57f2ea3a2841a37a9c099beac8
This is another step in fixing #138

R=viktork@google.com
2015-07-24 11:11:30 -07:00
Collin Jackson 9f6fc78ceb Fix the new item dialog for fitness app 2015-07-24 10:27:16 -07:00
Adam Barth a3b44a566c Create //sky/packages/workbench
The workbench package exists to pull in pub packages from both pub.dartlang.org
and from the source tree (using dependency overrides). The idea is that
workbench will reflect a typical Sky developer's environment so that we can use
the same tools as a typical sky developer by running them with the workbench as
the cwd.
2015-07-23 22:20:07 -07:00
Adam Barth 08a64a92f8 Roll version 2015-07-23 21:46:26 -07:00
Adam Barth bb2f54bb91 Use shelf instead of http_server
This patch switches sky_server.dart to use shelf rather than http_server.
2015-07-23 19:51:03 -07:00
Adam Barth cb8e1b58cb Add back some DEPS
Turns out if we don't have these deps, nothing builds these packages.
2015-07-23 19:07:20 -07:00
Adam Barth edd9ddccb4 Remove the magic from the Sky package
We now just symlink the lib directory into the packages directory in the output
directory.
2015-07-23 16:52:32 -07:00
Adam Barth 40913d0363 Add sky_services pub package
This package contains the mojom.dart files we generate from the sky_engine
repository.
2015-07-23 15:51:37 -07:00
Adam Barth e2db025317 Merge pull request #250 from abarth/material_package
Move Material Design Icons to their own package
2015-07-23 14:57:52 -07:00
Adam Barth 1892149897 Move Material Design Icons to their own package
After this patch, we use pub to manage versioning and fetching the material
design icons.
2015-07-23 14:54:59 -07:00
Viktor Lidholt 2bccb1890d Merge pull request #249 from vlidholt/master
Adds test case for drawAtlas in games
2015-07-23 14:44:37 -07:00
Viktor Lidholt f3e51d9f05 Adds test case for drawAtlas in games 2015-07-23 14:39:39 -07:00
Ian Hickson 9ac6830770 Merge pull request #244 from Hixie/focus
Add a dialog to the address book app to test scoped focus.
2015-07-23 14:19:42 -07:00
Adam Barth 1570b17237 Merge pull request #245 from abarth/sky_engine_package
Add a sky_engine package to contain the dart:sky SDK extensions
2015-07-23 14:18:05 -07:00
Adam Barth dfce6c7191 Add a sky_engine package to contain the dart:sky SDK extensions 2015-07-23 14:17:35 -07:00
Hixie 2694d67551 Add a dialog to the address book app to test scoped focus. 2015-07-23 14:06:12 -07:00
Adam Barth 8a64baca3d Merge pull request #241 from abarth/sky_shell_apk
Create a SkyShell.apk
2015-07-23 13:32:15 -07:00
Viktor Lidholt 765881f264 Merge pull request #223 from vlidholt/master
Adds custom play button with texture to demo game
2015-07-23 13:30:25 -07:00
Viktor Lidholt 9a834384f1 Adds custom play button with texture to demo game 2015-07-23 13:27:17 -07:00
Adam Barth c14ba33667 Create a SkyShell.apk
This CL introduces a SkyShell.apk that is separate from the SkyDemo.apk that we
upload to the store to show our demos.  The SkyShell.apk is just an empty shell
that can run Sky applications on Android.
2015-07-23 13:26:01 -07:00
Hixie 4e2893802d Remove the scheduleBuild() API.
I've noticed an anti-pattern emerge where people call scheduleBuild()
when they think they've changed enough state that they should rebuild,
instead of just wrapping their changes in setState(). This leads to
them missing state changes, having extraneous scheduleBuild() calls,
and other similar bugs.

By removing scheduleBuild(), the only way to actually schedule a build
now is to call setState(), and hopefully that'll make it much clearer
that you're only supposed to do this when you change state.
2015-07-23 12:55:48 -07:00
Hixie eb90899aab Track global keys globally.
Assert that there are no duplicates.
Export GlobalKey from basic.dart, so that people don't have to import widgets.dart just for that.
Fix the "initialFocus" feature which actually didn't work.
2015-07-23 11:10:04 -07:00
Adam Barth 7224089c9f Merge pull request #230 from abarth/use_dart_http_server
Switch sky_tool to use a Dart-based HTTP server
2015-07-23 09:28:40 -07:00
Eric Seidel 8998132d94 Add C++ based support for drawAtlas
This is supposed to make Viktor's game faster, but it's not clear
to me that it actually does.  I've left the code
using the dart version of drawAtlas for now until Viktor can
verify that it looks correct.

I also added a wrapper for SkFilterQuality in the process of
debugging SkCanvas.drawAtlas since all drawAtlas examples
in Skia use FilterQuality.low.  The bug which blocked me for
so long turned out to be that SkCanvas.drawAtlas doesn't
draw anything if antialiasing is turned on.

Issue #138.

R=abarth@google.com
2015-07-23 09:25:10 -07:00
Hixie 144fe36e25 RenderConstrainedBox was ignoring its additional constraints for its intrinsic size logic when it had no child. 2015-07-23 09:06:34 -07:00
Adam Barth 5aeff1ac1d Merge pull request #233 from abarth/fix_analyzer
Fix analyzer warnings
2015-07-23 08:56:10 -07:00
Adam Barth 59798b982e Fix analyzer warnings
- Remove unused imports
 - Remove unused, broken constructor for MineDiggerApp
2015-07-23 08:54:51 -07:00
Hixie 3aa0437ff2 Rename defaultFocus to initialFocus. 2015-07-23 08:43:40 -07:00
Eric Seidel 4da276710f Focus support.
This patch provides a class to manage focus, Focus, and a class to
manage ownership of the keyboard, KeyboardHandle.

Inherited (in widgets.dart) is adjusted to support subclasses that
need to copy state from instance to instance.

A GlobalKey key type is introduced that is basically the same as
UniqueKey. Component classes that need a globally-unique key can
specify that their 'key' constructor argument is a GlobalKey.

Focus
-----

You can use `Focus.at(this)` to determine if you, a Component, are
currently focused.

You can use `Focus.moveTo(this)` to take the focus or give it to a
particular component.

For this to work, there has to be a Focus class in the widget
hierarchy.

Currently, there can only be one Focus class, because nested scopes
aren't supported. We should add support for that in a future patch.
See issue #229.

KeyboardHandle
--------------

Instead of directly interacting with the keyboard service, you now ask
for a KeyboardHandle using `_keyboard.show(client)`. This returns a
KeyboardHandle class. On that class, you can call `handle.release()`
when you want to hide the keyboard. If `handle.attached` is still
true, and you need to reshow the keyboard after the user hid it, then
you can can `handle.showByRequest()`.

The point of this is that the `keyboard.show()` method maintains the
invariant that only one KeyboardHandle is live at a time.

There are some issues with the keyboard service that I filed as a
result of doing this patch: #226 #227
2015-07-23 08:43:40 -07:00
Adam Barth 3331d44f2d Don't try to access the network in Stocks test
Accessing the network created a race condition that would sometimes cause other
tests to fail.
2015-07-23 08:39:42 -07:00
Adam Barth 278e0ab29d Switch sky_tool to use a Dart-based HTTP server
The Python HTTP server was caching too agressively. Instead, use an HTTP server
written in Dart from the sky_tools package.
2015-07-23 00:22:41 -07:00
Adam Barth 6d8255ff04 Roll version 2015-07-23 00:14:16 -07:00
Adam Barth 0365fefaca Let sky_server follow links outside of the current directory 2015-07-23 00:13:51 -07:00
Adam Barth 470186cea5 A little bit more README text 2015-07-22 23:46:46 -07:00
Adam Barth 386f6c545b Add an environment dependency 2015-07-22 23:45:05 -07:00
Adam Barth 041275e80c Add a basic HTTP server for Sky 2015-07-22 23:42:22 -07:00
Ian Hickson 3d41fb8a89 Merge pull request #215 from Hixie/crash-settings
Fix the crash when going to settings after showing the popup menu.
2015-07-22 18:16:08 -07:00
Hixie bf33f1fcc6 Make center part of toolbar optional. 2015-07-22 15:57:51 -07:00
Hans Muller 571a92ce3b Dismissable provides intrinsic support for resize animation 2015-07-22 12:55:45 -07:00
Viktor Lidholt 35b5ecf873 Merge branch 'master' of github.com:domokit/sky_engine 2015-07-22 10:37:55 -07:00
Viktor Lidholt 34e1268f1f Adds scoring and level up in game demo 2015-07-22 10:37:28 -07:00
Collin Jackson eced8b3cbd Fix build 2015-07-22 10:28:43 -07:00
Collin Jackson ad569a2393 Merge remote-tracking branch 'dk/master' into meal
Conflicts:
	sky/sdk/example/fitness/lib/feed.dart
2015-07-22 10:21:48 -07:00
Hixie a50b065197 Fix the crash when going to settings after showing the popup menu.
If your constraints are tight when you get laid out, you don't get a
relayout subtree root.

If you don't have a relayout subtree root, and you get marked dirty,
you go through layoutWithoutResize() rather than layout(), so we don't
get a parentUsesSize.

If you're not dirty and your constraints didn't change, layout() skips
your layout.

So then if your initial layout had parentUsesSize:true, and then you
got marked dirty directly, you would set your size with
parentCanUseSize=false, and then later if your parent tried to lay you
out then read your size, it would crash because your size wasn't set
up to allow you to get your size.

The fix is to actually remember the last setting of parentUsesSize,
even in the case of the constraints being tight and you later being
marked as needing layout directly.
2015-07-22 10:10:58 -07:00
Hixie 4dacd69b41 Don't set keys on images, etc, pre-emptively.
In theory, before, if you had the same image twice in a scrolling container, you'd get an assertion with no way around it.
This makes those nodes not bother making keys by default, which is cheaper and more correct.
2015-07-22 10:05:19 -07:00
Adam Barth 3d0b82eb86 Use a null LayoutCallbackBuilderHandle in Release 2015-07-22 10:02:00 -07:00
mpcomplete 2c84154b75 Merge pull request #211 from mpcomplete/rm.builder.3
Make SnackBar animate itself.

This introduces a bit of a regression - the FloatingActionButton no longer animates. I'm not sure yet how to animated the FAB along with the SnackBar. Maybe some notion of anchoring a node to another.

Also remove last use of AnimationBuilder.
2015-07-22 12:29:57 -04:00
Hixie 74575775bd Introduce an explicit Key type.
This fixes some theoretical bugs whereby we were using hashCode to try
to get unique keys for objects, but really we wanted object identity.
It also lays the groundwork for a new GlobalKey concept.

I tried to keep the impact on the code minimal, which is why the "Key"
constructor is actually a factory that returns a StringKey. The code
has this class hierarchy:

```
   KeyBase
    |
   Key--------------+---------------+
    |               |               |
   StringKey    ObjectKey       UniqueKey
```

...where the constructors are Key and Key.stringify (StringKey),
Key.fromObjectIdentity (ObjectKey), and Key.unique (UniqueKey).

We could instead of factory methods use regular constructors with the
following hierarchy:

```
   KeyBase
    |
   LocalKey---------+---------------+
    |               |               |
   Key      ObjectIdentityKey   UniqueKey
```

...with constructors Key, Key.stringify, ObjectIdentityKey, and
UniqueKey, but I felt that that was maybe a more confusing hierarchy.
I don't have a strong opinion on this.
2015-07-22 09:14:06 -07:00
Viktor Lidholt bb0c8bb13e Merge pull request #202 from vlidholt/master
Fixes issues with invalidating matrix for SpriteBox & adds HUD to demo game
2015-07-22 09:01:39 -07:00
Viktor Lidholt 6a6567d776 Fixes formatting and removes redundant code in sprites 2015-07-22 08:59:14 -07:00
Matt Perry 371ef4542b Material animates over 200ms 2015-07-22 11:55:38 -04:00
Matt Perry b31e06a5d6 Make SnackBar animate itself. 2015-07-22 11:53:57 -04:00
Matt Perry 839e997e78 rebase 2015-07-22 11:52:34 -04:00
Ian Hickson b215e4d6c0 Merge pull request #205 from Hixie/minedigger
Many code improvements to Mine Digger.
2015-07-22 08:23:55 -07:00
Adam Barth 136b2709c8 Merge pull request #208 from abarth/fix_type
Fix type error found by dartanalyzer --strong
2015-07-22 07:29:32 -07:00
Adam Barth 9fd0be564b Update README.md
Grammar
2015-07-21 22:49:00 -07:00
Adam Barth bb8b9c611c Fix type error found by dartanalyzer --strong
We were declaring that the function passed to setState should return a
Function. In reality, we want the function to return void (and everyone calls
it with a function that returns void).
2015-07-21 22:42:04 -07:00
Adam Barth 73123a3c08 Merge pull request #201 from eseidelGoogle/fuzz_crashes
Fix 2 crashes found by Hixie's fuzzer.
2015-07-21 19:59:24 -07:00
Adam Barth 516e6b6e27 Update README.md 2015-07-21 19:56:57 -07:00
Adam Barth f6eb26c0ef Merge pull request #207 from abarth/fix_sky_tool
Update sky_tool now that sky:// isn't a thing
2015-07-21 19:53:59 -07:00
Adam Barth 665f6c33a4 Update sky_tool now that sky:// isn't a thing
Instead, just use a normal http URL.
2015-07-21 19:53:25 -07:00
Adam Barth 0a427a0a86 Update README.md 2015-07-21 19:50:44 -07:00
Adam Barth be8b92cd84 Update README.md 2015-07-21 19:41:13 -07:00
Adam Barth 9ee93ebad8 Roll Sky package version 2015-07-21 17:29:58 -07:00
Hixie 4d2902f219 Many code improvements to Mine Digger.
Text styles are now a global constant instead of being initialised dynamically.
There are now sufficient text styles for 8 mines around a square.
I coallesced Game and MineDiggerApp.
Used an enum instead of constants for the cell state.
Used setState() instead of scheduleBuild().
Used an O(N) algorithm for mine laying instead of the previous potentially-never-ending algorithm.
Moved the listener on the cells to the app, so that the logic survives a rebuild.
Various other minor changes.
2015-07-21 17:24:51 -07:00
Collin Jackson 1f768ce2ba First pass at adding meal tracking to fitness app 2015-07-21 17:13:00 -07:00
Viktor Lidholt 972417f54e Merge branch 'master' of github.com:domokit/sky_engine 2015-07-21 16:46:14 -07:00
Viktor Lidholt 271812259b Fixes issues in demo game and adds heads up display 2015-07-21 16:45:53 -07:00
Viktor Lidholt b26bae8a45 Fixes issues with invalidating matrix for SpriteBox 2015-07-21 16:42:51 -07:00
Eric Seidel 8f85f34d27 Fix 2 crashers found by Hixie's fuzzer.
The first one is that we weren't setting up a
FontCachePurgePreventer during drawText.  It's not clear
that this is the correct fix, since Blink doesn't have
this FontCachePurgePreventer here either, but it's also
possible that they would hit this same ASSERT and just
not care (since ASSERTs are disabled on clusterfuzz).

The second fix is making ExceptionState actually track
whether it has thrown an exception or not. The c++ code
was depending on this working in order to return early
from dom functions and not crash!

R=abarth@google.com
2015-07-21 16:29:04 -07:00
Hixie 6d304c03ac Remove redundant operator== and hashCode functions in card example.
It turns out that we aren't really using these. The identity logic is sufficient.

Also, add some asserts for a crash I had once but couldn't reproduce, in case that helps catch it next time.
2015-07-21 15:26:54 -07:00
Hixie 9da399b0e1 Rationalise usage of keys in navigator.dart.
Route (named routes) no longer have a key, and have their own storage for their names.
RouseState no longer has a key, and uses an owner field pointing to a StatefulComponent instead.
As such, RouteBase no longer has a key.

HistoryEntry no longer uses a global int to ensure uniqueness.

Propagated this to stocks app.
2015-07-21 14:58:48 -07:00
Adam Barth ed82572205 Roll version to 20 2015-07-21 14:56:54 -07:00
Adam Barth de717bafe9 Images don't appears in VariableHeightScrollables
When we build widgets during layout we weren't notifying those widgets that
they were mounted. Now we notify mount status changes when exiting build phases
inside layout.

Fixes #176
2015-07-21 14:42:21 -07:00
Adam Barth 6b748e653e Fix more analyzer warnings 2015-07-21 13:59:18 -07:00
Adam Barth 53efc748e1 Merge pull request #191 from abarth/image_height_width
Separate width and height parameters for Image widgets
2015-07-21 13:54:56 -07:00
Adam Barth d5f3168982 Merge pull request #192 from abarth/fix_warnings
Fix analyzer warnings
2015-07-21 13:52:37 -07:00
Adam Barth 3ac4c6c998 Fix analyzer warnings 2015-07-21 13:51:27 -07:00
Adam Barth 012b915704 Separate width and height parameters for Image widgets
This change makes it easier to defined only the width or the height of an image
and let the other value be filled in from the image's intrinsic aspect ratio.

Fixes #175
2015-07-21 13:46:10 -07:00
mpcomplete 4a0bdf1bba Merge pull request #188 from mpcomplete/animated_value
Renamed AnimatedType to AnimatedValue
2015-07-21 13:45:50 -07:00
Viktor Lidholt 1eff5b8c94 Merge pull request #184 from vlidholt/master
Updates sprite widget to handle changes to renderbox
2015-07-21 13:32:22 -07:00
Viktor Lidholt 6c510fb558 Minor formatting fixes 2015-07-21 13:30:30 -07:00
Matt Perry 0fd3302ebe Renamed AnimatedType to AnimatedValue 2015-07-21 12:55:16 -07:00
Hixie 310412fde5 Minor style changes around demo cards. 2015-07-21 12:18:10 -07:00
Hixie f3e07210b0 Make typography.white and typography.black constants. 2015-07-21 12:13:10 -07:00
Viktor Lidholt 90363ee956 Merge branch 'master' of github.com:domokit/sky_engine into HEAD 2015-07-21 11:30:52 -07:00
Viktor Lidholt 1b4923a2a6 Adds main screen to game and graphics for game UI 2015-07-21 11:30:17 -07:00
Hans Muller df88d38b29 Merge pull request #181 from HansMuller/cards-animate-back
Dismissable: animate "snap back", only call dismiss() once
2015-07-21 11:27:30 -07:00
Viktor Lidholt 88afaefbaf Updates sprite widget to handle changes to renderbox 2015-07-21 11:26:57 -07:00
Hans Muller d8a4a099e0 animate "snap back", only call dismiss() once 2015-07-21 11:20:01 -07:00
Hixie ddef380875 This demo is a fuzzer of sorts, testing in particular our text layout system and painting. 2015-07-21 10:56:08 -07:00
Adam Barth 646ff43f9b Iterate on build_sky_apk.dart 2015-07-21 10:10:36 -07:00
Hans Muller f72d61bf5f manage listener with on,didMount 2015-07-21 08:42:14 -07:00
Hans Muller 3f70271d9b manage listener with on,didMount 2015-07-21 08:41:58 -07:00
Hans Muller b0e0e65c09 Fixed several typos 2015-07-21 08:25:49 -07:00
Ian Hickson 4d2e8de287 Update README.md 2015-07-20 22:48:47 -07:00
Ian Hickson 4af1d34c33 Update README.md
Try to clarify initial execution.
2015-07-20 22:48:12 -07:00
Adam Barth 7af81f208a Fix typos in RenderImage
This function took innerConstraints as an argument but used constraints internally.
2015-07-20 20:04:03 -07:00
Adam Barth 688fb26ae3 Add a first draft of build_sky_apk.dart 2015-07-20 17:22:22 -07:00
Adam Barth 3167629990 Add README.md and LICENSE 2015-07-20 17:20:31 -07:00
Collin Jackson 40b2a4e53f Merge pull request #166 from collinjackson/fitness
Measurement tracking for fitness app.

There is an issue with the input control that prevents actually creating a measurement. Working on this with eseidel.

R=eseidel
2015-07-20 16:25:19 -07:00
Collin Jackson d8cbbc68f3 Add basic measurement functionality to fitness app 2015-07-20 16:20:59 -07:00
Hans Muller c3a8df1d68 Merge pull request #122 from HansMuller/shrinking-card
Card Collection dismiss animation
2015-07-20 15:52:09 -07:00
Hans Muller b954e020c6 Make it possible to identify BlockViewport children whose size or type has changed 2015-07-20 15:41:21 -07:00
Hixie 94a4b97248 Fix typo "natvies" in the build system. 2015-07-20 15:25:59 -07:00
Collin Jackson 84da5238da Merge pull request #137 from collinjackson/launcher
Tweaks to launcher
2015-07-20 14:28:16 -07:00
Collin Jackson af7c5f8e5a Tweaks to launcher 2015-07-20 11:20:47 -07:00
Collin Jackson e90d0ec807 Merge remote-tracking branch 'upstream/master' into baseline5
Conflicts:
	sky/sdk/lib/rendering/flex.dart
2015-07-20 10:26:06 -07:00
Collin Jackson 8bf1f86a24 abarth feedback 2015-07-20 10:24:52 -07:00
Collin Jackson 8e68805a72 Merge pull request #123 from collinjackson/baseline6
Support for non-alphabetic baselines
2015-07-20 10:18:15 -07:00
Adam Barth 41695fb1b5 More typos 2015-07-18 12:48:16 -07:00
Adam Barth 44e0d42c12 Another typo 2015-07-18 12:46:18 -07:00
Adam Barth 7094e17f65 Fix typos in README.md 2015-07-18 12:45:41 -07:00
Adam Barth b5347ce556 Improve the READMEs further 2015-07-18 12:34:40 -07:00
Adam Barth 1b440cc68b Improve developer-facing READMEs
Also, stop pushing the SDK to sky_sdk now that this repo exists.
2015-07-18 12:22:30 -07:00
Collin Jackson 4604021dd3 Support for non-alphabetic baselines 2015-07-17 17:06:08 -07:00
Collin Jackson e3d5c2b25e Draw debug rects when flex overflows 2015-07-17 17:04:59 -07:00
Collin Jackson e1aa0431be Merge pull request #110 from collinjackson/baseline2
Track overflow during flex layout and fix stocks row

R=hixie
2015-07-17 17:03:52 -07:00
Collin Jackson 62fc9d8515 Track overflow during flex layout 2015-07-17 16:13:15 -07:00
Collin Jackson 65d47af75c Fix layout of stocks row 2015-07-17 16:10:10 -07:00
Adam Barth 87c56759cc Merge pull request #99 from abarth/fix_symlink
Fix build issues related to symlink.py
2015-07-17 15:44:50 -07:00
Adam Barth fbf9df582d Fix build issues related to symlink.py
There are actually two uses cases for symlink.py. This CL restores
//build/symlink.py to match the version in Chromium and adds a new version in
////sky/build/symlink.py that works properly for the material-design-icons.
2015-07-17 15:41:40 -07:00
Collin Jackson c80f1c7c31 Merge pull request #95 from collinjackson/baseline
Fix #57 Flex needs to understand baselines
2015-07-17 14:29:29 -07:00
Collin Jackson 695a13583b Update example 2015-07-17 14:29:05 -07:00
Collin Jackson 07f9c95efc Fix comments 2015-07-17 12:49:37 -07:00
Collin Jackson 7a7110b2a0 Fix #57 Flex needs to understand baselines 2015-07-17 12:46:51 -07:00
Adam Barth f3d913c514 Refactor Material animation to use AnimatedContainer
The idea is that AnimatedContainer is a drop-in replacement for Container that
provides implicit animations when its properties change.

R=mpcomplete@google.com
2015-07-17 12:23:46 -07:00
Collin Jackson d6232c3c71 Remove unused import 2015-07-17 10:18:32 -07:00
Collin Jackson 0e129498c0 Merge pull request #86 from collinjackson/avoid_building
Navigator improvements, avoid building invisible routes

R=abarth
2015-07-17 09:54:34 -07:00
Collin Jackson f9697a5cd7 Fix issue #34 Clicking on "Autorefresh" menu item does not click checkbox 2015-07-17 09:48:49 -07:00
Collin Jackson cc29757eee Navigator improvements, avoid building invisible routes 2015-07-17 09:38:22 -07:00
Collin Jackson fd744a1244 Use unique integers as the key for history items to prevent collisions 2015-07-17 09:05:46 -07:00
Collin Jackson 99346d00c1 abarth feedback 2015-07-16 17:39:36 -07:00
Collin Jackson a54f7cf265 Fix bug when having more than 2 routes 2015-07-16 17:36:45 -07:00
Collin Jackson e075988fe0 Make example look more beautiful 2015-07-16 17:36:25 -07:00
Collin Jackson 38cbf9b5d3 Support for settings fly-in animation 2015-07-16 17:22:20 -07:00
Collin Jackson b33edf28c6 more updates 2015-07-16 16:43:46 -07:00
Collin Jackson 073f9e3d5c README updates 2015-07-16 16:39:44 -07:00
Eric Seidel e70a5c94e5 Roll versions in perparation for another APK release.
Also fixed roll_versions to no longer roll mojo paths
since those are not part of the sky_engine repository.

R=abarth@google.com
2015-07-16 15:42:57 -07:00
Hixie a77a9c18b2 Remove EventTarget, and subsequent fallout.
The primary goal of this change was to remove EventTarget from the
sky_engine C++ code. Since EventTarget is so core to the entire event
system that sky_engine was based on, this is a rather invasive change.
As such, it had some knock-on effects. I deleted some of the files
that were affected, and cauterised the remainder.

In many cases, a file would depend on another file that it didn't
include directly, but instead included indirectly via another file
that I deleted. When this happened, if the features that this broke
were obsolete, I sometimes just removed the features instead.

Specifically:
- removed EventTarget
- removed EventQueue, since without a target, what's a queue going to
  do?
- same with EventDispatch*
- removed ExecutionContext, since it had an EventQueue and nothing
  else it did was relevant to Sky anymore
- removed ActiveDOMObject, which was all about ExecutionContexts
- removed ContextLifecycleNotifier since it dependend on
  ExecutionContext and ActiveDOMObject
- removed the other Lifecycle classes for consistency, and replaced
  them with four booleans in the Document class
- removed some of the attributes that are no longer relevant from
  IDLExtendedAttributes (ConstructorCallWith and
  CallWith=ExecutionContext)
- removed the Document member on DOMDartState since we never set it to
  anything but null.
- removed BuiltinSky::InstallWindow since it relied on the Document
  member of DOMDartState
- removed EventHandler, EventListener, and mentions of those in
  various binding scripts
- removed NewEventHandler, since we're not using that either
- removed the following interfaces from the Sky Dart API:
  - EventTarget
  - EventListener (since without a target, there's no way to listen)
  - FocusEvent (since it's only member was an EventTarget)
  - HashChangeEvent (mostly by accident, but it's defunct anyway)
  - FontFace (it used ConstructorCallWith=ExecutionContext)
- changed the following interfaces of the Sky DART API:
  - MediaQueryList is no longer an EventTarget
  - Node is no longer an EventTarget
  - Document no longer has defaultView (depended on
    DOMDartState's document)
  - DocumentFragment, Element, Range, and Text no longer have a
    constructor (they all depended on DOMDartState's document, which
    is now gone)
  - Event lost its EventTarget members and path.
  - Window lost its WindowTimers partial interface (it used
    EventTarget and ExecutionContext a lot)
- removed numerous hacks in the bindings around features that are now
  gone, like addEventListener
- removed a bunch of console logging code, since that relied on
  ExecutionContext
- cauterised the wound in FontFace.cpp by removing constructors and
  methods that called now-removed features
- same with MediaQuery and friends
- same with some editor features and focus-related features
- same with Document
- removed DOMTimer classes since they use ExecutionContexts
2015-07-16 14:40:10 -07:00
Collin Jackson 3501bb6359 center the hello world text so it isn’t covered up by the status bar 2015-07-16 14:11:12 -07:00
Matt Perry c491ad7cbe Add forces.dart 2015-07-16 13:09:30 -07:00
Matt Perry 7724dc7587 apply.patch 2015-07-16 12:34:11 -07:00
Collin Jackson 633b65010c After running filter-branch, move root directory into sky/ 2015-07-16 11:54:25 -07:00
Chinmay Garde 1ad857b53b Allow explicitly setting tolerances on simulations 2015-07-14 16:00:00 -07:00
Adam Barth 1f1cd6c279 Increase the simulation epsilon
We don't need to compute simulations out to that many decimal places because
we're working in pixels.

R=chinmaygarde@google.com
2015-07-10 16:34:13 -07:00
Chinmay Garde be7e02851a Add test to verify that composite scroll simulation ends correctly
even if the spring was never initialized.
2015-07-10 16:07:59 -07:00
Chinmay Garde 1633ac7f12 Use the more concise syntax for initialization of variables in the constructor 2015-07-08 18:15:18 -07:00
Chinmay Garde 7b77043eba Newton: Address initial code review concerns 2015-07-08 17:56:14 -07:00
Chinmay Garde d29a0b526b Address initial code review concerns 2015-07-08 16:40:51 -07:00
Chinmay Garde 99dc91eb36 Add bulk remove options 2015-07-08 12:38:22 -07:00
Chinmay Garde e933565993 Add bulk edit update options to the solver 2015-07-08 10:39:17 -07:00
Chinmay Garde 149a2ca1f8 Get rid of the return type decl on the equality operator override on EquationMember 2015-07-08 10:38:42 -07:00
Chinmay Garde e0f38529ed == operator override on expression returns a constraint 2015-07-07 13:19:36 -07:00
Chinmay Garde be5e52bc7c Add build status and coverage badges 2015-07-06 14:31:21 -07:00
Chinmay Garde fc098d8c65 Rename concrete simulation subclasses 2015-07-06 14:11:41 -07:00
Chinmay Garde 9932e9f03a Test kinetic scrolling group simulation 2015-07-06 14:03:10 -07:00
Chinmay Garde c3aaf8aa33 Test individial spring types 2015-07-06 13:30:53 -07:00
Chinmay Garde ab7a6dd6c2 Add accessors for spring type 2015-07-06 12:48:52 -07:00
Chinmay Garde bcf1f8d05e Test gravity 2015-07-06 12:33:21 -07:00
Chinmay Garde 30965c0984 Test Friction simulation 2015-07-06 12:19:37 -07:00
Chinmay Garde 8c91b9b7c7 Implement simulation groups for kinetic scrolling 2015-07-06 10:57:26 -07:00
Chinmay Garde 5a439792f1 Non composite simulations: Friction, gravity, spring 2015-07-01 18:07:25 -07:00
Chinmay Garde 1ad945f897 Make the constant member value final 2015-07-01 12:26:46 -07:00
Chinmay Garde a223491d00 Equality override on equation member returns a constraint 2015-07-01 12:26:33 -07:00
Chinmay Garde e66e88834e Parameter contexts are non-final 2015-06-30 16:49:15 -07:00
Chinmay Garde 704d0174e0 Solver.flush update returns the set of context associated with parameters in play 2015-06-30 14:05:52 -07:00
Chinmay Garde 4568b088e0 Solver.flushParameterUpdates returns the a collection of updated parameters 2015-06-29 15:51:29 -07:00
Chinmay Garde df2eb202cc Minor: A slightly more contrived test case to verify contraint priorities 2015-06-26 12:21:06 -07:00
Chinmay Garde e65fd76ead Since params are usually created to be edited later, make the initial value optional 2015-06-26 12:20:02 -07:00
Chinmay Garde eedbb4f167 Add a simple test for the toString() override so that the coverage
tool is not sad
2015-06-25 18:13:56 -07:00
Chinmay Garde d8d07a31dd Add tests edit constraints 2015-06-25 17:28:00 -07:00
Chinmay Garde 97cd09d2a1 Avoid adding implicit constraints for edit variables at required priority 2015-06-25 17:27:42 -07:00
Chinmay Garde 49d14caa69 Make the midpoints test pass. Fixes incorrect Row.reverseSign 2015-06-25 17:07:15 -07:00
Chinmay Garde 20908034d5 Make constraint priority setup more expressive 2015-06-25 16:24:21 -07:00
Chinmay Garde 2f3e5aa70b Add toString() overrides to internal solver members 2015-06-25 14:30:37 -07:00
Chinmay Garde 9d075adabb Minor: Add tests to check for addition of multiple constraints 2015-06-25 12:20:10 -07:00
Chinmay Garde a029c93ed1 Remove the << overload on solver. Operator precendence rules made it awkward to use anyway 2015-06-25 12:11:00 -07:00
Chinmay Garde 882a17f75b Minor: Add more tests 2015-06-25 11:45:47 -07:00
Chinmay Garde 8be3c640cc Minor: Refactor -> Rename internal private methods in the solver 2015-06-25 10:25:33 -07:00
Chinmay Garde 7dcd8115c3 Avoid exposing internal classes from the cassowary library 2015-06-24 18:18:58 -07:00
Chinmay Garde 891085b74b Allow updating external variables from the solver 2015-06-24 18:03:21 -07:00
Chinmay Garde d4a67499e9 Implement Solver.suggestValue 2015-06-24 17:53:41 -07:00
Chinmay Garde 436f272a09 Avoid using variables as equation members 2015-06-24 16:48:02 -07:00
Chinmay Garde 9ea8abd5af Allow constraint creation from multiplication and division when at least one argument is a constant expression 2015-06-24 14:52:46 -07:00
Chinmay Garde 5137e03c9d Add support for updating edits 2015-06-24 13:23:31 -07:00
Chinmay Garde 8187c6852b Allow removal of constraints from the solver 2015-06-24 12:41:54 -07:00
Chinmay Garde 9beb286180 Account for the result of optimization when adding constraints 2015-06-23 18:07:56 -07:00
Chinmay Garde b78b35d723 Implement addition of constraints to the solver 2015-06-23 18:01:17 -07:00
Chinmay Garde af67d08746 Minor: Add result types for known failure cases 2015-06-23 13:58:44 -07:00
Chinmay Garde 530700a8c1 Implement row.dart and some other minor utility methods 2015-06-23 13:22:48 -07:00
Chinmay Garde 306c795c21 Minor: Add stubs for the symbol and solver 2015-06-23 09:50:52 -07:00
Chinmay Garde e788fe538f Minor: Match style guide 2015-06-22 15:07:02 -07:00
Chinmay Garde 7eb8322315 Dry up multiplication and division of equation members 2015-06-22 15:02:31 -07:00
Chinmay Garde 5288d466ab Dry up incremental expression construction from constants, variable, terms and other expressions 2015-06-22 14:39:55 -07:00
Chinmay Garde a8e6ea0698 Constraints can be setup directly from non-expression via operator overrides 2015-06-22 14:31:46 -07:00
Chinmay Garde 2152de9a51 Minor: Add support for priority updates on constraints 2015-06-22 12:29:33 -07:00
Chinmay Garde f6a323620e Initial Commit 2015-06-22 10:49:09 -07:00
John McCutchan 57ec759e97 Rationalize Dart mojo and sky package structure.
NOTE: This CL appears far larger than it actually is for two reasons:

1) Many files were moved around to use the Dart package directory structure.
2) Many .dart files had to have import paths updated.

- Organize mojo/public/dart so that it uses standard Dart package layout
- Organize mojo/dart/apptest so that it uses a standard Dart package layout
- Organize sky/sdk so that it uses a standard Dart package layout
- Create a mojo/testing package (used by unittests)
- Introduce the 'dart_pkg' gn rule which populates gen/Config/dart-pkg
- All internally vended Dart packages must have a corresponding dart_pkg rule
- It is now possible to use dependency_overrides: in pubspec.yaml to mix internal and external package dependencies (enables analyzer, editor, webstorm usage for internal developers).
- Package root for dart content handler ends with "packages/"
- Imports of mojo package uris no longer need the "public/dart"
- mojo/public/tools/dart_package.py is a clone of mojo/public/tools/gn/zip.py
- Sky tests no longer run 'deploy_sdk' script.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132063007
2015-05-18 14:41:39 -07:00
Colin Blundell 3a138caad2 Create wrapper script around mojom's generate.dart in the Sky package.
This CL does the following:
- Moves mojom's generate.dart from bin/ to lib/ to make it available for use
  by a wrapper scripts in the Sky package, thus avoiding all consumers of Sky
  needing to directly depend on mojom to be able to call
  "pub run mojom:generate".
- Adds a sky->mojom pub dependency and creates a wrapper script around mojom's
  generate.dart in the Sky package.
- Augments the Sky README to explain the usage of this script.

R=eseidel@chromium.org, sethladd@google.com

Review URL: https://codereview.chromium.org/1136503002
2015-05-13 11:48:47 +02:00
Eric Seidel 8c50d9339c Update SDK README to discuss about:tracing and observatory.
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1114553004
2015-04-28 12:05:46 -07:00
Eric Seidel 7edc1d7df1 Add missing include in sky_tool
Also fixed missing entry in CHANGELOG.md

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1108393003
2015-04-28 11:34:12 -07:00
Eric Seidel 3feae26683 Update CHANGELOG with recent changes to Sky's pub package
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1104093004
2015-04-27 17:01:09 -07:00
Eric Seidel 40b6b48ffd Add start-tracing and stop-tracing commands to sky_tool
This is just copy-pasted from shelldb but should work.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1112433003
2015-04-27 16:59:17 -07:00
Eric Seidel a0c375f6e3 Add a script to sky pub package to download assets
This is a fork of sky/tools/download_material_design_assets
which does not depend on depot_tools and assumes that its
right next to the assets directory instead of finding it
relative to the mojo root.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1106373002
2015-04-27 16:27:47 -07:00
Eric Seidel 9fd7ed7a93 Fix typo in sky_tool causing crash
This will require me to roll the sky pub package, sigh.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1090713002
2015-04-15 13:29:47 -07:00
Eric Seidel a7ef473367 Update CHANGELOGs for pub packages on trunk
TBR=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/1082413002
2015-04-14 16:14:31 -07:00
Eric Seidel a5bfcc7ec6 Bump the pubspec versions for Sky and Mojo
TBR=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/1073243002
2015-04-10 11:23:49 -07:00
Eric Seidel 80ee728031 Roll mojo and sky pub versions to 0.0.4
TBR=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/1074933003
2015-04-09 14:20:09 -07:00
Eric Seidel 814d87fc87 Fix sky_tool's calling of adb, and shelldb's analyze and stop
Just silly fixes needed for our 4 copies of our python run script.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1064983003
2015-04-07 15:15:56 -07:00
Adam Barth 114ebbed96 Rev Mojo and Sky pub packages
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/1038873005
2015-03-26 12:59:00 -07:00
Eric Seidel 03a2006046 Copy all of dart_sky.dart's supporting files into package:sky
Also bumped package:sky's version in prep for publishing.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1024243002
2015-03-20 14:46:58 -07:00
Eric Seidel ea62fa7d72 Make the Sky pub package include our APK and teach sky_tool to install it
I'm not sure this is the final long-term solution, but works for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1022193002
2015-03-20 14:35:14 -07:00
Eric Seidel 49a947a868 Unbreak the build by adding the sky tool
TBR=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1021933004
2015-03-20 13:59:15 -07:00
Adam Barth df9d48ac83 Make stocks-fn match the style for the Sky SDK
1) Add a pubspec.yaml.
2) Move all the code into a 'lib' directory.
3) Move the stock widgets out of the app's library.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1011023003
2015-03-17 15:08:53 -07:00
Eric Seidel 697c735740 Make mojo and sky dart packages deployable
The packages produced from this CL were deployed
as v0.0.1:
https://pub.dartlang.org/packages/sky
https://pub.dartlang.org/packages/mojo

There is still no tool included with the sky
package due to pub's inability to run anything
other than Dart:
https://code.google.com/p/dart/issues/detail?id=22877

I'm likely just going to write a dart version
of my "sky" script. :(

R=ojan@chromium.org, abarth@chromium.org

Review URL: https://codereview.chromium.org/1015833002
2015-03-17 11:09:33 -07:00