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

Replace baseline banner with frame

Oliver Günther5bbe44b47577
diff --git a/config/locales/en.yml b/config/locales/en.yml
index ee2842d0271..0d5a4d9c57c 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2058,6 +2058,8 @@ en:
plan_text_html: "Available only through the %{plan_name}."
link_title: "More information"
hide_banner: "Hide this banner"
+ baseline_comparison:
+ description: Highlight changes made to this list since any point in the past.
work_package_subject_generation:
description: "Create automatically generated subjects using referenced attributes and text."
customize_life_cycle:
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 75365bcf6c8..65738863f33 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -1392,9 +1392,7 @@ en:
clear: "Clear"
apply: "Apply"
header_description: "Highlight changes made to this list since any point in the past."
- enterprise_header_description: "Highlight changes made to this list since any point in the past with Enterprise edition."
show_changes_since: "Show changes since"
- baseline_comparison: "Baseline comparison"
help_description: "Reference time zone for the baseline."
time_description: "In your local time: %{datetime}"
time: "Time"
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
index ec8b14a386a..4845c5e30d0 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.html
@@ -1,20 +1,15 @@
<div class="op-baseline--header"
- [class.op-baseline_tab]="!showActionBar">
- <div
- class="op-baseline--enterprise-title"
- *ngIf="eeShowBanners">
- <span class="">{{ text.baseline_comparison }}</span>
- <span class="spot-icon spot-icon_enterprise-addons"></span>
- </div>
- <span class="spot-body-small">{{ eeShowBanners ? text.enterprise_header_description : text.header_description }}</span>
- <a
- *ngIf="eeShowBanners"
- [attr.href]="text.moreInfoLink"
- class="op-baseline--info-button spot-body-small"
- target=”_blank”>
- {{ text.more_info_text }}
- <span class="spot-icon spot-icon_external-link"></span>
- </a>
+ [class.op-baseline_banner_active]="!available"
+ [class.op-baseline_tab]="!showActionBar">
+
+ <op-enterprise-banner-frame
+ feature="baseline_comparison"
+ [dismissable]="true"
+ ></op-enterprise-banner-frame>
+ <span
+ *ngIf="available"
+ class="spot-body-small" [textContent]="text.header_description"
+ ></span>
</div>
<form
*ngIf="visible && (nonWorkingDays$ | async); else loadingTemplate"
@@ -41,7 +36,7 @@
*ngFor="let availableValue of baselineAvailableValues"
[value]="availableValue.value"
[selected]="availableValue.value === selectedFilter"
- [disabled]="eeShowBanners && availableValue.value !== 'oneDayAgo'"
+ [disabled]="!(available || availableValue.value === 'oneDayAgo')"
>
{{availableValue.title}}
</option>
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.sass b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.sass
index 4936b9e4400..95d454275a3 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.sass
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.sass
@@ -13,14 +13,6 @@
&:has(+ .op-baseline--body_ranged)
width: auto
- &--enterprise-title
- color: $spot-color-feedback-warning-dark
- @include spot-body-small (bold)
- display: flex
- flex-direction: row
- align-items: center
- gap: $spot-spacing-1 $spot-spacing-0_25
-
&--info-button
display: flex
align-items: center
@@ -32,7 +24,6 @@
margin-top: 0 !important
@media screen and #{$spot-mq-drop-modal-in-context}
- width: 316px
max-height: 70vh
&_ranged
@@ -84,3 +75,6 @@
margin-left: 0
.op-baseline--range-container
margin: 0
+
+ &_banner_active.op-baseline--header
+ width: 450px
diff --git a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts
index e7c8df06aa9..3ddfdcf5b9c 100644
--- a/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts
+++ b/frontend/src/app/features/work-packages/components/wp-baseline/baseline/baseline.component.ts
@@ -98,7 +98,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {
public tooltipPosition = SpotDropAlignmentOption.TopRight;
- eeShowBanners = this.Banner.showBannerFor('baseline_comparison');
+ available = !this.Banner.showBannerFor('baseline_comparison');
public text = {
toggle_title: this.I18n.t('js.baseline.toggle_title'),
@@ -113,10 +113,7 @@ export class OpBaselineComponent extends UntilDestroyedMixin implements OnInit {
date: this.I18n.t('js.label_date'),
time: this.I18n.t('js.baseline.time'),
today: this.I18n.t('js.label_today'),
- moreInfoLink: enterpriseDocsUrl.website,
- more_info_text: this.I18n.t('js.admin.enterprise.upsale.more_info'),
help_description: this.I18n.t('js.baseline.help_description'),
- baseline_comparison: this.I18n.t('js.baseline.baseline_comparison'),
time_description: (i:number) => {
const date = this.selectedDates[i];
const time = this.selectedTimes[i];
diff --git a/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb b/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb
index fca8da623db..29d1584c42a 100644
--- a/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb
+++ b/spec/features/work_packages/table/baseline/baseline_rendering_spec.rb
@@ -426,7 +426,7 @@ RSpec.describe "baseline rendering",
baseline_modal.expect_closed
baseline_modal.toggle_drop_modal
baseline_modal.expect_open
- expect(page).to have_css(".op-baseline--enterprise-title")
+ expect(page).to have_enterprise_banner
# only yesterday is selectable
page.select("a specific date", from: "op-baseline-filter")
expect(page).to have_no_select("op-baseline-filter", selected: "a specific date")