TIY-Durham / 2015-FALL-FEE

Class repo for the Front-End Engineering class of the Fall 2015 cohort at TIY Durham
18 stars 12 forks source link

20 -- Camille Mauban #386

Closed cmauban closed 9 years ago

cmauban commented 9 years ago
cmauban commented 9 years ago

Journal, Week 5

Welcome to Week 6!

In addition to your reflective journal entry and your tutorial journal entry this week, also share a bookmarked URL to a tool or article. That sounds easy, doesn't it? But wait, there's more... Write a paragraph explaining the resource you're linking to and why it was helpful. Give us the tl;dr on that article or just the important parts of the documentation: installation, usage, why it exists. Keep it simple.

Reading APIs

Did you finish all of your questions and terms last week? No? Finish them tonight!

Getting Ready for the Week

We're going to use some cool new tools this week, which means yak-shaving today.

You'll want to globally install two new tools: Bower and Gulp. Hmmm, how do you globally install?

Now, in your USERNAME.github.io repo, create a new branch called release--0.0.0. You'll have to set up this branch like you've set up previous projects. That means .gitignore, package.json, src/ -- check out the bullet points under Yak-Shaving above to figure out what exactly you need to get this new project setup.

BEAST MODE

If you were designing a blog, what would you want it to look like? Check out some templating sites like ThemeForest and WrapBootstrap and find a template you like. DO NOT BUY IT. Instead, check out the demos and Skitch the layout you decide on. Be sure to Skitch it for different responsive views as well. Then upload the Skitches to /specs in your USERNAME.github.io repo. You'll be building this soon!

GitHub Revolution, Part 3: Octocat's Revenge

For the love of everything holy, please MERGE YOUR PRs FROM LAST WEEK if you haven't done so already. While you're at it, also git checkout your master branch and git pull that sucker to get your previous work merged locally. Feel free to delete all those remotely merged branches, too.

For tonight, start by creating a new branch named release--0.0.2 from master in your TIY-GitHub repository. Like last week's GitHub Revolution, all of your work will be on feature branches named with the feature-- prefix. Be sure to link each of your PRs that merge your feature branches into release--0.0.2 and your PR from release-0.0.2 into master.

:musical_note: WHO... ARE YOU? :musical_note:

Now it's time to fetch your own data. We'll need it later. Don't just slurp it down, though, check it out. Make sure it's correct... well, looks correct.

First, save the JSON data from the GitHub API for your own username. Remember where that is? Make sure you get the list of repositories that belong to you, too. Finally, get your most recent public activity. You might have to do a little hunting. Too bad it's not all linked from your profile data...

Give Postman a shot this time around and explore a little. What other data can you get out of the API for yourself? Even unauthenticated? Save your data to files in apis/github/users/, just like we did for Octocat.

Commit your JSON files into a branch named feature--my-little-profile and open a PR into release--0.0.2 for review, merge when you get 2x :+1:s.

Twirl Your Moustache...

Time for the basics of templates. Go back to the HTML for the profile column you finished last week. Start by replacing one of your list items with mustachioed placeholders ({{key_name}}) that match the key in the API data that the value represents. For example, the text The Octocat comes from the name key in octocat.json, so replace that text with {{name}}.

Put this work in the feature--profile-placeholders branch and open a PR into release--0.0.2, just like we did last time.

BEAST MODE

As you can imagine, we're going to use jQuery to replace those placeholders with the actual values from the JSON data, but can you figure out how? First you need to learn (or review) how to replace the contents of a tag with both the DOM and jQuery APIs. Second, how can you select the appropriate tags to update? Finally, how could you update the same HTML a second time with data from your own profile?

Turn the Page... Well, at least finish it up.

Last week, we wrote the HTML and (S)CSS to get the outermost layout elements and the left column. It's time for your next "feature": the larger section on the right, which is broken up into three sub-sections controlled by a Tabbed Document Interface (TDI) or "tabbed panels". We'll focus on the "Repositories" panel tonight:

Note the active tab...

Put it on my tab(s)...

For your first feature, focus on the tabs that appear at the top of the right column:

Put it on my tabs...

Don't neglect the button-like (hint!) interfaces to the right or forget to write jQuery / JavaScript to make the .active (suggestion!) tab the last one clicked. Start with three inactive tabs, though. Write enough JavaScript to make "Repositories" always active. Then make them update just the tabs... somehow. With jQuery magic.

Please do NOT use jQuery UI for these tabs. Discovering how the magic works is what this assignment is all about.

Create another new branch based on release--0.0.2 called feature--main-column-tabs. Push that to GitHub as soon as you're able and open a PR into release--0.0.2 again. Get feedback often and adjust your work accordingly until you get 2x :+1:s, then merge your work.

Who wants to look at an empty list?

Now we're ready to build out the "Repositories" section: the part of the page that corresponds to the "Repositories" tab. Hmm, wonder what would make a good connection between those two...? Any semantic tags coming to mind? What could we use that would work, even if we had CSS turned off? That's right, start with MF'g HTML that just works.

Then, look at the Skitches you placed in your specs/ folder for that section of the page. Since it's pretty obvious that we're going to replace all of this with some kind of jQuery magic, just build out three (3) examples of Octocat's repositories: "Spoon-Knife", "Hello-World" and "octocat.github.io".

Like before, push this branch to GitHub and open a PR into release--0.0.2 as soon as you have a commit. Merge it when you're finished (enough) and have gotten solid code reviews. Then git pull the updates into your local release--0.0.2 branch.

BEAST MODE

You could probably guess this step, but we'll walk through it anyway. Create a new branch from release--0.0.2 named feature--repo-list-placeholders for your work. Start replacing the data in one of your example repos with mustachioed placeholders that correspond to the keys in the API data for a single repository. We'll figure out the rest together.

cmauban commented 9 years ago

release 0.0.2 into master: https://github.com/cmauban/TIY-GitHub/pull/6 feature--little-profile into release 0.0.2: https://github.com/cmauban/TIY-GitHub/pull/7 feature--profile-placeholders into release 0.0.2: https://github.com/cmauban/TIY-GitHub/pull/8 feature--main-column into release 0.0.2: https://github.com/cmauban/TIY-GitHub/pull/9 feature--repo-list-layout into release 0.0.2: https://github.com/cmauban/TIY-GitHub/pull/10

Journal: https://github.com/cmauban/cmauban.github.io/pull/13 release 0.0.0: https://github.com/cmauban/cmauban.github.io/pull/14

comments: https://github.com/karjac14/TIY-GitHub/pull/9#issuecomment-145734713 https://github.com/jmcreasman/TIY-GitHub/pull/11#issuecomment-145686429

kellymurray commented 9 years ago

I left some comments on your code - check them out. Thanks for chatting with me today -- keep venturing off on your own. You have the mental model, you just have to work on the implementation! :)

al-the-x commented 9 years ago

Please review and close...

cmauban commented 9 years ago

@kellymurray Thank you so much! You made me feel much better!