Skip to content

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

Work on popout

Benjamin Bädorf5927709d3b7b
diff --git a/frontend/src/app/shared/components/popout/popout.component.html b/frontend/src/app/shared/components/popout/popout.component.html
index f30360cb9d6..a34f7576e90 100644
--- a/frontend/src/app/shared/components/popout/popout.component.html
+++ b/frontend/src/app/shared/components/popout/popout.component.html
@@ -1,4 +1,4 @@
<ng-content select="[slot=trigger]"></ng-content>
-<div class="op-dropout--wrapper">
+<div class="op-popout--wrapper">
<ng-content select="[slot=trigger]"></ng-content>
</div>
diff --git a/frontend/src/app/shared/components/popout/popout.component.ts b/frontend/src/app/shared/components/popout/popout.component.ts
index c1a52c3fe51..16c388e0a45 100644
--- a/frontend/src/app/shared/components/popout/popout.component.ts
+++ b/frontend/src/app/shared/components/popout/popout.component.ts
@@ -1,20 +1,30 @@
import {
Component,
HostBinding,
+ Input,
} from '@angular/core';
+export enum OpPopoutAlignment {
+ Down = 'down',
+ Up = 'up',
+}
+
@Component({
- selector: 'op-dropout',
- templateUrl: './dropout.component.html',
+ selector: 'op-popout',
+ templateUrl: './popout.component.html',
})
-export class OpDropoutComponent {
- @HostBinding('class.op-dropout') className = true;
+export class OpPopoutComponent {
+ @HostBinding('class.op-popout') className = true;
- @HostBinding('class.op-dropout_opened') get openedClassName() {
+ @HostBinding('class.op-popout_opened') get openedClassName() {
return this.opened;
}
- public opened = false;
+ @HostBinding('class') get alignmentClassName() {
+ return { [`op-popout_align-${this.alignment}`]: true };
+ }
+
+ @Input() alignment: OpPopoutAlignment = OpPopoutAlignment.Down;
- constructor() {}
+ public opened = false;
}
diff --git a/frontend/src/app/shared/components/popout/popout.sass b/frontend/src/app/shared/components/popout/popout.sass
index adeaa2b3d81..1221db35f43 100644
--- a/frontend/src/app/shared/components/popout/popout.sass
+++ b/frontend/src/app/shared/components/popout/popout.sass
@@ -1,2 +1,16 @@
-.op-dropout
+.op-popout
display: inline-flex
+
+ &--wrapper
+ position: absolute
+ display: none
+ left: 0
+
+ &_opened &--wrapper
+ display: flex
+
+ &_align-down &--wrapper
+ top: 100%
+
+ &_align-up &--wrapper
+ bottom: 100%
diff --git a/frontend/src/app/shared/components/project-list-select/project-list-select.component.html b/frontend/src/app/shared/components/project-list-select/project-list-select.component.html
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/frontend/src/app/shared/components/project-list-select/project-list-select.component.sass b/frontend/src/app/shared/components/project-list-select/project-list-select.component.sass
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/frontend/src/app/shared/components/project-list-select/project-list-select.component.ts b/frontend/src/app/shared/components/project-list-select/project-list-select.component.ts
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/frontend/src/global_styles/common/openproject-common.module.sass b/frontend/src/global_styles/common/openproject-common.module.sass
index cbd19b0d606..410274c958b 100644
--- a/frontend/src/global_styles/common/openproject-common.module.sass
+++ b/frontend/src/global_styles/common/openproject-common.module.sass
@@ -5,6 +5,6 @@
@import 'bubble/bubble'
@import '../../app/shared/components/forms'
@import '../../app/shared/components/option-list/option-list'
-@import '../../app/shared/components/dropout/dropout'
+@import '../../app/shared/components/popout/popout'
@import 'export-options/export-options'
@import 'select/select'