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

Fix project name overflow in app header (#11028)

Benjamin Bädorfe304e8fbb5c6
diff --git a/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.sass b/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.sass
new file mode 100644
index 00000000000..f7a3a714a8c
--- /dev/null
+++ b/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.sass
@@ -0,0 +1,2 @@
+.op-project-menu-autocomplete
+ max-width: 100%
diff --git a/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.ts b/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.ts
index 9ccef7c8100..62d962ad927 100644
--- a/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.ts
+++ b/frontend/src/app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component.ts
@@ -31,6 +31,8 @@ import { I18nService } from 'core-app/core/i18n/i18n.service';
import {
ChangeDetectionStrategy,
Component,
+ HostBinding,
+ ViewEncapsulation,
} from '@angular/core';
import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';
import { combineLatest } from 'rxjs';
@@ -58,8 +60,12 @@ export const projectMenuAutocompleteSelector = 'project-menu-autocomplete';
providers: [
SearchableProjectListService,
],
+ encapsulation: ViewEncapsulation.None,
+ styleUrls: ['./project-menu-autocomplete.component.sass'],
})
export class ProjectMenuAutocompleteComponent {
+ @HostBinding('class.op-project-menu-autocomplete') className = true;
+
dropModalOpen = false;
canCreateNewProjects$ = this.currentUserService.hasCapabilities$('projects/create');
diff --git a/frontend/src/global_styles/common/header/app-header.sass b/frontend/src/global_styles/common/header/app-header.sass
index 27c2110b92e..cbc02da098c 100644
--- a/frontend/src/global_styles/common/header/app-header.sass
+++ b/frontend/src/global_styles/common/header/app-header.sass
@@ -14,6 +14,7 @@
width: 100vw
@media screen and (max-width: 679px)
+ grid-template-columns: minmax(0, auto) auto 1fr
position: fixed
top: 0
left: 0
diff --git a/frontend/src/global_styles/common/header/main-menu-toggle.sass b/frontend/src/global_styles/common/header/main-menu-toggle.sass
index 6a14a035c3c..bb6774d82ba 100644
--- a/frontend/src/global_styles/common/header/main-menu-toggle.sass
+++ b/frontend/src/global_styles/common/header/main-menu-toggle.sass
@@ -1,3 +1,5 @@
.op-main-menu-toggle
+ flex-shrink: 0
+
@at-root .nosidebar &
- display: none
\ No newline at end of file
+ display: none
diff --git a/frontend/src/global_styles/content/_project_list_modal.sass b/frontend/src/global_styles/content/_project_list_modal.sass
index f47ba71c402..3b35ca5fc5b 100644
--- a/frontend/src/global_styles/content/_project_list_modal.sass
+++ b/frontend/src/global_styles/content/_project_list_modal.sass
@@ -1,4 +1,6 @@
.op-project-list-modal
+ max-width: 100%
+
&--header
display: flex
justify-content: space-between