From 3cdb1418b94249d58ded58e305b9f61e8ed86aaa Mon Sep 17 00:00:00 2001 From: "David P. Steelman" Date: Tue, 10 Mar 2026 07:24:36 -0400 Subject: [PATCH] LIBDRUM-1007. Remove Wufoo Feedback customization Removed the Wufoo Feedback customization, as we do not expect to use it in the future. Modified the DRUM "footer.component.ts" and "footer.component.html" to utilize the "showFeedback" conditional (as in stock DSpace) to hide the "Send Feedback" link when the "feedback.recipient" property is empty. https://umd-dit.atlassian.net/browse/LIBDRUM-1007 --- src/app/info/info-routes.ts | 12 +--- src/app/wufoo/wufoo-feedback-resolver.ts | 71 ------------------- .../wufoo/wufoo-feedback-response.model.ts | 6 -- src/assets/i18n/en.json5 | 2 - .../drum/app/footer/footer.component.html | 2 +- .../drum/app/footer/footer.component.ts | 7 +- .../feedback-form.component.html | 6 -- .../feedback-form.component.scss | 0 .../feedback-form/feedback-form.component.ts | 19 ----- .../app/info/feedback/feedback.component.html | 3 - .../app/info/feedback/feedback.component.scss | 0 .../app/info/feedback/feedback.component.ts | 16 ----- src/themes/drum/eager-theme.module.ts | 4 -- 13 files changed, 8 insertions(+), 140 deletions(-) delete mode 100644 src/app/wufoo/wufoo-feedback-resolver.ts delete mode 100644 src/app/wufoo/wufoo-feedback-response.model.ts delete mode 100644 src/themes/drum/app/info/feedback/feedback-form/feedback-form.component.html delete mode 100644 src/themes/drum/app/info/feedback/feedback-form/feedback-form.component.scss delete mode 100644 src/themes/drum/app/info/feedback/feedback-form/feedback-form.component.ts delete mode 100644 src/themes/drum/app/info/feedback/feedback.component.html delete mode 100644 src/themes/drum/app/info/feedback/feedback.component.scss delete mode 100644 src/themes/drum/app/info/feedback/feedback.component.ts diff --git a/src/app/info/info-routes.ts b/src/app/info/info-routes.ts index e377441d885..4b7decb49c5 100644 --- a/src/app/info/info-routes.ts +++ b/src/app/info/info-routes.ts @@ -1,7 +1,3 @@ -// UMD Customization -/* eslint-disable import-newlines/enforce */ -/* eslint-disable simple-import-sort/imports */ -// End Customization import { Route, Routes, @@ -24,17 +20,13 @@ import { } from './info-routing-paths'; import { NotifyInfoComponent } from './notify-info/notify-info.component'; import { ThemedPrivacyComponent } from './privacy/themed-privacy.component'; -// UMD Customization -import { WufooFeedbackResolver } from '../wufoo/wufoo-feedback-resolver'; -// End UMD Customization + export const ROUTES: Routes = [ { path: FEEDBACK_PATH, component: ThemedFeedbackComponent, - // UMD Customization - resolve: { breadcrumb: i18nBreadcrumbResolver, wufoo: WufooFeedbackResolver }, - // End UMD Customization + resolve: { breadcrumb: i18nBreadcrumbResolver }, data: { title: 'info.feedback.title', breadcrumbKey: 'info.feedback' }, canActivate: [feedbackGuard], }, diff --git a/src/app/wufoo/wufoo-feedback-resolver.ts b/src/app/wufoo/wufoo-feedback-resolver.ts deleted file mode 100644 index 58f5c368cc1..00000000000 --- a/src/app/wufoo/wufoo-feedback-resolver.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { - Inject, - Injectable, -} from '@angular/core'; -import { Resolve } from '@angular/router'; -import { - combineLatest, - map, - mergeMap, - Observable, - take, -} from 'rxjs'; - -import { RouteService } from '../core/services/route.service'; -import { - NativeWindowRef, - NativeWindowService, -} from '../core/services/window.service'; -import { HALEndpointService } from '../core/shared/hal-endpoint.service'; -import { URLCombiner } from '../core/url-combiner/url-combiner'; -import { WufooFeedbackResponse } from './wufoo-feedback-response.model'; - -/** - * Retrieves the Wufoo feedback form URL (populated with default form values) - * from the back-end and and redirects the browser to the Wufoo feedback form. - */ -@Injectable({ - providedIn: 'root', -}) -export class WufooFeedbackResolver implements Resolve { - constructor( - @Inject(NativeWindowService) protected _window: NativeWindowRef, - private routeService: RouteService, - private httpClient: HttpClient, - private halService: HALEndpointService, - ) { - } - - /** - * Retrieves the Wufoo feedback form URL (populated with default form values) - * from the back-end and and redirects the browser to the Wufoo feedback form. - */ - resolve(): void { - const referringUrl$: Observable = this.routeService.getCurrentUrl().pipe( - take(1), - map((urlPath: string): string => { return (urlPath ? urlPath : '/'); }), - map((urlPath: string): string => { - return new URLCombiner(this._window.nativeWindow.origin, urlPath).toString(); - }), - ); - - const wufooFeedbackEndpoint$: Observable = this.halService.getEndpoint('wufoo-feedback'); - - const wufooFeedbackResponse$ = combineLatest([referringUrl$, wufooFeedbackEndpoint$]).pipe( - mergeMap(([referringPageUrl, wufooFeedbackUrl]): Observable => { - return this.httpClient.get(wufooFeedbackUrl, { params: { 'page': referringPageUrl } }); - }), - ); - - wufooFeedbackResponse$.subscribe((obj) => { - const wufooFeedbackResponse = obj; - const redirectUrl = wufooFeedbackResponse.wufooFeedbackFormUrl; - - if (redirectUrl) { - // If we have a redirectUrl, send the browser to it. - window.location.href = redirectUrl; - } - }); - } -} diff --git a/src/app/wufoo/wufoo-feedback-response.model.ts b/src/app/wufoo/wufoo-feedback-response.model.ts deleted file mode 100644 index a8f0253e3e2..00000000000 --- a/src/app/wufoo/wufoo-feedback-response.model.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Interface for processing the Wufoo feedback response - */ -export interface WufooFeedbackResponse { - wufooFeedbackFormUrl: string; -} diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 62dc844ecda..6bfe968655c 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -7192,8 +7192,6 @@ "home.top-level-communities.head": "Communities in DRUM", - "info.feedback.info": "Thanks for sharing your feedback about DRUM. Your comments are appreciated!", - "item.page.advisor": "Advisor", "item.page.citation.datasetOrSoftware": "Related Publication Citation", diff --git a/src/themes/drum/app/footer/footer.component.html b/src/themes/drum/app/footer/footer.component.html index 7534733e77f..d15c951e772 100644 --- a/src/themes/drum/app/footer/footer.component.html +++ b/src/themes/drum/app/footer/footer.component.html @@ -40,7 +40,7 @@