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

Stop loading indicator before showing the empty state. The debounce is necessary because it would otherwise be done before the loading indicator even started.

Henriette Darge1bd69b72a7f4
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
index 8c62172a5da..e3182f2bf83 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.html
@@ -41,7 +41,9 @@
<div
[textContent]="calendar.tooManyResultsText"
- class="op-wp-calendar--notification"></div>
+ class="op-wp-calendar--notification">
+ </div>
+
<div
*ngIf="isEmpty$ | async"
class="op-team-planner--no-data">
@@ -53,7 +55,8 @@
data-qa-selector="op-team-planner--empty-state-button"
(click)="showAssigneeAddRow()"
[textContent]="text.add_assignee"
- ></button>
+ >
+ </button>
</div>
</ng-container>
diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
index a5fc4487ec3..3a6e39b0320 100644
--- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
+++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts
@@ -80,6 +80,7 @@ import { imagePath } from 'core-app/shared/helpers/images/path-helper';
import { CapabilitiesResourceService } from 'core-app/core/state/capabilities/capabilities.service';
import { ICapability } from 'core-app/core/state/capabilities/capability.model';
import { ToastService } from 'core-app/shared/components/toaster/toast.service';
+import { LoadingIndicatorService } from 'core-app/core/loading-indicator/loading-indicator.service';
@Component({
selector: 'op-team-planner',
@@ -206,7 +207,11 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
this.principalIds$,
this.showAddAssignee$,
]).pipe(
- map(([principals, showAddAssignee]) => !principals.length && !showAddAssignee),
+ debounceTime(250),
+ map(([principals, showAddAssignee]) => {
+ this.loadingIndicatorService.table.stop();
+ return !principals.length && !showAddAssignee;
+ }),
);
private loading$:Subject<unknown>|null = null;
@@ -263,6 +268,7 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit,
readonly keepTab:KeepTabService,
readonly actions$:ActionsService,
readonly toastService:ToastService,
+ readonly loadingIndicatorService:LoadingIndicatorService,
) {
super();
}