OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
remove tile view component from source code
bsatarnejad65f57e0c59b9
diff --git a/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts b/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.tsindex 4e444826694..eeca092825d 100644--- a/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts+++ b/frontend/src/app/features/boards/board/board-actions/board-actions-registry.service.ts@@ -1,8 +1,16 @@import { Injectable } from '@angular/core';import { BoardActionService } from 'core-app/features/boards/board/board-actions/board-action.service';-import { ITileViewEntry } from 'core-app/features/boards/tile-view/tile-view.component';import { BannersService } from 'core-app/core/enterprise/banners.service';+export interface ITileViewEntry {+ text:string;+ attribute:string;+ icon:string;+ description:string;+ image:string;+ disabled?:boolean;+}+@Injectable({ providedIn: 'root' })export class BoardActionsRegistryService {constructor(diff --git a/frontend/src/app/features/boards/openproject-boards.module.ts b/frontend/src/app/features/boards/openproject-boards.module.tsindex 49f758e860e..9017e2898cd 100644--- a/frontend/src/app/features/boards/openproject-boards.module.ts+++ b/frontend/src/app/features/boards/openproject-boards.module.ts@@ -53,7 +53,6 @@ import { SubprojectBoardHeaderComponent } from 'core-app/features/boards/board/bimport { SubtasksBoardHeaderComponent } from 'core-app/features/boards/board/board-actions/subtasks/subtasks-board-header.component';import { StatusBoardHeaderComponent } from 'core-app/features/boards/board/board-actions/status/status-board-header.component';import { OpenprojectAutocompleterModule } from 'core-app/shared/components/autocompleter/openproject-autocompleter.module';-import { TileViewComponent } from './tile-view/tile-view.component';@NgModule({imports: [@@ -91,7 +90,6 @@ import { TileViewComponent } from './tile-view/tile-view.component';SubprojectBoardHeaderComponent,SubtasksBoardHeaderComponent,StatusBoardHeaderComponent,- TileViewComponent,],})export class OpenprojectBoardsModule {diff --git a/frontend/src/app/features/boards/tile-view/tile-view.component.html b/frontend/src/app/features/boards/tile-view/tile-view.component.htmldeleted file mode 100644index f8d5e78f10d..00000000000--- a/frontend/src/app/features/boards/tile-view/tile-view.component.html+++ /dev/null@@ -1,19 +0,0 @@-<div class="op-tile-block">- <button- *ngFor="let tile of tiles"- class="op-tile-block--tile button button_no-margin"- data-test-selector="op-tile-block"- type="button"- [disabled]="tile.disabled || disable"- (click)="created(tile.attribute)"- >- <img [src]="tile.image" class="op-tile-block--image"/>- <div>- <span- data-test-selector="op-tile-block-title"- class="op-tile-block--title"- >{{ tile.text }}</span>- <p class="op-tile-block--description" [textContent]="tile.description"></p>- </div>- </button>-</div>diff --git a/frontend/src/app/features/boards/tile-view/tile-view.component.sass b/frontend/src/app/features/boards/tile-view/tile-view.component.sassdeleted file mode 100644index e75a4795237..00000000000--- a/frontend/src/app/features/boards/tile-view/tile-view.component.sass+++ /dev/null@@ -1,44 +0,0 @@-.op-tile-block- $block: &- display: grid- grid-template-rows: repeat(minmax(200px, auto))- grid-template-columns: auto auto- grid-gap: 1rem-- &--tile- border-radius: 10px- display: grid- grid-template: 95px 1fr / 1fr- grid-template-columns: auto 1fr auto- grid-template-rows: auto- grid-row-gap: 5px- justify-items: left- background: #f7fafc- min-height: 150px-- &:disabled- background: #fafafa-- &:hover- text-decoration: none- border: 1px solid grey- border-radius: 10px !important- cursor: pointer-- &--image- display: block- margin-top: auto- margin-bottom: auto-- &--title- padding-top: 30px- padding-bottom: 5px- color: var(--primary-color-dark)- display: block- text-align: left- font-weight: var(--base-text-weight-bold)- font-size: large-- &--description- text-align: left- width: 90%diff --git a/frontend/src/app/features/boards/tile-view/tile-view.component.spec.ts b/frontend/src/app/features/boards/tile-view/tile-view.component.spec.tsdeleted file mode 100644index 81a84f9d1b8..00000000000--- a/frontend/src/app/features/boards/tile-view/tile-view.component.spec.ts+++ /dev/null@@ -1,52 +0,0 @@-import { ComponentFixture, TestBed } from '@angular/core/testing';-import { DebugElement } from '@angular/core';-import { By } from '@angular/platform-browser';-import { imagePath } from 'core-app/shared/helpers/images/path-helper';-import { TileViewComponent } from './tile-view.component';--describe('shows tiles', () => {- let app:TileViewComponent;- let fixture:ComponentFixture<TileViewComponent>;- let element:DebugElement;-- const tilesStub = [{- attribute: 'basic',- text: 'Basic board',- icon: 'icon-boards',- image: imagePath('board_creation_modal/lists.svg'),- description: `Create a board in which you can freely- create lists and order your work packages within.- Moving work packages between lists do not change the work package itself.`,- }];-- beforeEach(() => {- TestBed.configureTestingModule({- declarations: [- TileViewComponent],- providers: [],- }).compileComponents();-- fixture = TestBed.createComponent(TileViewComponent);- app = fixture.debugElement.componentInstance;- app.tiles = tilesStub;- element = fixture.debugElement;- });-- it('should render the component successfully', () => {- fixture.detectChanges();- const tile = document.querySelector('.op-tile-block--title');- expect(document.contains(tile)).toBeTruthy();- });-- it('should show each tile', () => {- fixture.detectChanges();- const tile:HTMLElement = element.query(By.css('.op-tile-block--title')).nativeElement;- expect(tile.textContent).toContain('Basic');- });-- it('should show the image', () => {- fixture.detectChanges();- const tile = document.querySelector('.op-tile-block--image');- expect(document.contains(tile)).toBeTruthy();- });-});diff --git a/frontend/src/app/features/boards/tile-view/tile-view.component.ts b/frontend/src/app/features/boards/tile-view/tile-view.component.tsdeleted file mode 100644index 8390eeff1bc..00000000000--- a/frontend/src/app/features/boards/tile-view/tile-view.component.ts+++ /dev/null@@ -1,30 +0,0 @@-import {- ChangeDetectionStrategy, Component, EventEmitter, Input, Output,-} from '@angular/core';--export interface ITileViewEntry {- text:string;- attribute:string;- icon:string;- description:string;- image:string;- disabled?:boolean;-}--@Component({- selector: 'tile-view',- styleUrls: ['./tile-view.component.sass'],- templateUrl: './tile-view.component.html',- changeDetection: ChangeDetectionStrategy.OnPush,-})-export class TileViewComponent {- @Input() public tiles:ITileViewEntry[];-- @Input() public disable = false;-- @Output() public create = new EventEmitter<string>();-- public created(attribute:string) {- this.create.emit(attribute);- }-}