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
Implement `ViewPortServiceInterface` for index sibling controllers
Kabiru Mwenjad38d9a33fcdc
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/base.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/base.controller.tsindex 35378e55a36..5c284fed338 100644--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/base.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/base.controller.ts@@ -30,9 +30,10 @@import { Controller } from '@hotwired/stimulus';import { useMeta } from 'stimulus-use';+import { ViewPortServiceInterface } from './services/view-port-service';import IndexController from './index.controller';-export default class BaseController extends Controller {+export default class BaseController extends Controller implements ViewPortServiceInterface {static metaNames = ['csrf-token'];declare readonly csrfToken:string;diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.tsindex 5cfff74ae29..0da3117c524 100644--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts@@ -29,7 +29,7 @@*/import { Controller } from '@hotwired/stimulus';-import ViewPortService from './services/view-port-service';+import { ViewPortService } from './services/view-port-service';export default class IndexController extends Controller<HTMLElement> {static values = {diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/services/view-port-service.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/services/view-port-service.tsindex 020465c33d5..cba6f392e8b 100644--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/services/view-port-service.ts+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/services/view-port-service.ts@@ -28,7 +28,15 @@* ++*/-export default class ViewPortService {+export interface ViewPortServiceInterface {+ isMobile():boolean;+ isWithinNotificationCenter():boolean;+ isWithinSplitScreen():boolean;+ isJournalsContainerScrolledToBottom():boolean;+ scrollableContainer:HTMLElement | null;+}++export class ViewPortService implements ViewPortServiceInterface {private notificationCenterPathName:string;private splitScreenPathName:string;