-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move buttons to add a swimlane between the swimlanes in order t…
…o determine the position more easy
- Loading branch information
1 parent
4e4b025
commit 812f4e0
Showing
6 changed files
with
114 additions
and
33 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div class="add-swimlane-container" [class.position-bottom]="position === 'bottom'"> | ||
<div class="container-border"></div> | ||
<button class="add-swimlane-btn" [matMenuTriggerFor]="addComponentMenu"> | ||
<i esIcon="add"></i> | ||
</button> | ||
<div class="container-border"></div> | ||
<mat-menu #addComponentMenu="matMenu"> | ||
<button | ||
mat-menu-item | ||
*ngFor="let option of swimlaneTypeOptions" | ||
[disabled]="requestInProgress" | ||
(click)="addSwimlane(option.value)" | ||
> | ||
{{ option.viewValue }} | ||
</button> | ||
</mat-menu> | ||
</div> |
45 changes: 45 additions & 0 deletions
45
src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
:host { | ||
--position-left: 24px; | ||
} | ||
|
||
.add-swimlane-container { | ||
position: absolute; | ||
top: calc(-30px / 2); | ||
left: var(--position-left); | ||
width: calc(100% - 2 * var(--position-left)); | ||
z-index: 1000; | ||
display: flex; | ||
align-items: center; | ||
|
||
&.position-bottom { | ||
top: unset; | ||
bottom: calc(-30px / 2); | ||
} | ||
|
||
.container-border { | ||
border-bottom: 2px solid rgba(0, 0, 0, 0.7); | ||
border-radius: 1px; | ||
width: calc(50% - var(--position-left)); | ||
} | ||
|
||
.add-swimlane-btn { | ||
margin-left: 8px; | ||
margin-right: 8px; | ||
padding: 0; | ||
width: 30px; | ||
height: 30px; | ||
border: 2px solid rgba(0, 0, 0, 0.7); | ||
border-radius: 6px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
color: rgba(0, 0, 0, 0.7); | ||
|
||
i.mat-icon, | ||
i.mat-mdc-icon { | ||
font-size: 22px; | ||
width: 22px; | ||
height: 22px; | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/app/wlo-search/template/add-swimlane-button/add-swimlane-border-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { EduSharingUiCommonModule } from 'ngx-edu-sharing-ui'; | ||
import { SharedModule } from '../../shared/shared.module'; | ||
import { swimlaneTypeOptions } from '../custom-definitions'; | ||
import { SelectOption } from '../swimlane/swimlane-settings-dialog/select-option'; | ||
|
||
@Component({ | ||
selector: 'app-add-swimlane-border-button', | ||
standalone: true, | ||
imports: [EduSharingUiCommonModule, SharedModule], | ||
templateUrl: './add-swimlane-border-button.component.html', | ||
styleUrl: './add-swimlane-border-button.component.scss', | ||
}) | ||
export class AddSwimlaneBorderButtonComponent { | ||
@Input() position: string = 'top'; | ||
@Input() requestInProgress: boolean = false; | ||
@Output() addSwimlaneTriggered: EventEmitter<string> = new EventEmitter<string>(); | ||
|
||
protected readonly swimlaneTypeOptions: SelectOption[] = swimlaneTypeOptions.concat([ | ||
{ value: 'spacer', viewValue: 'Trennlinie' }, | ||
]); | ||
|
||
addSwimlane(type: string): void { | ||
this.addSwimlaneTriggered.emit(type); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters