55 Commits

Author SHA1 Message Date
Adam Barth
a01aa6ffbb Fix analyzer warnings 2015-09-26 13:07:31 -07:00
James Robinson
e854d7457d Update to Mojo 4e4d51ce28a8edcb32b9c7f555e38e2ae84a825e, update deps
This updates to mojo 4e4d51ce28a and mojo sdk 711a0bcfb141b4 and updates the sky
package's pubspec.yaml dependency to '>=0.1.0 <0.2.0' to be compatible with
the current mojo package. This includes an update to the Mojo Dart generator to
produce real classes for enums and the corresponding updates for users of the
KeyboardType enum in Sky as well as one scoped_ptr->std::unique_ptr in shell
corresponding to a change in the Mojo EDK.

When a new version of the sky and sky_services package are pushed this will fix
domokit/mojo#440.
2015-09-23 17:26:46 -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
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
Adam Barth
7064551a45 Move mojo frontend into services.dart
What's important about this code is that it's presenting services outside the
VM, not the particular technology used to present the services.
2015-09-16 19:13:50 -07:00
Matt Perry
dfab52c706 Compare versions before updating an app bundle.
The version and update URL are stored in the app's manifest (sky.yaml).
2015-09-10 14:17:58 -04:00
Adam Barth
5108e15ed0 Introduce painting.dart and move painting code to src/painting 2015-09-08 10:36:14 -07:00
Adam Barth
b356d14635 Introduce package:sky/animation.dart
Move the animation libraries into src/animation and change importers to use
package:sky/animation.dart. Also, move scheduler.dart into the animation
library so that the animation library can be self-contained.
2015-09-08 09:44:01 -07:00
Adam Barth
318b69be10 Fold package:sky/editing/* into package:sky/widgets.dart
The editing directory just defined two widgets. We might as well fold them into
the main widgets library.
2015-09-07 10:07:41 -07:00
Chinmay Garde
ea4d52720a Setup mac target for Fitness app 2015-09-04 13:29:47 -07:00
Matt Perry
d2f151acbe Introduce an UpdateService for android.
Very simple so far. This schedules an alarm to fire once a day, kicking
off a service that downloads a new app.skyx from a hardcoded URL. The
new skyx replaces the current one.
2015-09-02 15:32:09 -04:00
Adam Barth
4adf70215d Pull in a new version of playfair
We need the new version because of the TextPainter rename.
2015-08-29 15:54:43 -07:00
Hixie
9047830c2e Rationalise the Key API.
Add a way of having keys based on numeric types or DateTimes by having a ValueKey<T> class.
Remove the redundant ways of declaring things, except for leaving one shorthand -- you can say `new Key(s)` instead of `new ValueKey<String>(s)`.
2015-08-28 13:17:34 -07:00
Adam Barth
dc84e882df Use GestureDetector in the framework and examples
We're now using it at the widget layer for everything except scrolling and
flinging.
2015-08-28 10:58:46 -07:00
Ian Fischer
b214e355f6 Only require iOS 7 for Fitness app. 2015-08-27 15:02:18 -07:00
Collin Jackson
a1bafaa317 Merge pull request #838 from collinjackson/improve_date_picker
Add date picker to widgets library and teach fitness app to use it
2015-08-26 10:28:27 -07:00
Hixie
ce28a7176e Replace Flex to Row and Column in tests and examples.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.
2015-08-26 09:05:14 -07:00
Collin Jackson
f164e560c3 Add date picker to widgets library and teach fitness app to use it
Also, add an example for the date picker
2015-08-25 16:41:11 -07:00
Ian Fischer
36ef15325e Change Fitness bundle id to be compatible with signing with Google’s keys. 2015-08-25 16:24:28 -07:00
Eric Seidel
1813170a23 Roll APK versions in preparation for releases
@abarth
2015-08-25 15:12:38 -07:00
Eric Seidel
1c9837630d Make 'save failed' snackbar show up
SnackBar's crash if you fail to provide a showing bool.

I tried to edit it in the framework, but this seemed easier for now.

The snackbar still shows behind the keyboard unfortunately.
https://github.com/domokit/sky_engine/issues/810

@collinjackson
2015-08-25 13:39:27 -07:00
Eric Seidel
19f62a35a9 Move Fitness.app to the latest playfair
@collinjackson
2015-08-25 13:32:28 -07:00
Eric Seidel
5ad78bd3bc Hack around Fitness.app crashing if it can't load data
I'm not sure this is the correct approach, but it
at least mitigates https://github.com/domokit/sky_engine/issues/804
for now.

I also made it not crash if you haven't set a goalWeight.

@collinjackson
2015-08-25 13:09:50 -07:00
Adam Barth
627b049216 Address review comments from #767
Mostly formating and removing arguments with default values.
2015-08-22 11:25:53 -07:00
Adam Barth
5d99f31c04 Merge pull request #767 from abarth/modernize_drawer_item
DrawerItem, DrawerHeader should take a child instead of children
2015-08-22 08:46:12 -07:00
Adam Barth
2873880f50 Fix analyzer warnings 2015-08-22 08:24:02 -07:00
Adam Barth
18248543cb DrawerItem, DrawerHeader should take a child instead of children
These widgets were designed in CSS where you need to specify a layout model for
your children. This patch updates them to the modern style of just taking a
unique child.

Fixes #755
2015-08-22 08:19:38 -07:00
Adam Barth
b61fe238f5 Rename syncFields to syncConstructorArguments 2015-08-21 17:21:42 -07:00
Collin Jackson
ca42e8865d Merge pull request #747 from collinjackson/fitness_loading
Don’t flash a message while fitness data is loading
2015-08-21 16:21:05 -07:00
Adam Barth
010589be9e Rename all the scrollable classes
Block -> BlockBody
ScrollableBlock -> Block
FixedHeightScrollable -> ScrollableWidgetList
VariableHeightScrollable -> ScrollableMixedWidgetList
BlockViewport -> MixedViewport
2015-08-21 14:39:41 -07:00
Adam Barth
51c7194075 Add SetRequestedOrientation to Activity service
Fixes #743
2015-08-21 12:49:49 -07:00
Collin Jackson
d75fb40585 Don’t flash a message while fitness data is loading 2015-08-21 11:19:26 -07:00
Collin Jackson
d77d7b4893 Add goal weight indicator line to fitness chart 2015-08-20 11:45:31 -07:00
Collin Jackson
3e3f6242e3 Support for goal weight saving 2015-08-20 11:02:00 -07:00
Collin Jackson
c890dde70a Split fitness app’s UserData into UserData and UserDataImpl 2015-08-20 10:54:48 -07:00
Collin Jackson
09216794e7 Add support for saving settings in fitness app 2015-08-19 12:12:33 -07:00
Hans Muller
7782a11534 Adds PageableList, other scrolling related changes and fixes
- PageableList extends ScrollableList
One fixed width or height item is visible and centered at a
time. Fling and drag gestures scroll to the next/previous item.

- Scrollable.scrollTo(), Scrollable.scrollBy(), ensureWidgetIsVisible() API changed
The named animation parameter for these methods was replaced by
duration and curve. All of the methods now return a Future. The Future
completes when the scroll does.

This change eliminates the need for Scrollable to temporarily take ownership
of a ValueAnimation object (see #645).

- Using Future.then() instead of an AnimationPerformance status listener
In ensure_visible.dart _handleTap() uses ensureWidgetIsVisible() to
center the card roughly as before and then. When the implicit scroll
animation is complete, it changes the centered card's label font. The
change is made when the Future returned by ensureWidgetIsVisible()
completes.

- FixedHeightScrollable's itemHeight parameter is now itemExtent
If scrollDirection is ScrollDirection.vertical (the default) then itemExtent should
be the height of each item; otherwise it should be the width of each item.

Replaced _velocityForFlingGesture() in scrollable.dart with Scrollable._eventVelocity()
The original version clamped pixels/ms against pixels/sec constants. The new version
also deals with scrollDirection.

- Plumbed scrollDirection though FixedHeightScrollable and ScrollableList

Both classes should now support horizontal scrolling.
2015-08-19 10:14:21 -07:00
Adam Barth
194c616b2a Update playfair revision
... and reattach fitness to the build. We detached fitness from the build
because it was seeing an old version of playfair that didn't work with the most
recent version of the Sky package.
2015-08-19 09:05:30 -07:00
Collin Jackson
429c39455d Request gridlines for fitness chart 2015-08-18 15:15:49 -07:00
Eric Seidel
f714ec6bca Add release notes for Fitness 0.0.3
@collinjackson
2015-08-17 17:51:50 -07:00
Eric Seidel
f19fee31e2 Roll Fitness and SkyDemo in preparation for release
@abarth
2015-08-17 12:46:30 -07:00
Chinmay Garde
99b68e3139 Add iOS sky_app target for the fitness app example 2015-08-14 15:07:20 -07:00
Collin Jackson
98d4c3af12 Add weight chart to fitness app 2015-08-12 14:50:50 -07:00
Eric Seidel
c9c4852aa6 Add missing icons to fitness/sky.yaml
This is just fallout from not having
https://github.com/domokit/sky_engine/issues/565

@abarth
2015-08-11 15:56:37 -07:00
Eric Seidel
3eaf50a94c Add Release notes for fitness 0.0.2
@abarth
2015-08-11 15:33:14 -07:00
Eric Seidel
f4e1d1425a Roll fitness version in preparation for release
@abarth
2015-08-11 15:30:46 -07:00
Matt Perry
3d9f523179 Scaffold: animate the FloatingActionButton with the SnackBar.
This introduces the concept of an Anchor, which you can use to link
transitions together. I've used this in the Fitness and Stocks apps to
link the FAB and SnackBar to animate together by sharing the
SlideTransition.

I also fixed the Scaffold hit testing code to apply sub-widget
transforms, so it works with Transformed nodes.
2015-08-11 17:21:20 -04:00
Eric Seidel
b221278582 Make Fitness tiles nicer
Moved from Cards to Tiles and made the printing
of the dates nicer by using some code from a Dart SDK example:
https://github.com/dart-lang/sdk/blob/master/samples-dev/swarm/swarm_ui_lib/util/DateUtils.dart

I also built a UserData class to help keep saving/sorting
consistent as well as fixed the sort order to have most
recent at the top.

@abarth
2015-08-11 14:02:12 -07:00
Eric Seidel
441fe4d491 Fix crash when hitting "enter" key on keyboard during entry
Now it wont crash on save, but it still doesn't display
the error message in a snackbar and this also doesn't
wire up the enter/go key to actually do anything.

We'll need to implement performEditorAction on our
InputConnection implementation to catch this key and
pass it along to dart.

Our Input control needs to get more powerful to handle things
like this, including filtering of input.

The code was crashing by triggering a bug in the SnackBar
which didn't assert for actions, but crashed when they
were not null.

Partial fix for https://github.com/domokit/sky_engine/issues/543

@abarth
2015-08-11 12:27:54 -07:00
Chinmay Garde
63b9f17d97 Merge pull request #550 from eseidel/patch-2
Remove non-working Height setting
2015-08-10 22:31:42 -07:00