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
Fix PR comments
Benjamin Bädorff3aa8efa4fa7
diff --git a/frontend/src/app/core/current-project/current-project.service.ts b/frontend/src/app/core/current-project/current-project.service.tsindex 4c8f694f003..5f334205bf1 100644--- a/frontend/src/app/core/current-project/current-project.service.ts+++ b/frontend/src/app/core/current-project/current-project.service.ts@@ -34,8 +34,10 @@ import { APIV3Service } from 'core-app/core/apiv3/api-v3.service';export class CurrentProjectService {private current:{ id:string, identifier:string, name:string };- constructor(private PathHelper:PathHelperService,- private apiV3Service:APIV3Service) {+ constructor(+ private PathHelper:PathHelperService,+ private apiV3Service:APIV3Service,+ ) {this.detect();}diff --git a/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.sass b/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.sassnew file mode 100644index 00000000000..20b6df17a8d--- /dev/null+++ b/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.sass@@ -0,0 +1,3 @@+.op-autocompleter+ display: block+ max-width: 600pxdiff --git a/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.tsindex 21d80100e11..adb055fa2ab 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts+++ b/frontend/src/app/features/user-preferences/notifications-settings/inline-create/notification-setting-inline-create.component.ts@@ -8,10 +8,7 @@ import {import { FormArray } from '@angular/forms';import { I18nService } from 'core-app/core/i18n/i18n.service';import { Observable } from 'rxjs';-import {- map,- withLatestFrom,-} from 'rxjs/operators';+import { map } from 'rxjs/operators';import { APIV3Service } from 'core-app/core/apiv3/api-v3.service';import { ApiV3FilterBuilder } from 'core-app/shared/helpers/api-v3/api-v3-filter-builder';import { HalSourceLink } from 'core-app/features/hal/resources/hal-resource';@@ -25,6 +22,7 @@ export interface NotificationSettingProjectOption {@Component({selector: 'op-notification-setting-inline-create',templateUrl: './notification-setting-inline-create.component.html',+ styleUrls: ['./notification-setting-inline-create.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,})export class NotificationSettingInlineCreateComponent {diff --git a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.htmlindex 83c9973b263..ee24d7d4b0b 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html+++ b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.html@@ -1,122 +1,131 @@-<table- class="op-table"- *ngIf="settings.length > 0"->- <thead>- <tr>- <th class="op-table--cell op-table--cell_heading">- {{ text.notify_me }}- </th>- <ng-container *ngFor="let item of settings.controls">- <th class="op-table--cell op-table--cell_heading">{{ item.controls.project.value.title }}</th>- </ng-container>- </tr>- </thead>- <tbody>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.mentioned_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell"><input type="checkbox" disabled checked /></td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.involved_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell" [formGroup]="item">- <input- type="checkbox"- formControlName="involved"- data-qa-project-notification-type="involved"- [attr.data-qa-project]="item.controls.project.value.title"- />- </td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.watched_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell"><input type="checkbox" disabled checked /></td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_created_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell" [formGroup]="item">- <input- type="checkbox"- formControlName="workPackageCreated"- data-qa-project-notification-type="work_package_created"- [attr.data-qa-project]="item.controls.project.value.title"- />- </td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_processed_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell" [formGroup]="item">- <input- type="checkbox"- formControlName="workPackageProcessed"- data-qa-project-notification-type="work_package_processed"- [attr.data-qa-project]="item.controls.project.value.title"- />- </td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_scheduled_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell" [formGroup]="item">- <input- type="checkbox"- formControlName="workPackageScheduled"- data-qa-project-notification-type="work_package_scheduled"- [attr.data-qa-project]="item.controls.project.value.title"- />- </td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_prioritized_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell" [formGroup]="item">- <input- type="checkbox"- formControlName="workPackagePrioritized"- data-qa-project-notification-type="work_package_prioritized"- [attr.data-qa-project]="item.controls.project.value.title"- />- </td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_commented_header }}</th>- <ng-container *ngFor="let item of settings.controls">- <td class="op-table--cell" [formGroup]="item">- <input- type="checkbox"- formControlName="workPackageCommented"- data-qa-project-notification-type="work_package_commented"- [attr.data-qa-project]="item.controls.project.value.title"- />- </td>- </ng-container>- </tr>- <tr>- <th class="op-table--cell op-table--cell_soft-heading"></th>- <ng-container *ngFor="let item of settings.controls; let index = index">- <td class="op-table--cell">- <button- type="button"- class="op-link"- (click)="removeProjectSettings(index)"- >Remove Project Settings</button>- </td>- </ng-container>- </tr>- </tbody>-</table>+<div class="op-scrollable-table">+ <table+ class="op-table"+ *ngIf="settings.length > 0"+ >+ <thead>+ <tr>+ <th class="op-table--cell op-table--cell_heading">+ {{ text.notify_me }}+ </th>+ <ng-container *ngFor="let item of settings.controls">+ <th class="op-table--cell op-table--cell_heading">+ <a+ class="op-link"+ [href]="projectLink(item.controls.project.value.href)"+ >{{ item.controls.project.value.title }}</a>+ </th>+ </ng-container>+ </tr>+ </thead>+ <tbody>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.mentioned_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell"><input type="checkbox" disabled checked /></td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.involved_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell" [formGroup]="item">+ <input+ type="checkbox"+ formControlName="involved"+ data-qa-project-notification-type="involved"+ [attr.data-qa-project]="item.controls.project.value.title"+ />+ </td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.watched_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell"><input type="checkbox" disabled checked /></td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_created_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell" [formGroup]="item">+ <input+ type="checkbox"+ formControlName="workPackageCreated"+ data-qa-project-notification-type="work_package_created"+ [attr.data-qa-project]="item.controls.project.value.title"+ />+ </td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_processed_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell" [formGroup]="item">+ <input+ type="checkbox"+ formControlName="workPackageProcessed"+ data-qa-project-notification-type="work_package_processed"+ [attr.data-qa-project]="item.controls.project.value.title"+ />+ </td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_scheduled_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell" [formGroup]="item">+ <input+ type="checkbox"+ formControlName="workPackageScheduled"+ data-qa-project-notification-type="work_package_scheduled"+ [attr.data-qa-project]="item.controls.project.value.title"+ />+ </td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_prioritized_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell" [formGroup]="item">+ <input+ type="checkbox"+ formControlName="workPackagePrioritized"+ data-qa-project-notification-type="work_package_prioritized"+ [attr.data-qa-project]="item.controls.project.value.title"+ />+ </td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading">{{ text.work_package_commented_header }}</th>+ <ng-container *ngFor="let item of settings.controls">+ <td class="op-table--cell" [formGroup]="item">+ <input+ type="checkbox"+ formControlName="workPackageCommented"+ data-qa-project-notification-type="work_package_commented"+ [attr.data-qa-project]="item.controls.project.value.title"+ />+ </td>+ </ng-container>+ </tr>+ <tr>+ <th class="op-table--cell op-table--cell_soft-heading"></th>+ <ng-container *ngFor="let item of settings.controls; let index = index">+ <td class="op-table--cell">+ <button+ type="button"+ class="op-link"+ (click)="removeProjectSettings(index)"+ >+ Remove Project Settings+ </button>+ </td>+ </ng-container>+ </tr>+ </tbody>+ </table>+</div><op-notification-setting-inline-create*ngIf="userId"diff --git a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.tsindex 28db947bdf4..03f303e748d 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts+++ b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts@@ -6,7 +6,9 @@ import {Input,} from '@angular/core';import { FormArray, FormGroup, FormControl } from '@angular/forms';+import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';import { I18nService } from 'core-app/core/i18n/i18n.service';+import idFromLink from 'core-app/features/hal/helpers/id-from-link';import { HalSourceLink } from 'core-app/features/hal/resources/hal-resource';@Component({@@ -33,7 +35,14 @@ export class NotificationSettingsTableComponent {work_package_scheduled_header: this.I18n.t('js.notifications.settings.reasons.work_package_scheduled'),};- constructor(private I18n:I18nService) {}+ constructor(+ private I18n:I18nService,+ private pathHelper:PathHelperService,+ ) {}++ projectLink(href:string) {+ return this.pathHelper.projectPath(idFromLink(href));+ }addProjectSettings(project:HalSourceLink):void {this.settings.push(new FormGroup({diff --git a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.tsindex 278f7a744c0..63065b0d307 100644--- a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts+++ b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts@@ -12,6 +12,7 @@ import {TemplateRef,ViewChild,SimpleChanges,+ HostBinding,} from '@angular/core';import { DropdownPosition, NgSelectComponent } from '@ng-select/ng-select';import {@@ -48,6 +49,8 @@ import { OpAutocompleterOptionTemplateDirective } from './directives/op-autocomp// in order to use it, you only need to pass the data type and its filters// you also can change the value of ng-select default options by changing @inputs and @outputsexport class OpAutocompleterComponent extends UntilDestroyedMixin implements AfterViewInit, OnChanges {+ @HostBinding('class.op-autocompleter') className = true;+@Input() public filters?:IAPIFilter[] = [];@Input() public resource:resource;diff --git a/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.html b/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.htmlindex 28c4bf069c4..96bc909c3c0 100644--- a/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.html+++ b/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.html@@ -7,7 +7,10 @@<ng-content select="[slot=input]"></ng-content></div>- <div class="op-form-field--label op-checkbox-field--label">+ <div+ *ngIf="label"+ class="op-form-field--label op-checkbox-field--label"+ ><span*ngIf="showErrorMessage"class="Hidden for sighted"diff --git a/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.sass b/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.sassindex b13c14eb78b..2a8bf83de70 100644--- a/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.sass+++ b/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.sass@@ -26,3 +26,14 @@grid-row-end: 3margin-bottom: 0+ &--label,+ &--description+ white-space: pre-line+ word-break: break-word+ word-wrap: break-word++ &--input + &--description+ // This is a hacky way to get the description labels to display more centered+ // next to the inputs When there is no label.+ margin-top: -0.05rem+diff --git a/frontend/src/app/shared/components/table/scrollable-table.sass b/frontend/src/app/shared/components/table/scrollable-table.sassnew file mode 100644index 00000000000..140dd9fe615--- /dev/null+++ b/frontend/src/app/shared/components/table/scrollable-table.sass@@ -0,0 +1,6 @@+.op-scrollable-table+ max-width: 100%+ overflow-x: scroll++ .op-table+ width: autodiff --git a/frontend/src/app/shared/components/table/table.sass b/frontend/src/app/shared/components/table/table.sassindex d4f2d69e7b3..9c174b7d98e 100644--- a/frontend/src/app/shared/components/table/table.sass+++ b/frontend/src/app/shared/components/table/table.sass@@ -1,7 +1,6 @@.op-table- max-width: 100%- overflow-x: scrollborder-collapse: collapse+ width: 100%&--cellpadding: 12px 16pxdiff --git a/frontend/src/global_styles/common/openproject-common.module.sass b/frontend/src/global_styles/common/openproject-common.module.sassindex 62441ab808a..82ecd9b32cc 100644--- a/frontend/src/global_styles/common/openproject-common.module.sass+++ b/frontend/src/global_styles/common/openproject-common.module.sass@@ -6,5 +6,6 @@@import '../../app/shared/components/forms'@import '../../app/shared/components/option-list/option-list'@import '../../app/shared/components/table/table'+@import '../../app/shared/components/table/scrollable-table'@import 'export-options/export-options'@import 'select/select'