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

docs(toh-6) move styles from sample.css to heroes.component.css #1751

Closed
wants to merge 1 commit into from

Conversation

Adam-Meisen
Copy link
Contributor

As outlined in #1750 and touched upon in #1686, sample.css is used in the examples but never actually mentioned in the tutorial. This moves the contents of sample.css to heroes.component.css and updates the tutorial to reflect this change. I've attempted to follow the style of the rest of the page as closely as possible.

  • contents of sample.css moved to heroes.component.css
  • appropriate #docregions added to heroes.component.css to render the file properly in makeExample and makeTabs mixins
  • Tutorial edited to instruct the reader to add the rules formerly contained in sample.css to heroes.component.css
  • heroes.component.css has been added to the summary of changed files
  • sample.css has been removed from the list of files at the bottom of the page
  • sample.css has been deleted as it is no longer needed

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@Adam-Meisen
Copy link
Contributor Author

I signed it!
On Jun 26, 2016 7:30 AM, "googlebot" [email protected] wrote:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll

verify. Thanks.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1751 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA-2UCbWlTKKcneF8bNVCY_jmk_ineZxks5qPnD8gaJpZM4I-i5r
.

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

1 similar comment
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@Adam-Meisen
Copy link
Contributor Author

Rebased. Forgot to use -f the first time, angered googlebot.

@Adam-Meisen
Copy link
Contributor Author

Squashed my commits, cleaned up the messages. Also accidentally closed the PR and opened it again. Woops.

@Adam-Meisen
Copy link
Contributor Author

Adam-Meisen commented Jun 28, 2016

Something about the e2e tests for part 6 is bizarre, I've had two consecutive build failures with different errors each time. None of my changes should cause either of these.

[02:35:14] failed - should be able to save details from "Dashboard" view

[02:35:14] Failed: No element found using locator: By(css selector, input)

[08:31:57] failed - should be able to add a hero from the "Heroes" view

[08:31:57] Expected 0 to be 10, 'should show 10'.

@Foxandxss
Copy link
Member

Yes, we fixed them in other PR

@Adam-Meisen Adam-Meisen changed the title Fix for Issue#1750, move styles from sample.css to heroes.component.css docs(toh-6) move styles from sample.css to heroes.component.css Jun 28, 2016
@Adam-Meisen Adam-Meisen force-pushed the master branch 2 times, most recently from 37fc5ae to 0940692 Compare June 28, 2016 21:03
@@ -57,3 +58,11 @@ button {
button:hover {
background-color: #cfd8dc;
}
/* #docregion delete-hero */
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename the region to "additions" (since you'll be re-introducing the .error style that was inadvertently dropped --- see my comment on the original sample.css), and make the corresponding update in the .jade.

@chalin
Copy link
Contributor

chalin commented Jun 29, 2016

I have made some specific line comments. Please address those.

As I mentioned elsewhere, I like your proposal, but I'll need to discuss this with some of the doc team elders to find out the history of the sample.css files used in the various chapters.

cc @kwalrath

@Adam-Meisen
Copy link
Contributor Author

No worries. 👍
Fixed and rebased. Thanks for the feedback.

@Adam-Meisen Adam-Meisen force-pushed the master branch 2 times, most recently from acbb556 to 3840c01 Compare July 9, 2016 06:38
@chalin
Copy link
Contributor

chalin commented Aug 1, 2016

@Adam-Meisen : oh, I thought that this had been merged already!

Could you rebase? Then I'll review and see if we can get this merged.

@chalin
Copy link
Contributor

chalin commented Aug 1, 2016

Hmm, just realized that this might need a little more work. Let me investigate and get back to you, @Adam-Meisen.

@chalin
Copy link
Contributor

chalin commented Aug 1, 2016

@Adam-Meisen Thanks for the rebase. Getting close! Notice that sample.css has two new styles, and they are now being lost. Could you add them to a (new) hero-search.component.css file, adjust the component, etc?

@Adam-Meisen
Copy link
Contributor Author

Yep, working on it.

@@ -1,11 +1,4 @@
/* #docregion */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why git decided this was a rename operation when I rebased, but I don't think that hurts anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right.

@chalin
Copy link
Contributor

chalin commented Aug 2, 2016

It's looking good other than the minor changes I pointed out in the line comments.

@@ -396,7 +398,6 @@ block observables-section
We start by creating `HeroSearchService` that sends search queries to our server's web api.

+makeExample('toh-6/ts/app/hero-search.service.ts', null, 'app/hero-search.service.ts')(format=".")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This newline didn't seem to have any significance, but it messed with syntax highlighting.

Copy link
Contributor

Choose a reason for hiding this comment

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

Strange.

@chalin
Copy link
Contributor

chalin commented Aug 2, 2016

Some edits just landed for toh-6. One more rebase to do.

@@ -316,7 +316,9 @@ block add-new-hero-via-detail-comp
The user can *delete* an existing hero by clicking a delete button next to the hero's name.
Add the following to the heroes component HTML right after the hero name in the repeated `<li>` tag:
+makeExample('app/heroes.component.html', 'delete')

:marked
Add the following CSS to the bottom of `heroes.component.css`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I just noticed this. We need to make this sentence work for all language versions. I'd suggest going with:

Add the following to the bottom of the HeroesComponent CSS file:
+makeExcerpt('app/heroes.component.css', 'additions')

(Drop the last '' argument to makeExcerpt.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alrighty

On Tue, Aug 2, 2016, 12:10 PM Patrice Chalin [email protected]
wrote:

In public/docs/ts/latest/tutorial/toh-pt6.jade
#1751 (comment):

@@ -316,7 +316,9 @@ block add-new-hero-via-detail-comp
The user can delete an existing hero by clicking a delete button next to the hero's name.
Add the following to the heroes component HTML right after the hero name in the repeated <li> tag:

+makeExample('app/heroes.component.html', 'delete')

+:marked

  • Add the following CSS to the bottom of heroes.component.css.

Oh, I just noticed this. We need to make this sentence work for all
language versions. I'd suggest going with:

Add the following to the bottom of the HeroesComponent CSS file:
+makeExcerpt('app/heroes.component.css', 'additions')

(Drop the last '' argument to makeExcerpt.)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular.io/pull/1751/files/0320013bbf27da52ff1e3bd7bd7b7d155b697be2#r73196526,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA-2UIHQBheeyaJ9PhZkxsF3UJxBto5Eks5qb3nqgaJpZM4I-i5r
.

Move additional styles from `sample.css` to `hero-search.component.css`.
Edit tutorial to reflect the removal of `sample.css` and the change to `heroes.component.css`.
Edit tutorial to reflect the addition of `hero-search.component.css` file.
Edit `hero-search.component.ts` to include styles from `hero-search.component.css`.
Remove reference to `/public/docs/_examples/toh-6/ts/sample.css` from `/public/docs/_examples/toh-6/ts/index.html`.
@Adam-Meisen
Copy link
Contributor Author

Alright, hopefully I didn't break anything in this rebase.

toh-6/ts/app/hero-detail.component.ts,
toh-6/ts/app/hero-detail.component.html,
toh-6/ts/app/hero.service.ts,
toh-6/ts/app/in-memory-data.service.ts,
toh-6/ts/sample.css`,
toh-6/ts/app/in-memory-data.service.ts`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the hero-search.component files be added here?

Copy link
Contributor

Choose a reason for hiding this comment

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

As a separate makeTabs is ok (since there can be no more than 8 entries).

@chalin
Copy link
Contributor

chalin commented Aug 2, 2016

@Foxandxss @wardbell : LGTM. Tests are passing. Can we please merge this before the RC5 wave?

@wardbell
Copy link
Contributor

wardbell commented Aug 5, 2016

THANK YOU! A lot of hard work went into getting this right. Much appreciated and happy to merge.

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