Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(architecture): proofread, updated Dart app#1807

Closed
chalin wants to merge 4 commits intoangular:masterfrom
chalin:chalin-architecture-review-0630
Closed

docs(architecture): proofread, updated Dart app#1807
chalin wants to merge 4 commits intoangular:masterfrom
chalin:chalin-architecture-review-0630

Conversation

@chalin
Copy link
Contributor

@chalin chalin commented Jul 1, 2016

Note that there are two commits: one for each of TS- and Dart-side changes.

  • e2e tests now also cover the tax calculator.
  • Dart app updated to match TS (it had no sales tax calculator).
  • TS sample source cleanup (e.g. removed many unnecessary docregions).
  • Prose updated to include @kwalrath's revisions from a while ago, with some of my edits as well.

Contributes to #1598 and #1508.

@chalin
Copy link
Contributor Author

chalin commented Jul 1, 2016

@kwalrath @thso : Dart-side commit ready for review.
@Foxandxss @wardbell : TS-side commit ready for review. As usual, it is best to review the .jade file while ignoring changes in indentation. Note that most of the TS Jade file edits were from Kathy's work from a while back.

header Dart difference: Module is a compilation unit
:marked
The term "module" used in this guide refers to a
Dart _compilation unit_, i.e., a _library_ or _part_.
Copy link
Contributor

Choose a reason for hiding this comment

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

i.e. -> that is

(many people don't know what i.e. means)

Actually, though... do we really need to mention parts? They're strongly discouraged. Also, people might not know that each file without a library directive is itself a library. Perhaps instead:

In this guide, the term module refers to a Dart compilation unit, such as a library. If a Dart file has no library or part directive, then that file itself is a library and thus a compilation unit. For more information...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed as you suggested with tweaks we agree to elsewhere (in particular clarifying that a Dart package is also a module).

@kwalrath
Copy link
Contributor

kwalrath commented Jul 1, 2016

Looking good! Once you address a few comments, the Dart side is good to go.

@chalin chalin force-pushed the chalin-architecture-review-0630 branch from 5488fec to f20221c Compare July 1, 2016 19:00
@chalin
Copy link
Contributor Author

chalin commented Jul 1, 2016

Dart-side issues addressed.

@kwalrath
Copy link
Contributor

kwalrath commented Jul 1, 2016

LGTM! @Foxandxss or @wardbell, who's going to review the TS side?

@chalin chalin force-pushed the chalin-architecture-review-0630 branch 3 times, most recently from 70f6eeb to a59aafe Compare July 3, 2016 21:03
selector: 'sales-tax',
template: '''
<h2>Sales Tax Calculator</h2>
Amount: <input #amountBox (input)="0" type="number">
Copy link
Member

Choose a reason for hiding this comment

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

What triggered this change (also in TS)? I am not sure I like (input) as the event name. I don't know, I guess it is just me but I liked (change) more. Input is also the element name so as an event again is weird. Also input sounds more like an input (pun intended) than as an output.

On the other hand, the number input is really broken in other browsers. I don't think they are fixed yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Triggering on onInput rather than onChange makes for a more responsive user experience (UX). Again, using type="number" makes for a better UX in those browsers that support it, and makes no difference (from the app processing point of view) in those browsers that do not support it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert to (change). We're not trying to be responsive. We're trying to make a point about how (someEvent)="0" is a trick to cause dirty checking when the user enters something. (input) invites the kind of distracting question that Jesus asked.

Please revert type="number". This is a distraction from the point. Again, we're not looking to produce the best app solution here. We're trying to make a narrow point. Let's not add distractions from that point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. Undone.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants