Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

StageXL app generator. #381

Merged
merged 4 commits into from
Mar 21, 2017
Merged

StageXL app generator. #381

merged 4 commits into from
Mar 21, 2017

Conversation

Tomucha
Copy link
Contributor

@Tomucha Tomucha commented Mar 18, 2017

See https://github.com/google/stagehand/issues/377

Result project was approved by @bp74.

@kwalrath kwalrath self-assigned this Mar 20, 2017
Copy link
Contributor

@kwalrath kwalrath left a 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
Copy link
Contributor

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.

logo.pivotX = logoData.width / 2;
logo.pivotY = logoData.height / 2;

// place it on top-center
Copy link
Contributor

@kwalrath kwalrath Mar 20, 2017

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.


stage.addChild(logo);

// ... and let it fall
Copy link
Contributor

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.

var tween = stage.juggler.addTween(logo, 3, Transition.easeOutBounce);
tween.animate.y.to(800 / 2);

// see more examples:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see -> See

sdk: '>=1.20.1 <2.0.0'

dependencies:
stagexl: '^1.1.0'
Copy link
Contributor

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.

@@ -0,0 +1,18 @@
name: __projectName__
description: An absolute bare-bones web app.
Copy link
Contributor

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>
Copy link
Contributor

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.

@kwalrath kwalrath requested a review from kevmoo March 20, 2017 17:14
@kwalrath
Copy link
Contributor

@kevmoo, care to review the code?

stage.addChild(logo);

// And let it fall.
var tween = stage.juggler.addTween(logo, 3, Transition.easeOutBounce);
Copy link
Contributor

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.

import 'package:stagexl/stagexl.dart';

Future<Null> main() async {

Copy link
Contributor

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.

Copy link
Contributor

@kwalrath kwalrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @kevmoo?

@@ -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';
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@kevmoo kevmoo left a 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;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline

@kevmoo kevmoo merged commit 21cb456 into dart-archive:master Mar 21, 2017
@Tomucha
Copy link
Contributor Author

Tomucha commented Mar 21, 2017

Thanks!

@filiph
Copy link
Contributor

filiph commented Mar 21, 2017

Great idea and awesome template, thanks!

Was tool/grind.dart build run on this before submitting? It looks like the commit doesn't include the data files. Or have we stopped putting those files into version control?

@Tomucha
Copy link
Contributor Author

Tomucha commented Mar 21, 2017

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 ... ?

@filiph
Copy link
Contributor

filiph commented Mar 21, 2017

Ah! Yes, I overlooked it. Sorry for the confusion!

@kwalrath
Copy link
Contributor

kwalrath commented May 5, 2017

@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.

@Tomucha
Copy link
Contributor Author

Tomucha commented May 7, 2017

Obviously I disagree:

  • Remove one CLI template and one Angular - they cause the problem
  • Then run UX tests again. If it doesn't help:
  • THEN remove web-simple - it's useless jQuery style Hello World anyway

All I'm saying: Don't throw the baby out with the bathwater.

@kwalrath
Copy link
Contributor

kwalrath commented May 8, 2017

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.

@kwalrath
Copy link
Contributor

kwalrath commented May 8, 2017

Issue filed: #402. And fixed: #403.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants