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
Remove back button from notification center
Oliver Günther3bf07117168c
diff --git a/frontend/src/app/features/in-app-notifications/center/in-app-notification-center-page.component.ts b/frontend/src/app/features/in-app-notifications/center/in-app-notification-center-page.component.tsindex eb6b704896b..eb3eb431fe9 100644--- a/frontend/src/app/features/in-app-notifications/center/in-app-notification-center-page.component.ts+++ b/frontend/src/app/features/in-app-notifications/center/in-app-notification-center-page.component.ts@@ -39,8 +39,8 @@ export class InAppNotificationCenterPageComponent extends UntilDestroyedMixin imtitle: this.I18n.t('js.notifications.title'),};- /** Go back using back-button */- backButtonCallback:() => void = this.backButtonFn.bind(this);+ /** Disable the back button */+ backButtonCallback = undefined;/** Current query title to render */selectedTitle = this.text.title;@@ -131,13 +131,4 @@ export class InAppNotificationCenterPageComponent extends UntilDestroyedMixin im// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-varschangeChangesFromTitle(val:string):void {}-- private backButtonFn():void {- if (this.documentReferer.length > 0) {- window.location.href = this.documentReferer;- } else {- // Default fallback- window.history.back();- }- }}diff --git a/spec/features/notifications/navigation_spec.rb b/spec/features/notifications/navigation_spec.rbindex f1dbf0bb9e1..f4986926e4f 100644--- a/spec/features/notifications/navigation_spec.rb+++ b/spec/features/notifications/navigation_spec.rb@@ -31,36 +31,6 @@ describe "Notification center navigation", type: :feature, js: true docurrent_user { recipient }- describe 'the back button brings me back to where I came from' do- let(:navigation_helper) { ::Notifications::NavigationHelper.new(center, notification, work_package) }-- it 'when coming from a rails based page' do- visit home_path-- navigation_helper.open_and_close_the_center- expect(page).to have_current_path home_path-- navigation_helper.open_center_and_navigate_within- expect(page).to have_current_path home_path-- navigation_helper.open_center_and_navigate_out- expect(page).to have_current_path home_path- end-- it 'when coming from an angular page' do- visit project_work_package_path(project, work_package, state: 'activity')-- navigation_helper.open_and_close_the_center- expect(page).to have_current_path project_work_package_path(project, work_package, state: 'activity')-- navigation_helper.open_center_and_navigate_within- expect(page).to have_current_path project_work_package_path(project, work_package, state: 'activity')-- navigation_helper.open_center_and_navigate_out- expect(page).to have_current_path project_work_package_path(project, work_package, state: 'activity')- end- end-describe 'the path updates accordingly' doit 'when navigating between the tabs' dovisit home_pathdiff --git a/spec/features/notifications/notification_center/notification_center_spec.rb b/spec/features/notifications/notification_center/notification_center_spec.rbindex 77af150de93..d786e9e1e59 100644--- a/spec/features/notifications/notification_center/notification_center_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_spec.rb@@ -109,7 +109,7 @@ describe "Notification center", type: :feature, js: true, with_settings: { journraise "Expected notification to be marked read" unless notification.read_ianend- center.close+ visit home_pathcenter.expect_bell_count 1center.opendiff --git a/spec/support/pages/notifications/center.rb b/spec/support/pages/notifications/center.rbindex 50000e4f6e3..327c7071276 100644--- a/spec/support/pages/notifications/center.rb+++ b/spec/support/pages/notifications/center.rb@@ -39,11 +39,6 @@ module Pagesnotifications_center_pathend- def close- page.find('button[data-qa-selector="op-back-button"]').click- expect_closed- end-def mark_all_readclick_button 'Mark all as read'end