Open Lucs1590 opened 3 years ago
01a0e9cadf
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
src/app/secondary-components/hobbies/hobbies.component.ts
✓ https://github.com/Lucs1590/Personal_Site/commit/19e1e72bf33be289dea9da318e5ef26de9a6f847 Edit
Create src/app/secondary-components/hobbies/hobbies.component.ts with contents:
• Use the Angular CLI command `ng generate component secondary-components/hobbies` to create the new hobbies component. This command automatically updates app.module.ts with the new component declaration.
• In hobbies.component.ts, import necessary Angular modules and services (e.g., HttpClient for fetching data from Strava).
• Implement OnInit to fetch and display the booklist, sports data from Strava, and computer setup information on component initialization.
• Use Bootstrap classes for styling to maintain consistency with the rest of the site.
src/app/secondary-components/hobbies/hobbies.component.ts
✓ Edit
Check src/app/secondary-components/hobbies/hobbies.component.ts with contents:
Ran GitHub Actions for 19e1e72bf33be289dea9da318e5ef26de9a6f847:
• Vercel Preview Comments: ✓
src/assets/i18n/en.json
✓ https://github.com/Lucs1590/Personal_Site/commit/c0c1853ef0a76a23f72767d2001cda2d33861b68 Edit
Modify src/assets/i18n/en.json with contents:
• Add new entries for the hobbies page, including titles and descriptions for the booklist, sports, and setup sections. Ensure these entries are added in both the English (en.json) and Portuguese (pt.json) files for internationalization.
--- +++ @@ -19,5 +19,13 @@ "publi.blog-not-found": "No blog posts matched your search criteria.", "publi.sci-not-found": "No scientific publications matched your search criteria.", "publi.tip": "Tip: If you can't find a specific text, try adding \"?search=tag\" after /publication in the URL.", - "recommendations.title": "Recommendations" + "recommendations.title": "Recommendations", + "hobbies.title": "Hobbies", + "hobbies.description": "A glimpse into the activities that fuel my creativity and keep me energized.", + "hobbies.booklist.title": "Booklist", + "hobbies.booklist.description": "A collection of books that have influenced my thinking and broadened my perspectives.", + "hobbies.sports.title": "Sports", + "hobbies.sports.description": "Tracking my annual sports goals and weekly progress with data from Strava.", + "hobbies.setup.title": "Setup", + "hobbies.setup.description": "The gadgets and gear that power my digital life and productivity." }
src/assets/i18n/en.json
✓ Edit
Check src/assets/i18n/en.json with contents:
Ran GitHub Actions for c0c1853ef0a76a23f72767d2001cda2d33861b68:
• Vercel Preview Comments: ✓
src/app/secondary-components/navbar/navbar.component.ts
✓ https://github.com/Lucs1590/Personal_Site/commit/c2b3393443b8b2ecc9d1e582a01565b0db4084c4 Edit
Modify src/app/secondary-components/navbar/navbar.component.ts with contents:
• In the defineMenu method, add a new item to the itemsList array for the hobbies page. Use the TranslateService to support internationalization for the navbar label.
• Example addition: `{ name: firstValueFrom(this.translate.get('nav.hobbies')), ref: ['/hobbies'], mobile: true, desktop: true }`
• Ensure the 'nav.hobbies' key is added to the i18n JSON files with appropriate translations.
--- +++ @@ -50,6 +50,12 @@ mobile: false, desktop: false }, + { + name: firstValueFrom(this.translate.get('nav.hobbies')), + ref: ['/hobbies'], + mobile: true, + desktop: true + }, ]; }
src/app/secondary-components/navbar/navbar.component.ts
✓ Edit
Check src/app/secondary-components/navbar/navbar.component.ts with contents:
Ran GitHub Actions for c2b3393443b8b2ecc9d1e582a01565b0db4084c4:
• Vercel Preview Comments: ✓
src/app/app-routing.module.ts
✓ https://github.com/Lucs1590/Personal_Site/commit/b490bbbb30e851da3d9135328a19c3e30fedca2d Edit
Modify src/app/app-routing.module.ts with contents:
• Import the HobbiesComponent at the top of the file.
• Add a new route for the hobbies page in the RouterModule's routes array: `{ path: 'hobbies', component: HobbiesComponent }`.
• This modification ensures the new hobbies page is accessible through routing.
--- +++ @@ -2,6 +2,7 @@ import { Routes, RouterModule } from '@angular/router'; import { NotFoundComponent } from './secondary-components/not-found/not-found.component'; import { PublicationsComponent } from './secondary-components/publications/publications.component'; +import { HobbiesComponent } from './secondary-components/hobbies/hobbies.component'; import { PortfolioComponent } from './portfolio/portfolio.component'; import { SeparadorComponent } from './separador/separador.component'; @@ -10,6 +11,7 @@ { path: 'home', component: SeparadorComponent, title: 'Lucas Brito - Personal Website' }, { path: 'publications', component: PublicationsComponent, title: 'Lucas Brito - Publications' }, { path: 'portfolio', component: PortfolioComponent, title: 'Lucas Brito - Portfolio' }, + { path: 'hobbies', component: HobbiesComponent }, { path: '404', component: NotFoundComponent, title: '404 - Not Found' }, { path: '**', redirectTo: '404', pathMatch: 'full', title: '404 - Not Found' } ];
src/app/app-routing.module.ts
✓ Edit
Check src/app/app-routing.module.ts with contents:
Ran GitHub Actions for b490bbbb30e851da3d9135328a19c3e30fedca2d:
• Vercel Preview Comments: ✓
src/app/services/strava.service.ts
✓ https://github.com/Lucs1590/Personal_Site/commit/c504f4cf991b8c7ffadc730a6f24143ebca3bfab Edit
Create src/app/services/strava.service.ts with contents:
• If integrating with Strava, create a new service to handle API requests to Strava.
• Use Angular's HttpClient module to fetch data from Strava's API.
• Implement methods to retrieve the user's annual sports goals and weekly progress.
• Inject this service into the hobbies component to display the fetched data.
src/app/services/strava.service.ts
✓ Edit
Check src/app/services/strava.service.ts with contents:
Ran GitHub Actions for c504f4cf991b8c7ffadc730a6f24143ebca3bfab:
• Vercel Preview Comments: ✓
I have finished reviewing the code for completeness. I did not find errors for sweep/add_hobbies
.
💡 To recreate the pull request edit the issue title or description. Something wrong? Let us know.
This is an automated message generated by Sweep AI.
Create a page focused on my hobbies, so that this page contains information about books that I have already read and that I am currently reading. Additionally, use a section for sports, so that I can consume Strava data and make my annual sports goals and weekly progress visible. Finally, make a setup section, demonstrating what items and gadgets I currently have in my computer setup. Do this by maintaining the standard user interface that we use on the site, with bootstrap, and so that it looks professional, within a landing page, also adding this hobbies section in the navbar.
Checklist
- [X] Create `src/app/secondary-components/hobbies/hobbies.component.ts` ✓ https://github.com/Lucs1590/Personal_Site/commit/19e1e72bf33be289dea9da318e5ef26de9a6f847 [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/secondary-components/hobbies/hobbies.component.ts) - [X] Running GitHub Actions for `src/app/secondary-components/hobbies/hobbies.component.ts` ✓ [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/secondary-components/hobbies/hobbies.component.ts) - [X] Modify `src/assets/i18n/en.json` ✓ https://github.com/Lucs1590/Personal_Site/commit/c0c1853ef0a76a23f72767d2001cda2d33861b68 [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/assets/i18n/en.json) - [X] Running GitHub Actions for `src/assets/i18n/en.json` ✓ [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/assets/i18n/en.json) - [X] Modify `src/app/secondary-components/navbar/navbar.component.ts` ✓ https://github.com/Lucs1590/Personal_Site/commit/c2b3393443b8b2ecc9d1e582a01565b0db4084c4 [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/secondary-components/navbar/navbar.component.ts) - [X] Running GitHub Actions for `src/app/secondary-components/navbar/navbar.component.ts` ✓ [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/secondary-components/navbar/navbar.component.ts) - [X] Modify `src/app/app-routing.module.ts` ✓ https://github.com/Lucs1590/Personal_Site/commit/b490bbbb30e851da3d9135328a19c3e30fedca2d [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/app-routing.module.ts) - [X] Running GitHub Actions for `src/app/app-routing.module.ts` ✓ [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/app-routing.module.ts) - [X] Create `src/app/services/strava.service.ts` ✓ https://github.com/Lucs1590/Personal_Site/commit/c504f4cf991b8c7ffadc730a6f24143ebca3bfab [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/services/strava.service.ts) - [X] Running GitHub Actions for `src/app/services/strava.service.ts` ✓ [Edit](https://github.com/Lucs1590/Personal_Site/edit/sweep/add_hobbies/src/app/services/strava.service.ts)