Conversation
anndimi
left a comment
There was a problem hiding this comment.
Hey Ebba! Really good job on this project! You code was really easy to navigate through, no uneccesary repetitions and very clean. I don't have any negative comments. Your code works as I can already see project-music-releases on you site! Good job!
You have followed the project brief and finished the requirements.
| data: [numberOfProjects, 19 - numberOfProjects], | ||
| backgroundColor: ["rgb(255, 99, 132)", "rgb(255, 205, 86)"], |
| <!-- Roboto fontfamily --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet" /> | ||
|
|
||
| <script src="./script.js"></script> | ||
| <script src="./chart.js"></script> | ||
| </body> | ||
| </html> No newline at end of file | ||
| <!-- Open Sans fontfamily --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap" rel="stylesheet" /> |
There was a problem hiding this comment.
Nice using google fonts to add a more personal tuch!
| const technigoProjects = data.filter((repo) => repo.fork && repo.name.startsWith("project-")); | ||
|
|
||
| technigoProjects.sort((oldestRepo, newestRepo) => new Date(newestRepo.pushed_at) - new Date(oldestRepo.pushed_at)); |
There was a problem hiding this comment.
Nice working with the filter! And GG on sorting your projects from newest to oldest!
| if (filteredPull) { | ||
| getCommits(filteredPull.commits_url, repo.name); | ||
| getReview(filteredPull.review_comments_url, repo.name); | ||
| } else { | ||
| document.getElementById(`commits-${repo.name}`).innerHTML = "No pull request"; |
There was a problem hiding this comment.
I really like that you added an if else for whether you have any commits or not. And the fact that you've added info about who has reviewed your work is really neat!
| const getReview = (url, repoName) => { | ||
| fetch(url) | ||
| .then((response) => response.json()) | ||
| .then((data) => { | ||
| if (data.length === 0) { | ||
| document.getElementById(`${repoName}-container`).innerHTML += ""; | ||
| } else { | ||
| document.getElementById(`${repoName}-container`).innerHTML += /*html*/ ` | ||
| <p class="project-info">Reviewed by ${data[0].user.login}</p> |
There was a problem hiding this comment.
This is soooo neat! Very inspirational!
| .project { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| padding: 40px 0; | ||
| } | ||
|
|
||
| .projects-container { | ||
| line-height: 1.8; | ||
| margin-top: -40px; | ||
| } | ||
|
|
||
| .project-info { | ||
| font-family: "Open Sans", sans-serif; | ||
| font-size: 15px; | ||
| font-weight: 400; | ||
| color: #666666; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .project-name, | ||
| .chart-heading { | ||
| font-family: "Open Sans", sans-serif; | ||
| color: #222222; | ||
| font-size: 18px; | ||
| font-weight: 700; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .project-link { | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .project-link :hover { | ||
| background: linear-gradient(90deg, white, #e6e6e6 50%, #e6e6e6 50%, #e6e6e6 50%, white); | ||
| } | ||
|
|
||
| hr { | ||
| margin: auto; | ||
| width: 75vw; | ||
| background: linear-gradient(90deg, white, #e6e6e6, #e6e6e6, #e6e6e6, white); | ||
| height: 1px; | ||
| border: none; | ||
| } |
There was a problem hiding this comment.
Love the minimal styling you've done for the projects! And the fact that you get redirected to your repo when you click on them!
GitHub Tracker
The assignment was to create a GitHub tracker with all my Technigo-repos.
The problem
I started by fetching all the data that I wanted from the GitHub API. I began with fetching all the repos and filtering out only the forked ones from Technigo and continued with fetching the pull requests, commits and reviews. In order to inject data from one function to another I used dynamic IDs and DOM-selector.
If I had more time I would have wanted to sort the data by latest repo. I would also have wanted to add a dropdown meny were the user can choose to sort the repos after language. I would also like to style the GitHub tracker a bit more.
View it live
https://github-tracker-ebbadelsol.netlify.app/