From 0dd8dcfcd6ce7d3dc04655130abcbfa96073089c Mon Sep 17 00:00:00 2001 From: Jonatan Vicente Date: Mon, 7 Oct 2024 13:01:05 +0200 Subject: [PATCH] Revert "3.1.8-RELEASE" This reverts commit 2f7fe8fe444e91e16d33bdaf64c6d4f08880c06a, reversing changes made to 804d70dafe2f759237705e57d65d173a81c56351. --- CHANGELOG.md | 79 ++++++++++++++- angular.json | 2 +- conf/.env.CI.dev | 2 +- package.json | 7 +- src/app/app.module.ts | 3 +- .../challenge-info.component.html | 32 +------ .../challenge-info.component.scss | 96 ++++++++----------- .../challenge-info.component.spec.ts | 35 ------- .../challenge-info.component.ts | 34 ------- 9 files changed, 120 insertions(+), 170 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54ec0c70..7f4125c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -### [ita-challenges-frontend-3.1.8-RELEASE] -- Challenge Detail Screen mobile reviewing ### [ita-challenges-frontend-3.1.7-RELEASE] @@ -48,7 +46,7 @@ and this project adheres to ### [ita-challenges-frontend-3.0.3-RELEASE] - Ugraded to Angular 18 -- Fixed package destination folder, in Angular 18 the destination folder is dist/ita-challenges-frontend/browser +- Fixed package destination folder, in Angular 18 the destination folder is dist/ita-challenges-frontend/browser ### [ita-challenges-frontend-2.14.0-RELEASE] - 2024-06-04 (feature#355) @@ -56,11 +54,22 @@ and this project adheres to ### [ita-challenges-frontend-2.13.1-RELEASE] - 2024-05-16 (feature#328) -- Verified component display with /register true +- Verified component display with /register true (hardcoded) + +### [ita-challenges-frontend-2.13.1-RELEASE] - 2024-05-16 (feature#328) + +- Verified component display with /register true (hardcoded) ### [ita-challenges-frontend-2.13.0-RELEASE] - 2024-05-15 (feature#331) - Add filter methods and implement page navigation with filters and sort filters +### [ita-challenges-frontend-2.13.0-RELEASE] - 2024-05-15 (feature#331) + +- Add filter methods and implement page navigation with filters and sort filters + +### [ita-challenges-frontend-2.12.2-RELEASE] - 2024-05-14 (feature#337) + +- Link to challenges in related challenges fixed ### [ita-challenges-frontend-2.12.2-RELEASE] - 2024-05-14 (feature#337) @@ -73,16 +82,28 @@ and this project adheres to ### [ita-challenges-frontend-2.12.0-RELEASE] - 2024-05-13 (feature#215) +- Link Related +### [ita-challenges-frontend-2.12.0-RELEASE] - 2024-05-13 (feature#215) + - Link Related ### [ita-challenges-frontend-2.11.0-RELEASE] - 2024-05-07 (feature#293) +- Add order method for creation_date. Implement the formatDatePipe" +### [ita-challenges-frontend-2.11.0-RELEASE] - 2024-05-07 (feature#293) + - Add order method for creation_date. Implement the formatDatePipe" ### [ita-challenges-frontend-2.10.3-RELEASE] - 2024-05-07 - Changing URL ita-wiki +- Changing URL ita-wiki + +### [ita-challenges-frontend-2.10.2-RELEASE] - 2024-05-07 + +- Relative paths to image optimized. Internationalization of language literals. + ### [ita-challenges-frontend-2.10.2-RELEASE] - 2024-05-07 - Relative paths to image optimized. Internationalization of language literals. @@ -91,98 +112,148 @@ and this project adheres to - Refactoring auth.service & token.service +- Refactoring auth.service & token.service + ### [ita-challenges-frontend-2.9.0-RELEASE] - 2024-04-29 - Fix slow load and add pagination +- Fix slow load and add pagination + ### [ita-challenges-frontend-2.8.3-RELEASE] - 2024-04-25 - Fixing auth.service in challenge-header and challenge info. +- Fixing auth.service in challenge-header and challenge info. + ### [ita-challenges-frontend-2.8.1-RELEASE] - 2024-04-23 - Link resources-card +- Link resources-card + ### [ita-challenges-frontend-2.8.0-RELEASE] - 2024-04-23 - Added encryption cookies helper. +- Added encryption cookies helper. + ### [ita-challenges-frontend-2.7.2-RELEASE] - 2024-04-23 - Link resources-card +- Link resources-card + ### [ita-challenges-frontend-2.7.1-RELEASE] - 2024-04-22 - Left menu adaptation +- Left menu adaptation + ### [ita-challenges-frontend-2.7.0-RELEASE] - 2024-04-09 - New changes on challenge-header button and styles. +- New changes on challenge-header button and styles. + ### [ita-challenges-frontend-2.6.0-RELEASE] - 2024-04-18 - Added dynamic translation pipe +- Added dynamic translation pipe + ### [ita-challenges-frontend-2.5.0-RELEASE] - 2024-04-18 - Register/Login placeholders adaptation +- Register/Login placeholders adaptation + ### [ita-challenges-frontend-2.3.1-RELEASE] - 2024-04-17 - Included ESLint into development +- Included ESLint into development + ### [ita-challenges-frontend-2.3.0-RELEASE] - 2024-04-02 +- Add encryption cookies helper. + + - Add encryption cookies helper. ### [ita-challenges-frontend-2.2.0-RELEASE] - 2024-04-08 - Challenge lists translates +- Challenge lists translates + ### [ita-challenges-frontend-2.0.71-RELEASE] - 2024-04-02 - Delete iteneraries service and implement the method on chalenges.service +- Delete iteneraries service and implement the method on chalenges.service + ### [ita-challenges-frontend-2.0.68-RELEASE] - 2024-03-20 - Add responsiveness to challenge filters modal +- Add responsiveness to challenge filters modal + ### [ita-challenges-frontend-2.0.72-RELEASE] - 2024-04-03 - Added responsiveness to login and register modals. +- Added responsiveness to login and register modals. + ### [ita-challenges-frontend-2.0.70-RELEASE] - 2024-03-21 - Challenge list translates +- Challenge list translates + ### [ita-challenges-frontend-2.0.69-RELEASE] - 2024-03-07 - Adapt mobile-nav to Figma" +- Adapt mobile-nav to Figma" + ### [ita-challenges-frontend-2.0.60-RELEASE] - 2024-03-07 - Change rename environment and delete dummy variables name" +- Change rename environment and delete dummy variables name" + ### [ita-challenges-frontend-2.0.53-RELEASE] - 2024-03-07 - Translate login, register and validator service +- Translate login, register and validator service + ### [ita-challenges-frontend-2.0.58-RELEASE] - 2024-03-12 - Login error msg +- Login error msg + ### [ita-challenges-frontend-2.0.52-RELEASE] - 2024-02-29 - Fixing register and login basic functionalities +- Fixing register and login basic functionalities + ### [ita-challenges-frontend-2.0.51-RELEASE] - 2024-02-29 - Fixing nginx.conf to find assets folder +- Fixing nginx.conf to find assets folder + ### [ita-challenges-frontend-2.0.46-RELEASE] - 2024-02-28 - Add 2.2.4 and 9 to GUIDELINES_CA.md +- Add 2.2.4 and 9 to GUIDELINES_CA.md + ### [ita-challenges-frontend-2.0.45-RELEASE] - 2024-02-28 - CI enabled +- CI enabled diff --git a/angular.json b/angular.json index 18ffc7fd..3581b681 100755 --- a/angular.json +++ b/angular.json @@ -40,7 +40,7 @@ "scripts": [ "node_modules/jquery/dist/jquery.min.js", "node_modules/@popperjs/core/dist/umd/popper.min.js", - "node_modules/bootstrap/dist/css/bootstrap.min.css" + "node_modules/bootstrap/dist/js/bootstrap.min.js" ], "browser": "src/main.ts", "stylePreprocessorOptions": { diff --git a/conf/.env.CI.dev b/conf/.env.CI.dev index e916832f..4b9d8067 100755 --- a/conf/.env.CI.dev +++ b/conf/.env.CI.dev @@ -1,2 +1,2 @@ MICROSERVICE_DEPLOY=ita-challenges-frontend -MICROSERVICE_VERSION=3.1.8-RELEASE +MICROSERVICE_VERSION=3.1.7-RELEASE diff --git a/package.json b/package.json index bfa457e4..f57fb644 100755 --- a/package.json +++ b/package.json @@ -1,9 +1,6 @@ { "name": "ita-challenges-frontend", - "version": "3.1.8-RELEASE", - "sideEffects": [ - "node_modules/@angular/localize" - ], + "version": "3.1.7-RELEASE", "scripts": { "ng": "ng", "start": "ng serve --proxy-config proxy.conf.dev.json", @@ -77,6 +74,6 @@ "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.1.1", "jest": "^29.5.0", - "typescript": "^5.4.4" + "typescript": "^5.4.5" } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index fe78f2fe..4e688ad8 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,7 +2,7 @@ import { LOCALE_ID, NgModule } from '@angular/core' import { BrowserModule } from '@angular/platform-browser' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http' -import { NgbModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap' +import { NgbModule } from '@ng-bootstrap/ng-bootstrap' import { AppRoutingModule } from './app-routing.module' import { AppComponent } from './app.component' import { CoreModule } from './core/core.module' @@ -35,7 +35,6 @@ export function HttpLoaderFactory (http: HttpClient): any { ], bootstrap: [AppComponent], imports: [BrowserModule, - NgbDropdownModule, AppRoutingModule, BrowserAnimationsModule, CoreModule, diff --git a/src/app/modules/challenge/components/challenge-info/challenge-info.component.html b/src/app/modules/challenge/components/challenge-info/challenge-info.component.html index 44294845..0cf7eddb 100755 --- a/src/app/modules/challenge/components/challenge-info/challenge-info.component.html +++ b/src/app/modules/challenge/components/challenge-info/challenge-info.component.html @@ -1,31 +1,3 @@ - - - - - - - - - -
- - - + \ No newline at end of file diff --git a/src/app/modules/challenge/components/challenge-info/challenge-info.component.scss b/src/app/modules/challenge/components/challenge-info/challenge-info.component.scss index 78e9ade9..4bd4a808 100755 --- a/src/app/modules/challenge/components/challenge-info/challenge-info.component.scss +++ b/src/app/modules/challenge/components/challenge-info/challenge-info.component.scss @@ -127,69 +127,51 @@ p, ul li { color: $black-3; } -/* Menú desplegable para móviles */ -.dropdown-container { - display: none; /* Ocultar por defecto en pantallas grandes */ - - .dropdown-toggle { - background-color: #B91879; - color: white; - padding: 10px; - font-size: 16px; - font-weight: 600; - border: none; - border-radius: 10px; - cursor: pointer; - width: 100%; - text-align: left; - margin-top: 15px; - - &:hover { - background-color: darken(#B91879, 10%); - } - } - - .dropdown-menu { - display: none; /* Se despliega solo cuando está activo */ - position: relative; - background-color: white; - min-width: 100%; - box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2); - border-radius: 5px; - z-index: 1; - - .dropdown-item { - padding: 10px; - color: #333; - cursor: pointer; - - &:hover { - background-color: #B91879; - color: white; +@media screen and (max-width: 768px) { + .details-body { + flex-direction: column; + + .details-text { + order: 2; + } + + app-solution { + order: 1; } - } - } - - &.open .dropdown-menu { - display: block; } - } - - /* Media query solo para móviles */ - @media screen and (max-width: 768px) { - .dropdown-container { - display: block; /* Mostrar el menú desplegable en pantallas móviles */ + + :host { + overflow-x: auto; } - - /* Ocultar las pestañas en móviles */ + ul.nav-tabs { - display: none; + display: flex; + flex-wrap: wrap; + justify-content: space-around; + align-items: center; + border: none; } - } - -/*@media screen and (max-width: 560px) { + .nav-link { + background-color: white; + color: $gray-3; + border: 1px solid $gray-3; + border-radius: 50px; + padding: 10px 20px; + margin: 0 10px 0 0; + transition: 0.2s; + + &.active, &:hover { + background-color: $primary; + color: white; + border: 1px solid $primary; + font-weight: bold; + } + } +} + +@media screen and (max-width: 560px) { li.related { display: none; } -}*/ +} \ No newline at end of file diff --git a/src/app/modules/challenge/components/challenge-info/challenge-info.component.spec.ts b/src/app/modules/challenge/components/challenge-info/challenge-info.component.spec.ts index 9533f573..249f7cbe 100755 --- a/src/app/modules/challenge/components/challenge-info/challenge-info.component.spec.ts +++ b/src/app/modules/challenge/components/challenge-info/challenge-info.component.spec.ts @@ -91,39 +91,4 @@ describe('ChallengeInfoComponent', () => { component.activeIdChange.emit(activeId) expect(component.activeId).toBe(newActiveId) }) - - it('should select a tab, update activeId, selectedTabLabel, and close dropdown', () => { - jest.spyOn(component.activeIdChange, 'emit') - - const newActiveId = 3 - const newLabel = 'Resources' - component.selectTab(newActiveId, newLabel) - - expect(component.activeId).toBe(newActiveId) - expect(component.selectedTabLabel).toBe(newLabel) - - expect(component.isDropdownOpen).toBe(false) - - expect(component.activeIdChange.emit).toHaveBeenCalledWith(newActiveId) - }) - it('should toggle dropdown state', () => { - // Estado inicial del menú desplegable - component.isDropdownOpen = false - - component.toggleDropdown() - - expect(component.isDropdownOpen).toBe(true) - - component.toggleDropdown() - - expect(component.isDropdownOpen).toBe(false) - }) - it('should update selectedTabLabel when selectTab is called', () => { - const newActiveId = 3 - const newLabel = 'Resources' - - component.selectTab(newActiveId, newLabel) - - expect(component.selectedTabLabel).toBe(newLabel) - }) }) diff --git a/src/app/modules/challenge/components/challenge-info/challenge-info.component.ts b/src/app/modules/challenge/components/challenge-info/challenge-info.component.ts index d8802b30..23d4a119 100755 --- a/src/app/modules/challenge/components/challenge-info/challenge-info.component.ts +++ b/src/app/modules/challenge/components/challenge-info/challenge-info.component.ts @@ -49,9 +49,6 @@ export class ChallengeInfoComponent implements AfterContentChecked { @Output() activeIdChange: EventEmitter = new EventEmitter() - selectedTabLabel: string = 'Details' - isDropdownOpen: boolean = false - solutionsDummy = [{ solutionName: 'dummy1' }, { solutionName: 'dummy2' }] showStatement = true @@ -88,7 +85,6 @@ export class ChallengeInfoComponent implements AfterContentChecked { ) { this.isLogged = true } - this.updateSelectedTabLabel(this.activeId) } loadRelatedChallenges (id: string): void { @@ -107,36 +103,6 @@ export class ChallengeInfoComponent implements AfterContentChecked { } } - selectTab (id: number, label: string): void { - this.activeId = id - this.selectedTabLabel = label - this.isDropdownOpen = false - this.activeIdChange.emit(this.activeId) - } - - toggleDropdown (): void { - this.isDropdownOpen = !this.isDropdownOpen// Alterna el estado del menú desplegable - } - - private updateSelectedTabLabel (id: number): void { - switch (id) { - case 1: - this.selectedTabLabel = 'Details' - break - case 2: - this.selectedTabLabel = 'Solutions' - break - case 3: - this.selectedTabLabel = 'Resources' - break - case 4: - this.selectedTabLabel = 'Related' - break - default: - this.selectedTabLabel = 'Details' - } - } - openSendSolutionModal (): void { this.modalService.open(SendSolutionModalComponent, { centered: true,