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
Change grid to use flexbox for the splitted content (using the css grid caused problems with the resizer)
Henriette Dinger8f5e6f0c4dcd
diff --git a/frontend/src/app/components/resizer/wp-resizer.component.ts b/frontend/src/app/components/resizer/wp-resizer.component.tsindex 8af020d3cbf..b4138f7ea8c 100644--- a/frontend/src/app/components/resizer/wp-resizer.component.ts+++ b/frontend/src/app/components/resizer/wp-resizer.component.ts@@ -45,7 +45,7 @@ export class WpResizerDirective implements OnInit, OnDestroy {@Input() resizeStyle:'flexBasis'|'width' = 'flexBasis';private resizingElement:HTMLElement;- private elementFlex:number;+ private elementWidth:number;private oldPosition:number;private mouseMoveHandler:any;private element:HTMLElement;@@ -64,22 +64,19 @@ export class WpResizerDirective implements OnInit, OnDestroy {// Get initial width from local storage and applylet localStorageValue = this.parseLocalStorageValue();- this.elementFlex = localStorageValue || this.resizingElement.offsetWidth;-- // ToDo:- // Rename variables to width+ this.elementWidth = localStorageValue || this.resizingElement.offsetWidth;// This case only happens when the timeline is loaded but not displayed.// Therefor the flexbasis will be set to 50%, just in px- if (this.elementFlex === 0 && this.resizingElement.parentElement) {- this.elementFlex = this.resizingElement.parentElement.offsetWidth / 2;+ if (this.elementWidth === 0 && this.resizingElement.parentElement) {+ this.elementWidth = this.resizingElement.parentElement.offsetWidth / 2;}- this.resizingElement.style[this.resizeStyle] = this.elementFlex + 'px';+ this.resizingElement.style[this.resizeStyle] = this.elementWidth + 'px';// Wait until dom content is loaded and initialize column layout// Otherwise function will be executed with empty listjQuery(document).ready(() => {- this.applyColumnLayout(this.resizingElement, this.elementFlex);+ this.applyColumnLayout(this.resizingElement, this.elementWidth);});// Add event listener@@ -137,7 +134,7 @@ export class WpResizerDirective implements OnInit, OnDestroy {window.removeEventListener('touchmove', this.mouseMoveHandler);let localStorageValue = this.parseLocalStorageValue();if (localStorageValue) {- this.elementFlex = localStorageValue;+ this.elementWidth = localStorageValue;}}@@ -153,12 +150,12 @@ export class WpResizerDirective implements OnInit, OnDestroy {// Change cursor icon backdocument.body.style.cursor = 'auto';- // Take care at the end that the elementFlex-Value is the same as the actual value+ // Take care at the end that the elementWidth-Value is the same as the actual value// When the mouseup is outside the container these values will differ// which will cause problems at the next movement startlet localStorageValue = this.parseLocalStorageValue();if (localStorageValue) {- this.elementFlex = localStorageValue;+ this.elementWidth = localStorageValue;}this.moving = false;@@ -191,8 +188,8 @@ export class WpResizerDirective implements OnInit, OnDestroy {// Get new value depending on the delta// The resizingElement is not allowed to be smaller than 530px- this.elementFlex = this.elementFlex + delta;- let newValue = this.elementFlex < 530 ? 530 : this.elementFlex;+ this.elementWidth = this.elementWidth + delta;+ let newValue = this.elementWidth < 530 ? 530 : this.elementWidth;// Store item in local storagewindow.OpenProject.guardedLocalStorage(this.localStorageKey, String(newValue));diff --git a/frontend/src/app/components/wp-new/wp-new-split-view.html b/frontend/src/app/components/wp-new/wp-new-split-view.htmlindex c3a2b1dcd5d..a41ba87e532 100644--- a/frontend/src/app/components/wp-new/wp-new-split-view.html+++ b/frontend/src/app/components/wp-new/wp-new-split-view.html@@ -29,8 +29,7 @@<div class="work-packages--details--resizer hidden-for-mobile hide-when-print"><wp-resizer [elementClass]="'work-packages-partitioned-page--content-right'"- [localStorageKey]="'openProject-splitViewFlexBasis'"- resizeStyle="width"></wp-resizer>+ [localStorageKey]="'openProject-splitViewFlexBasis'"></wp-resizer></div></edit-form></div>diff --git a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.htmlindex 74f9e6c0ec7..5675dcd92f0 100644--- a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html+++ b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html@@ -28,13 +28,15 @@<filter-container *ngIf="filterAllowed"></filter-container>- <!-- Left content view -->- <div class="work-packages-partitioned-page--content-left loading-indicator--location"- data-indicator-name="table"- ui-view="content-left">- </div>+ <div class="work-packages-partitioned-page--content-container">+ <!-- Left content view -->+ <div class="work-packages-partitioned-page--content-left loading-indicator--location"+ data-indicator-name="table"+ ui-view="content-left">+ </div>- <!-- Right content view -->- <div class="work-packages-partitioned-page--content-right"- ui-view="content-right"></div>+ <!-- Right content view -->+ <div class="work-packages-partitioned-page--content-right"+ ui-view="content-right"></div>+ </div></div>diff --git a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sassindex 4e02c25c1ad..de09746be18 100644--- a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass+++ b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass@@ -16,24 +16,20 @@height: 100%overflow: hiddendisplay: grid- grid-template-columns: 1fr auto+ grid-template-columns: 1frgrid-template-rows: auto auto minmax(200px, 1fr)- &.-split- grid-template-areas: "header header" "filter filter" "content-left content-right"&.-right-only- grid-template-areas: "header header" "filter filter" "content-right content-right"- &.-left-only- grid-template-areas: "header header" "filter filter" "content-left content-left"+ .work-packages-partitioned-page--content-left+ display: none- .toolbar-container- grid-area: header+ &.-left-only+ .work-packages-partitioned-page--content-right+ display: none- filter-container- grid-area: filter+ .work-packages-partitioned-page--content-container+ display: flex.work-packages-partitioned-page--content-left- grid-area: content-left-- .work-packages-partitioned-page--content-right- grid-area: content-right+ flex: 1+ min-width: 580pxdiff --git a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.htmlindex 8957ed7a3c5..f664979d9cb 100644--- a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html+++ b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.html@@ -60,7 +60,6 @@<div class="work-packages--details--resizer hidden-for-mobile hide-when-print"><wp-resizer [elementClass]="'work-packages-partitioned-page--content-right'"- [localStorageKey]="'openProject-splitViewFlexBasis'"- resizeStyle="width"></wp-resizer>+ [localStorageKey]="'openProject-splitViewFlexBasis'"></wp-resizer></div></div>