Commit Graph

120 Commits

Author SHA1 Message Date
Adam Barth
3c5df69a2b Implement a floating action button in fn
R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/975913002
2015-03-03 14:05:02 -08:00
Eric Seidel
de7f8a9c2b Change fn-stocks to use a different color toolbar.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/973133002
2015-03-03 11:17:10 -08:00
Rafael Weinstein
202f99d71d Initial commit of Effen reactive framework experiment for Sky
This is just a proof of concept. If we like this direction, it will move out of the examples directory (likely re-written) and be committed in smaller pieces with unit tests and formal reviews.

TBR=abarth
BUG=

Review URL: https://codereview.chromium.org/971183002
2015-03-02 20:55:02 -08:00
Adam Barth
6f92088fae Use double rather than float
double is a built-in type in Dart. float isn't...

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/968293003
2015-03-02 13:11:05 -08:00
Eric Seidel
b9c8e71096 Add support for pressure on pointer events
The touch demo needs some basic smoothing, right now
it looks rather jittery after this change.  But the pressure
code is definitely working!

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/970493003
2015-03-02 12:38:29 -08:00
Adam Barth
11c76c9c45 Make shake-to-reload actually work
We need to create a new service provider when we navigate to a new page
otherwise the new page is sad that the old page took its service provider.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962383003
2015-02-27 16:38:40 -08:00
Adam Barth
5db32b7186 Implement shake-to-reload
Apps can import this library if they wish to reload on shake.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/963303004
2015-02-27 15:31:11 -08:00
Adam Barth
5db8423f38 Expose Android sensors to via Mojo services
This CL adds a sensor_service to sky/services and wires it into SkyShell
The plan is to eventually use this data to implement shake-to-refresh.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/962043002
2015-02-27 14:37:50 -08:00
Eric Seidel
a128b09618 Fix multi-touch to work in SkyShell.
Before this patch it crashed.

Also updated the touch-demo to support multi-touch.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/961483004
2015-02-26 12:23:18 -08:00
Zachary Anderson
1a9b6b68d4 Dart: Renames dart:mojo_blah -> mojo:blah
This improves consistency with the convention that the dart: scheme is
only for things from the Dart standard library.

BUG=
R=erg@chromium.org

Review URL: https://codereview.chromium.org/951783004
2015-02-25 14:29:41 -08:00
Adam Barth
6d64856134 Implement quantum ink splashes
These aren't 100% correct, but they look somewhat reasonable.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/954023002
2015-02-24 15:41:52 -08:00
Adam Barth
b4385bcebe Make the stock app demo list view prettier
This CL makes the list view in the stocks app more consistent with the material
spec by using a colored circle instead of color-coding the percentage change.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/932103004
2015-02-24 15:41:35 -08:00
Adam Barth
8462f94f22 Add a shadow to the sky-drawer
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/950353003
2015-02-24 11:33:26 -08:00
Adam Barth
0c2621411d Make the stocks drawer look more realistic
The menu items don't quite make sense for this app, but they're closer in
visual styling.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/951413002
2015-02-24 10:48:23 -08:00
Adam Barth
5f50e4b60f Factor sky-toolbar into a componet and use a proper material shadow
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/953903004
2015-02-24 10:47:01 -08:00
Adam Barth
3904a6c35b Update Sky widgets to have more material design
This CL updates the Sky widgets to be closer to the material design spec.
There's still a long way to go, but this CL is a start.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/951823002
2015-02-23 23:59:57 -08:00
Adam Barth
adf02a0dc5 Add a search and menu button to stocks app
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/956463002
2015-02-23 22:14:26 -08:00
Adam Barth
b24baa7a2a Add <sky-icon> to access material design widgets
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/947383002
2015-02-23 17:26:19 -08:00
Eric Seidel
4ca655c963 Add a box-shadow to the app-bar per material design
Also made the background a MD color.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/951653004
2015-02-23 17:19:29 -08:00
Eric Seidel
71390b7ef1 Attempt to make the stocks example more more material-friendly.
http://www.google.com/design/spec/components/lists.html#lists-specs
http://www.google.com/design/spec/style/color.html#

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/930193004
2015-02-23 16:19:06 -08:00
Adam Barth
465de9a02f Remove outdated examples and framework pieces
None of this code runs in the current Sky. Some of it never ran.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/951673003
2015-02-23 15:09:36 -08:00
Eric Seidel
377cd1bea7 Show the last sale price in the stocks app
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/953593002
2015-02-23 14:51:22 -08:00
Eric Seidel
457c78f742 Make the stocks app slightly prettier.
I removed the green background and added display
of percent change (which is random for now).
I also display a random assortment of stocks every time
instead of always the top 100.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/950073002
2015-02-23 13:09:40 -08:00
Eric Seidel
e6a5e59e25 Wire in more-real stock data for stocks example.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/954513003
2015-02-23 12:52:17 -08:00
Adam Barth
545f6abb02 Morph "appish" example into a "stocks" app
We'll flesh this example out over time to demo a bunch of our widgets.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/954503002
2015-02-23 09:30:11 -08:00
Adam Barth
973cf80fb9 Port sky-drawer to Dart
Also, port the "appish" example to exercise the drawer.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/942413002
2015-02-23 08:30:58 -08:00
Adam Barth
eb117c7326 Port Sky widgets demo to Dart
This CL updates sky-box, sky-button, sky-checkbox, sky-input, and sky-radio to
work in Dart. We don't have a data binding system yet, so there's a bit more
plumbing in the code.

This CL adds support for sky-element@attributes, which lets you specify which
attributes your element supports. We use this information to synthesize getters
and setters for those attributes and to dispatch to mumbleChanged methods when
the attributes change.

I've also wrapped the widgets demo itself in a sky-scrollable so the whole
thing scrolls.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/946813005
2015-02-23 08:30:36 -08:00
Adam Barth
01938c9551 Port sky-scrollable to Dart
This CL ports sky-scrollable to the new sky-element.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/950603002
2015-02-21 09:56:22 -08:00
Adam Barth
fba37a0398 Add a basic sky-element custom element
After this CL, you can use <sky-element> to describe custom elements. The
current iteration is very basic and is hardcoded to "example", but its a start.

This CL renames the |init| function to |_init| to prevent importers from
calling it directly. Also, we now pass the <script> element to |_init| to give
some context.

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

Review URL: https://codereview.chromium.org/950493003
2015-02-20 21:45:36 -08:00
Eric Seidel
7dcdf11b95 Fix touch-demo after recent api changes.
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/950503002
2015-02-20 15:23:09 -08:00
Eric Seidel
26629785a9 Fix spinning-square to spin again.
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/942923002
2015-02-20 10:28:03 -08:00
Adam Barth
c54e1688e8 Sky should expose services provided to/by embedder
These now appear on internals as takeServicesProvidedToEmbedder and
takeServicesProvidedByEmbedder. When you call these functions, you get back the
raw int that represents the handle. We'll need to wrap them up inside the Dart
VM with the appropriate types. We can create a nice wrapper for that in a
future CL.

R=hansmuller@google.com, hansmuller@chromium.org

Review URL: https://codereview.chromium.org/944733002
2015-02-19 21:16:04 -08:00
Hans Muller
819d14cbd2 Dart version of the Sky color chooser
I haven't removed the JS color picker code yet.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/940233002
2015-02-19 15:08:20 -08:00
Adam Barth
431716f86d Port touch-demo.sky to Dart and make it work in SkyShell
We still don't quite handle multitouch correctly, but single touches work now.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/932283002
2015-02-18 16:57:32 -08:00
Adam Barth
a5e01b1521 Add initializeFromShellProxy to application.dart
This CL adds the ability to initialize the Dart Application class with a shell
proxy (rather than with a MojoHandle). This change lets Sky use the Dart
bindings for Mojo.

This CL was reviewed on the SkyDart branch in
https://codereview.chromium.org/919883002/

R=zra@google.com, zra@chromium.org

Review URL: https://codereview.chromium.org/922083002
2015-02-12 23:36:40 -08:00
Adam Barth
deedba409a Merge the Sky Engine changes from the SkyDart branch
This CL flips the switch to make Sky use Dart.

TBR=eseidel@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/922893002
2015-02-12 15:06:03 -08:00
Hans Muller
5f719fecde Extend the sky color picker example
Displays the last six selected colors.

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/897683002
2015-02-04 09:30:47 -08:00
Hans Muller
ae503019b7 A simple Sky color chooser example. The color-picker is
two components: color-wheel, and color-picker which adds
a div that displays the selected color. Data binding is
used to connect the color-wheel's "color" property to the
sample div's background-color.

BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/872993006
2015-02-02 09:01:47 -08:00
Adam Barth
249bb59f25 This CL adds an "appish" example to the Sky examples, including a drawer widget.
R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/886723002
2015-01-29 11:21:39 -08:00
Ojan Vafai
45d7d34530 Add a selection and outline to flights-app.
This is just to get basic paint coverage of selections
and outlines on positioned elements.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/886683002
2015-01-28 21:48:28 -08:00
Rafael Weinstein
931f29c80e Fix city-list example after changes to scrolling.
Note that this patch only includes support for the wheel event.
I'll follow-up with a patch for scrolling/fling when I have a setup
on which I can verify that working.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/875473004
2015-01-28 16:56:25 -08:00
Eric Seidel
cfd21dfd13 Add a very basic deploy script for mojo.
We could do something much more sophisticated for deploy in the future.

Also add #!mojo:sky_viewer to .sky file demos

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/885653006
2015-01-28 11:00:52 -08:00
Adam Barth
00842383fd Remove more scrolling code from Sky
None of this code does anything anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/878303002
2015-01-27 15:20:14 -08:00
Adam Barth
46334e2e32 Add wheel support to sky-scrollable
This CL plumbs wheel events through Sky again and uses them in sky-scrollable.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/876853005
2015-01-27 09:58:22 -08:00
Colin Blundell
73f0a8d121 Revert "Add a close box to flights-app toast."
This reverts commit ffcbc3b2f5417b09328eae4aeb8de2e5eab6324d.

This test broke sky_tests:

Regressions: Unexpected text-only failures (6)
  framework/flights-app.sky [ Failure ]

Example:

http://build.chromium.org/p/client.mojo/builders/Mojo%20Linux%20ASan%20%28dbg%29/builds/173/steps/Sky%20tests/logs/stdio

TBR=ojan

Review URL: https://codereview.chromium.org/880863002
2015-01-27 10:11:41 +01:00
Ojan Vafai
55b9f393c1 Add a close box to flights-app toast.
This is to get a case of having an outline on an
absolutely positioned, overflow:hidden, i.e. a
self-painting layer.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/878873002
2015-01-26 22:54:39 -08:00
Ojan Vafai
09ffab7233 Fix border painting on self-painting layers.
Commit efc3afd428bd85fd3d12e0dc941b5eb7248ca30b broke it because
we'd computed an empty foreground layer. Now that background
painting is part of the foreground phase, we need to use the
background rect for clipping. As best I can tell, the
background rect is always >= the size of the foreground
rect, so it should be safe to use.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/876243002
2015-01-26 22:45:30 -08:00
Ojan Vafai
609cf2e8d9 Add a gratuitous outline to flights-app.
This is so we have minimal coverage of outline painting.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/878803002
2015-01-26 16:40:40 -08:00
Adam Barth
435b203406 Add a basic sky-scrollable element that scrolls
We still need to polish sky-scrollable, but it basically works.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/875953004
2015-01-26 13:29:38 -08:00
Elliott Sprehn
66e6949f46 module.exports should default to an empty object.
Per the spec in modules.md the exports property should default to an
empty object. We lazy allocate it so that modules that just replace it
don't create the empty object and then throw it away.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/872043003
2015-01-26 11:38:04 -08:00