Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hobbies #40

Open
10 tasks done
Lucs1590 opened this issue Sep 22, 2021 · 1 comment · May be fixed by #198
Open
10 tasks done

Add Hobbies #40

Lucs1590 opened this issue Sep 22, 2021 · 1 comment · May be fixed by #198
Labels
enhancement New feature or request features Complete feature to the website. frontend Tasks realated to frontend area. javascript Pull requests that update Javascript code sweep

Comments

@Lucs1590
Copy link
Owner

Lucs1590 commented Sep 22, 2021

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.

  • Booklist;
  • Setup;
  • Sports.
Checklist
  • Create src/app/secondary-components/hobbies/hobbies.component.ts19e1e72 Edit
  • Running GitHub Actions for src/app/secondary-components/hobbies/hobbies.component.tsEdit
  • Modify src/assets/i18n/en.jsonc0c1853 Edit
  • Running GitHub Actions for src/assets/i18n/en.jsonEdit
  • Modify src/app/secondary-components/navbar/navbar.component.tsc2b3393 Edit
  • Running GitHub Actions for src/app/secondary-components/navbar/navbar.component.tsEdit
  • Modify src/app/app-routing.module.tsb490bbb Edit
  • Running GitHub Actions for src/app/app-routing.module.tsEdit
  • Create src/app/services/strava.service.tsc504f4c Edit
  • Running GitHub Actions for src/app/services/strava.service.tsEdit
@Lucs1590 Lucs1590 created this issue from a note in Personal Site (To do) Sep 22, 2021
@Lucs1590 Lucs1590 added enhancement New feature or request frontend Tasks realated to frontend area. features Complete feature to the website. javascript Pull requests that update Javascript code sweep labels Mar 21, 2024
Copy link
Contributor

sweep-ai bot commented Mar 21, 2024

🚀 Here's the PR! #198

See Sweep's progress at the progress dashboard!
💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: 01a0e9cadf)

Tip

I can email you next time I complete a pull request if you set up your email here!


Actions (click)

  • ↻ Restart Sweep

Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description.

import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
import { firstValueFrom } from 'rxjs';
import { UtilsService } from 'src/app/services/utils.service';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css']
})
export class NavbarComponent implements OnInit {
mobile = false;
itemsList: { name: Promise<string> | string; ref: string[]; mobile: boolean; desktop: boolean }[];
constructor(
public utils: UtilsService,
private translate: TranslateService,
private router: Router
) {
translate.onLangChange.subscribe((event: LangChangeEvent) => {
this.defineMenu();
this.filterItems();
});
}
ngOnInit(): void {
this.mobile = window.innerWidth <= 991;
this.defineMenu();
this.filterItems();
}
defineMenu() {
this.itemsList = [
{
name: firstValueFrom(this.translate.get('nav.home')),
ref: ['/'],
mobile: true,
desktop: true
},
{
name: firstValueFrom(this.translate.get('nav.publications')),
ref: ['/publications'],
mobile: true,
desktop: true
},
{
name: 'Portfolio',
ref: [''],
mobile: false,
desktop: false
},
];
}
filterItems() {
this.itemsList = this.mobile ? this.itemsList?.filter(item => item.mobile) : this.itemsList?.filter(item => item.desktop);
}
isActive(route: string[]): boolean {
if (route[0] === '/') {
route = ['/home'];
}
return this.router.isActive(route[0], true);
}

{
"home.sub_title": "Technologist in Big Data in Agribusiness",
"home.about": "About me",
"home.description": "Hello, welcome to my website! My name is Lucas de Brito Silva, and at 24, I embark on an exciting journey in the field of Technology. Since 2021, I made a transition from the area of systems and application development to the fascinating world of data. Currently, I am a Machine Learning Engineer at <a href=\"https://agibank.com.br/\" class=\"text-white\" target=\"_blank\">Agibank</a>. <br><br>My journey includes training in the Computer Technician course at ETEC Professor Massuyuki Kawano and pioneering in the first class to graduate in Big Data in Agribusiness, at FATEC Shunji Nishimura. Additionally, I am currently pursuing a master's degree in Computer Science at São Paulo State University \"Júlio de Mesquita Filho\" (UNESP).<br><br>My interests and passions lie in the areas of data, computational intelligence, deep learning, computer vision, and machine learning engineering. I hope you enjoy your visit to my website.",
"lang": "pt",
"nav.publications": "Publications",
"nav.home": "Home",
"not_found.sub": "Something went wrong...",
"not_found.sub_2": "Page not found!",
"not_found.back_button": "Back to Home",
"publi.title": "Publications",
"publi.description": "I enjoy writing to contribute to the community and enhance my knowledge. My topics usually revolve around science and digital technologies. Feel free to read my blog posts on Medium or Dev Community, or explore my scientific publications on Google Scholar or ResearchGate.",
"publi.blog-subtitle": "Blog",
"publi.sci-subtitle": "Scientific Publications",
"publi.read-more": "Read more...",
"modal-off.title": "You are offline!",
"modal-off.description": "This website is best viewed online. Please check your internet connection and try again.",
"modal-off.close": "Close",
"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.",

import { BrowserModule, HammerModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { NgOptimizedImage } from '@angular/common';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { NgxUiLoaderModule, NgxUiLoaderConfig } from 'ngx-ui-loader';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { SeparadorComponent } from './separador/separador.component';
import { MHomeComponent } from './m-home/m-home.component';
import { IconesComponent } from './secondary-components/icones/icones.component';
import { PublicationsComponent } from './secondary-components/publications/publications.component';
import { TechnologiesComponent } from './secondary-components/technologies/technologies.component';
import { RecommendationsComponent } from './secondary-components/recommendations/recommendations.component';
import { NotFoundComponent } from './secondary-components/not-found/not-found.component';
import { NavbarComponent } from './secondary-components/navbar/navbar.component';
import { PortfolioComponent } from './portfolio/portfolio.component';
import { DisableWhenOfflineDirective } from './services/disable-when-offline.directive';
import { OfflineModalComponent } from './secondary-components/offline-modal/offline-modal.component';
export const httpLoaderFactory = (http: HttpClient) => new TranslateHttpLoader(http, './assets/i18n/', '.json');
const ngxLoaderUiConfig: NgxUiLoaderConfig = {
bgsColor: '#e69c24',
bgsOpacity: 0.5,
bgsPosition: 'bottom-right',
bgsSize: 60,
bgsType: 'ball-spin-clockwise',
blur: 11,
delay: 0,
fastFadeOut: true,
fgsColor: '#e69c24',
fgsPosition: 'center-center',
fgsSize: 50,
fgsType: 'three-bounce',
gap: 24,
logoPosition: 'center-center',
logoSize: 120,
logoUrl: '',
masterLoaderId: 'master',
overlayBorderRadius: '0',
overlayColor: 'rgba(100, 100, 100, 0.9)',
pbColor: 'red',
pbDirection: 'ltr',
pbThickness: 3,
hasProgressBar: false,
text: '',
textColor: '#FFFFFF',
textPosition: 'center-center',
maxTime: -1,
minTime: 300
};
@NgModule({
declarations: [
DisableWhenOfflineDirective,
AppComponent,
HomeComponent,
SeparadorComponent,
MHomeComponent,
IconesComponent,
OfflineModalComponent,
PublicationsComponent,
TechnologiesComponent,
RecommendationsComponent,
NotFoundComponent,
NavbarComponent,
PortfolioComponent,
],
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
ReactiveFormsModule,
HttpClientModule,
NgOptimizedImage,
NgxUiLoaderModule.forRoot(ngxLoaderUiConfig),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: httpLoaderFactory,
deps: [HttpClient]
}
}),
HammerModule,
FontAwesomeModule,
NgxSkeletonLoaderModule,
AppRoutingModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(library: FaIconLibrary) {
library.addIconPacks(fas, far, fab);
}


Step 2: ⌨️ Coding

  • Create src/app/secondary-components/hobbies/hobbies.component.ts19e1e72 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.
  • Running GitHub Actions for src/app/secondary-components/hobbies/hobbies.component.tsEdit
Check src/app/secondary-components/hobbies/hobbies.component.ts with contents:

Ran GitHub Actions for 19e1e72bf33be289dea9da318e5ef26de9a6f847:
• Vercel Preview Comments:

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."
 }
  • Running GitHub Actions for src/assets/i18n/en.jsonEdit
Check src/assets/i18n/en.json with contents:

Ran GitHub Actions for c0c1853ef0a76a23f72767d2001cda2d33861b68:
• Vercel Preview Comments:

  • Modify src/app/secondary-components/navbar/navbar.component.tsc2b3393 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
+      },
     ];
   }
 
  • Running GitHub Actions for src/app/secondary-components/navbar/navbar.component.tsEdit
Check src/app/secondary-components/navbar/navbar.component.ts with contents:

Ran GitHub Actions for c2b3393443b8b2ecc9d1e582a01565b0db4084c4:
• Vercel Preview Comments:

  • Modify src/app/app-routing.module.tsb490bbb 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' }
 ];
  • Running GitHub Actions for src/app/app-routing.module.tsEdit
Check src/app/app-routing.module.ts with contents:

Ran GitHub Actions for b490bbbb30e851da3d9135328a19c3e30fedca2d:
• Vercel Preview Comments:

  • Create src/app/services/strava.service.tsc504f4c 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.
  • Running GitHub Actions for src/app/services/strava.service.tsEdit
Check src/app/services/strava.service.ts with contents:

Ran GitHub Actions for c504f4cf991b8c7ffadc730a6f24143ebca3bfab:
• Vercel Preview Comments:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/add_hobbies.


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 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.

@sweep-ai sweep-ai bot linked a pull request Mar 21, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request features Complete feature to the website. frontend Tasks realated to frontend area. javascript Pull requests that update Javascript code sweep
Projects
No open projects
Personal Site
  
To do
Development

Successfully merging a pull request may close this issue.

1 participant