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

docs(attribute-directives): copyedits + fix e2e warning #3330

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Mar 1, 2017

  • Prose: copyedits, including fix to misnamed directive class (MyHighlightDirective --> HighlightDirective).
  • E2E update to avoid warning of multiple matching elements.
  • Code: remove obsolete template region.
  • Remove obsolete Jade blocks (no longer required by Dart).
  • Replace Jade syntax with plain markdown.
  • Remove a few unnecessary :marked.

Copy link
Contributor

@wardbell wardbell left a comment

Choose a reason for hiding this comment

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

Please answer the question about moving the properties and the TSLint consequences. Then we can merge.

@@ -39,7 +28,14 @@ export class HighlightDirective {
private highlight(color: string) {
this.el.nativeElement.style.backgroundColor = color;
}
// #enddocregion mouse-methods
// #enddocregion mouse-methods,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the move? Linter complains when properties follow methods. I hate that particular "rule" (what's the point?) and often disable it for a particular file but I don't see you doing that here.

Copy link
Contributor Author

@chalin chalin Mar 3, 2017

Choose a reason for hiding this comment

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

The file starts with

/* tslint:disable:no-unused-variable member-ordering */

and so the linter is happy (i.e., the build is green).

The move was so as to put all the extra "snippets" (not actually meant to be part of the class's default docregion), at the end.

(Btw, those two members were already "out of order". I figured that if they are going to be out-of-order, then might as well be at the end of the real class members.)

Copy link
Contributor

Choose a reason for hiding this comment

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

k

@@ -1,5 +1,4 @@
<!-- #docregion -->
<!-- #docregion v2 -->
<!-- #docregion v2, -->
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that you can combine named and the unnamed region in a single line like this. I'm not sure that it helps the reader. Those trailing commas are hard to pick up. But let's forge ahead with this change.

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, I'll refrain from combining them in the future (I just find excessive docregion lines distracting when trying to read the source).

@chalin
Copy link
Contributor Author

chalin commented Mar 3, 2017

@wardbell - pls see my line comments. Anything else to be done?

- Prose: copyedits, including fix to misnamed directive class
(`MyHighlightDirective` --> `HighlightDirective`).
- E2E update to avoid warning of multiple matching elements.
- Code: remove obsolete template region.
- Remove obsolete Jade blocks (no longer required by Dart).
- Replace old Jade syntax with plain markdown.
- Remove a few unnecessary `:marked`.
@chalin chalin force-pushed the chalin-attribute-directives-0301 branch from 848c84c to d319c4f Compare March 5, 2017 21:41
@wardbell wardbell merged commit a6478bc into angular:master Mar 7, 2017
@wardbell wardbell deleted the chalin-attribute-directives-0301 branch March 7, 2017 18:23
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.

3 participants