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

intregrate newly created help into help mode

ulferts8fe262652e6c
diff --git a/frontend/src/app/modules/grids/grid/add-widget.service.ts b/frontend/src/app/modules/grids/grid/add-widget.service.ts
index 0f3007d6991..37595384102 100644
--- a/frontend/src/app/modules/grids/grid/add-widget.service.ts
+++ b/frontend/src/app/modules/grids/grid/add-widget.service.ts
@@ -30,7 +30,7 @@ export class GridAddWidgetService {
public isAddable(area:GridArea) {
return !this.drag.currentlyDragging &&
!this.resize.currentlyResizing &&
- (this.layout.mousedOverArea === area || this.layout.isSingleCell || this.layout.isNewlyCreated || this.layout.inHelpMode) &&
+ (this.layout.mousedOverArea === area || this.layout.isSingleCell || this.layout.inHelpMode) &&
this.isAllowed;
}
diff --git a/frontend/src/app/modules/grids/grid/area.service.ts b/frontend/src/app/modules/grids/grid/area.service.ts
index 32a5b21caf9..7a44f88720c 100644
--- a/frontend/src/app/modules/grids/grid/area.service.ts
+++ b/frontend/src/app/modules/grids/grid/area.service.ts
@@ -33,6 +33,8 @@ export class GridAreaService {
this.numRows = this.resource.rowCount;
this.numColumns = this.resource.columnCount;
+ this.helpMode = this.isNewlyCreated;
+
this.buildAreas(true);
}
@@ -113,7 +115,7 @@ export class GridAreaService {
return this.numRows === 1 && this.numColumns === 1 && this.widgetResources.length === 0;
}
- public get isNewlyCreated() {
+ private get isNewlyCreated() {
return moment(moment.utc()).diff(moment(this.resource.createdAt), 'seconds') < 20;
}
diff --git a/frontend/src/app/modules/my-page/my-page.component.html b/frontend/src/app/modules/my-page/my-page.component.html
deleted file mode 100644
index 347d10a7809..00000000000
--- a/frontend/src/app/modules/my-page/my-page.component.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<h2 [textContent]="text.title"></h2>
-
-<ng-container *ngIf="(grid$ | async) as grid">
- <grid [grid]="grid"></grid>
-</ng-container>
diff --git a/modules/grids/spec/support/pages/grid.rb b/modules/grids/spec/support/pages/grid.rb
index 830ae1d20b4..c84020b12de 100644
--- a/modules/grids/spec/support/pages/grid.rb
+++ b/modules/grids/spec/support/pages/grid.rb
@@ -33,7 +33,7 @@ module Pages
def add_widget(row_number, column_number, location, name)
within_add_widget_modal(row_number, column_number, location) do
expect(page)
- .to have_content(I18n.t('js.grid.add_modal.choose_widget'))
+ .to have_content(I18n.t('js.grid.add_widget'))
page.find('.grid--addable-widget', text: Regexp.new("^#{name}$")).click
end
@@ -83,7 +83,7 @@ module Pages
def expect_specific_widget_unaddable(row_number, column_number, location, name)
within_add_widget_modal(row_number, column_number, location) do
expect(page)
- .to have_content(I18n.t('js.grid.add_modal.choose_widget'))
+ .to have_content(I18n.t('js.grid.add_widget'))
expect(page)
.not_to have_selector('.grid--addable-widget', text: Regexp.new("^#{name}$"))