Closed cmauban closed 9 years ago
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.
Did you finish all of your questions and terms last week? No? Finish them tonight!
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.
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!
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
.
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.
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.
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?
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:
For your first feature, focus on the tabs that appear at the top of the right column:
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.
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.
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.
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
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! :)
Please review and close...
@kellymurray Thank you so much! You made me feel much better!
USERNAME.github.io
journal-week-5
intomaster
release--0.0.0
intomaster
TIY-GitHub
fromrelease--0.0.2
intomaster
TIY-GitHub
fromfeature--*
(multiple) intorelease--0.0.2
USERNAME.github.io
fromjournal-week-4
intomaster
TIY-Chessboard
TIY-GitHub
(from last week)USERNAME.github.io
journal-week-5
frommaster
release--0.0.0
frommaster
TIY-GitHub
release--0.0.2
frommaster
feature--profile-placeholders
fromrelease--0.0.2
feature--FILL_ME_IN
fromrelease--0.0.2
USERNAME.github.io:journal-week-5
journal-week-5.md
or something creativetutorial-week-5.md
or something creativeresource-week-5.md
or something creativeUSERNAME.github.io:release--0.0.0
.gitignore
-- with the following patterns:/dist
/node_modules
/bower_components
css
package.json
-- andnpm install --link --save-dev
bower
browser-sync
gulp
node-sass
specs/
-- for BEAST MODEsrc/
-- fromyo h5bp
js/
main.js
scss/
_common.scss
_desktop.scss
_mobile.scss
_tablet.scss
main.scss
-- with@import
links to abovecss/
-- DELETED!index.html
TIY-GitHub:release--0.0.2
apis/github/users/
USERNAME.json
-- for your profile dataUSERNAME/
repos.json
-- for your repository dataactivity.json
-- for your public eventssrc/
scss/_custom.scss
-- to clean up your (S)CSSjs/main.js
-- in case you need to catch up onjQuery.ajax
index.html
feature--my-little-profile
USERNAME.json
USERNAME/repos.json
USERNAME/activity.json
feature--profile-placeholders
name
...login
?company
man, er... monster.location
?email
!link
...!moment
to figure this out...feature--main-column-tabs
<nav>
-igation...<button>
?.active
....tabs
needs.panels
...feature--repo-list-layout
Search
...feature--repo-list-placeholders
description
is not very descriptive...language
.stargazer_count
forks
when all you need is a"Spoon-Knife"