-
Notifications
You must be signed in to change notification settings - Fork 118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun template! After a few tweaks, I'll be happy to accept this.
README.md
Outdated
@@ -20,6 +20,7 @@ Kit and Yeoman. | |||
* `web-angular` - A web app built using the latest stable version of Angular. | |||
* `web-angular-simple` - A minimalist example app used in docs. | |||
* `web-simple` - An absolute bare-bones web app. | |||
* `web-stagexl` - A basic 2D canvas app with StageXL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a period at the end, to match other items in the list.
Actually... It looks like lib/generators/web_stagexl.dart
has this right, so if you run dart tool/grind.dart build
this should update to have the right text.
templates/web-stagexl/web/main.dart
Outdated
logo.pivotX = logoData.width / 2; | ||
logo.pivotY = logoData.height / 2; | ||
|
||
// place it on top-center |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per https://www.dartlang.org/guides/language/effective-dart/documentation#do-format-comments-like-sentences, format this like a sentence. (And maybe "on" should be "at"? Also, the hyphen seems unnecessary.)
// Place it at top center.
templates/web-stagexl/web/main.dart
Outdated
|
||
stage.addChild(logo); | ||
|
||
// ... and let it fall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, please format this like a sentence:
// And let it fall.
templates/web-stagexl/web/main.dart
Outdated
var tween = stage.juggler.addTween(logo, 3, Transition.easeOutBounce); | ||
tween.animate.y.to(800 / 2); | ||
|
||
// see more examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see -> See
templates/web-stagexl/pubspec.yaml
Outdated
sdk: '>=1.20.1 <2.0.0' | ||
|
||
dependencies: | ||
stagexl: '^1.1.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the '
s around this ^
dependency.
templates/web-stagexl/pubspec.yaml
Outdated
@@ -0,0 +1,18 @@ | |||
name: __projectName__ | |||
description: An absolute bare-bones web app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to something more specific. Maybe:
description: A simple StageXL web app.
site/index.html
Outdated
@@ -92,6 +92,7 @@ <h1 id="usage">Usage</h1> | |||
<li>web-angular - <em>A web app built using the latest stable version of Angular.</em></li> | |||
<li>web-angular-simple - <em>A minimalist example app used in docs.</em></li> | |||
<li>web-simple - <em>An absolute bare-bones web app.</em></li> | |||
<li>web-stagexl - <em>A basic 2D canvas app with StageXL</em></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a period before the final </em>
, to match the other items in the list.
@kevmoo, care to review the code? |
stage.addChild(logo); | ||
|
||
// And let it fall. | ||
var tween = stage.juggler.addTween(logo, 3, Transition.easeOutBounce); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we set this up so that it dances on mouse-over...or reanimates when clicked?
Just something so it feel playful and shows a bit of event handling.
templates/web-stagexl/web/main.dart
Outdated
import 'package:stagexl/stagexl.dart'; | ||
|
||
Future<Null> main() async { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run dartfmt
– I see a few extra lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @kevmoo?
templates/web-stagexl/web/main.dart
Outdated
@@ -2,16 +2,16 @@ | |||
// is governed by a BSD-style license that can be found in the LICENSE file. | |||
|
|||
import 'dart:async'; | |||
import 'dart:html'; | |||
import 'dart:html' as html; | |||
import 'package:stagexl/stagexl.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The imports should be alphabetical, and I think there should be a blank line above the package import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Between dart:*
and package:*
imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
I'll do the pubspec/changelog cleanup – save you from our nitpicking 😄
Thanks so much!
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing newline
Thanks! |
Great idea and awesome template, thanks! Was |
It's all there: https://github.com/google/stagehand/pull/381/files/d268114819cbffb18ae6ac1db440c233efdceb2e#diff-93fce550d136fd7c8560ff122f2a1a1e But it's collapsed in commit view, maybe you overlooked it ... ? |
Ah! Yes, I overlooked it. Sorry for the confusion! |
@Tomucha unfortunately we have to reduce the number of templates (#390), so we'll be removing yours. We're also removing the web-angular-simple template, and I thought you might be interested in how we handled that. https://github.com/dart-lang/site-webdev/pull/596 has the details, but basically we changed our instructions to refer to a GitHub repo. https://webdev.dartlang.org/angular/guide/setup#create-a-starter-project has detailed instructions on getting the project's files, with links to the GitHub download URL plus instructions on using WebStorm to clone a repo. |
Obviously I disagree:
All I'm saying: Don't throw the baby out with the bathwater. |
After talking with @filiph, we've agreed to keep the StageXL template (for now, at least). But we have to make the description more inviting! I'll file an issue about this. |
See https://github.com/google/stagehand/issues/377
Result project was approved by @bp74.