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
[#44828] removed hack
Eric Schubertd1bc99c9a914
diff --git a/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html b/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.htmlindex 29e3990b57c..abf5ff983bf 100644--- a/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html+++ b/frontend/src/app/features/work-packages/components/wp-relations/wp-relation-row/wp-relation-row.template.html@@ -1,56 +1,71 @@<div*ngIf="workPackage && relatedWorkPackage"class="relation-row relation-row-{{ relatedWorkPackage.id }}"- opFocusWithin=".wp-relations-controls-section button"+ opFocusWithin=".relation-row--grid-actions button">- <div class="grid-block hierarchy-item">- <div class="grid-content medium-2 collapse">+ <div+ class="relation-row--grid"+ >+ <div><buttontype="button"class="relation-row--type"(click)="activateRelationTypeEdit()"*ngIf="!userInputs.showRelationTypesForm">- <span *ngIf="groupByWorkPackageType"- [textContent]="normalizedRelationType"></span>- <span *ngIf="!groupByWorkPackageType"- [ngClass]="highlightingClassForWpType()"- [textContent]="relatedWorkPackage.type.name"></span>+ <span+ *ngIf="groupByWorkPackageType"+ [textContent]="normalizedRelationType"+ ></span>+ <span+ *ngIf="!groupByWorkPackageType"+ [ngClass]="highlightingClassForWpType()"+ [textContent]="relatedWorkPackage.type.name"+ ></span><span class="hidden-for-sighted" [textContent]="text.updateRelation"></span></button>- <div class="inline-edit--container inplace-edit"- *ngIf="userInputs.showRelationTypesForm">- <select class="inline-edit--field form--select"- [(ngModel)]="selectedRelationType"- (change)="saveRelationType()"- role="listbox"- opAutofocus- (keydown.escape)="cancelRelationTypeEditOnEscape($event)">- <option *ngFor="let relationType of availableRelationTypes"- [textContent]="relationType.label"- [ngValue]="relationType"></option>+ <div+ class="inline-edit--container inplace-edit"+ *ngIf="userInputs.showRelationTypesForm"+ >+ <select+ class="inline-edit--field form--select"+ [(ngModel)]="selectedRelationType"+ (change)="saveRelationType()"+ role="listbox"+ opAutofocus+ (keydown.escape)="cancelRelationTypeEditOnEscape($event)"+ >+ <option+ *ngFor="let relationType of availableRelationTypes"+ [textContent]="relationType.label"+ [ngValue]="relationType"+ ></option></select></div></div>- <div class="grid-content medium-5 collapse"- *ngIf="relatedWorkPackage">- <a uiSref="work-packages.show.tabs"- [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"- class="wp-relations--subject-field"- [textContent]="relatedWorkPackage.subjectWithId(0)"- [attr.aria-label]="normalizedRelationType + ' ' + relatedWorkPackage.subjectWithId(0)">- </a>- </div>+ <a+ class="relation-row--grid-id"+ uiSref="work-packages.show.tabs"+ [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"+ >#{{relatedWorkPackage.id}}</a>- <div class="grid-content medium-3 collapse wp-relations-status-field">- <edit-form *ngIf="relatedWorkPackage" [resource]="relatedWorkPackage">- <op-editable-attribute-field [resource]="relatedWorkPackage" fieldName="status"></op-editable-attribute-field>- </edit-form>- </div>+ <a+ class="relation-row--grid-subject"+ uiSref="work-packages.show.tabs"+ [uiParams]="{ workPackageId: relatedWorkPackage.id, tabIdentifier: 'relations' }"+ [textContent]="relatedWorkPackage.subject"+ [attr.aria-label]="normalizedRelationType + ' ' + relatedWorkPackage.subjectWithId(0)"+ ></a>- <div class="grid-content medium-2 collapse wp-relations-controls-section"- ng-class="{'-expanded': userInputs.showRelationInfo }">+ <edit-form *ngIf="relatedWorkPackage" [resource]="relatedWorkPackage">+ <op-editable-attribute-field [resource]="relatedWorkPackage" fieldName="status"></op-editable-attribute-field>+ </edit-form>++ <div+ class="relation-row--grid-actions"+ ><buttontype="button"class="spot-link wp-relations--description-btn"@@ -58,8 +73,10 @@[title]="text.description_label"(click)="userInputs.showRelationInfo = !userInputs.showRelationInfo">- <op-icon icon-classes="icon-info1 icon-no-color -padded wp-relations--icon wp-relations--description-icon"- [icon-title]="text.toggleDescription"></op-icon>+ <op-icon+ icon-classes="icon-info1 icon-no-color -padded wp-relations--icon wp-relations--description-icon"+ [icon-title]="text.toggleDescription"+ ></op-icon></button><button*ngIf="!!relation.delete"@@ -69,14 +86,18 @@[title]="text.removeButton"(click)="removeRelation()">- <op-icon icon-classes="icon-remove icon-no-color -padded wp-relations--icon"- [icon-title]="text.removeButton"></op-icon>+ <op-icon+ icon-classes="icon-remove icon-no-color -padded wp-relations--icon"+ [icon-title]="text.removeButton"+ ></op-icon></button></div></div>- <div class="grid-block hierarchy-item description-container"- *ngIf="userInputs.showRelationInfo">+ <div+ *ngIf="userInputs.showRelationInfo"+ class="grid-block hierarchy-item description-container"+ ><button*ngIf="!userInputs.showDescriptionEditForm"type="button"@@ -84,23 +105,26 @@[class.-placeholder]="!relation.description"(click)="startDescriptionEdit()"[textContent]="relation.description || text.placeholder.description"+ ></button>+ <div+ class="wp-relation--description-wrapper textarea-wrapper"+ *ngIf="userInputs.showDescriptionEditForm">- </button>- <div class="wp-relation--description-wrapper textarea-wrapper"- *ngIf="userInputs.showDescriptionEditForm">- <textarea- #relationDescriptionTextarea- autofocus- class="wp-relation--description-textarea"- name="description"- (keyup)="handleDescriptionKey($event)"- [(ngModel)]="userInputs.newRelationText"></textarea>- <edit-field-controls [fieldController]="fieldController"- (onSave)="saveDescription()"- (onCancel)="cancelDescriptionEdit()"- [saveTitle]="text.save"- [cancelTitle]="text.cancel">- </edit-field-controls>+ <textarea+ #relationDescriptionTextarea+ autofocus+ class="wp-relation--description-textarea"+ name="description"+ (keyup)="handleDescriptionKey($event)"+ [(ngModel)]="userInputs.newRelationText"+ ></textarea>+ <edit-field-controls+ [fieldController]="fieldController"+ (onSave)="saveDescription()"+ (onCancel)="cancelDescriptionEdit()"+ [saveTitle]="text.save"+ [cancelTitle]="text.cancel"+ ></edit-field-controls></div></div></div>diff --git a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.htmlindex 529f39ab774..530a8e9d0ac 100644--- a/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html+++ b/frontend/src/app/features/work-packages/components/wp-relations/wp-relations-group/wp-relations-group.template.html@@ -22,7 +22,7 @@</div><div- class="content"+ class="relation-container"*ngIf="relatedWorkPackages"><wp-relation-rowdiff --git a/frontend/src/global_styles/content/work_packages/tabs/_relations.sass b/frontend/src/global_styles/content/work_packages/tabs/_relations.sassindex 08d6490483d..720babb4c48 100644--- a/frontend/src/global_styles/content/work_packages/tabs/_relations.sass+++ b/frontend/src/global_styles/content/work_packages/tabs/_relations.sass@@ -28,12 +28,16 @@.detail-panel-description-content.relation- clear: both //resolve the problem if inside are elements with float+ //resolve the problem if inside are elements with float+ clear: both+h3cursor: pointer+atext-decoration: nonecolor: inherit+ifont-size: 0.8rem@@ -43,42 +47,45 @@.hierarchy-itemmargin-bottom: 2px+.relation-container+ margin-bottom: $spot-spacing-1+.relation-rowline-height: 2em- .attribute-header- font-size: 0.8em- text-transform: uppercase- font-weight: bold- .description-section- border: 1px dotted lightblue- padding: 4px+.inline-edit--container@include text-shortener// Similar to inner span's line-heightline-height: 1.6em+.inline-edit--display-fieldvertical-align: middle- .controls-container- text-align: right-- // FIXME: This overrides of `_grid.scss` classes for relations fixes- // https://community.openproject.org/projects/openproject/work_packages/44828/activity#activity-17.- // But, the grid layout does not work for relations on mobile, nor does it really fit the needs- // of the relations component in general.- .medium-2- flex: 0 0 calc((100% / 12) * 2)- .medium-3- flex: 0 0 calc((100% / 12) * 3)- .medium-5- flex: 0 0 calc((100% / 12) * 5)++ &--grid+ display: grid+ align-items: center+ grid-template: "info id subject status actions" / 10% 12.5% 45% 22.5% 10%++ @media #{$spot-mq-mobile}+ grid-template: "info id status actions" "subject subject subject subject" / 30% 25% 30% 15%+++ &-actions+ grid-area: actions+ display: flex+ justify-content: end++ &-id+ @include text-shortener()+ grid-area: id++ &-subject+ @include text-shortener()+ grid-area: subject.wp-relations-hierarchy-sectionmargin-top: 35px-.wp-relations-hierarchy-subject- @include text-shortener- display: block-.wp-relations-controls-sectiontext-align: rightflex-shrink: 1@@ -96,6 +103,7 @@.wp-relations-create-buttonmargin: 0.25rem 0line-height: 1.5+.-create-button-full-widthmargin-top: 1.5emwidth: 100%