diff --git a/server/config/base/header_v2.json b/server/config/base/header_v2.json index f51472dc1e..73bf59031e 100644 --- a/server/config/base/header_v2.json +++ b/server/config/base/header_v2.json @@ -133,7 +133,7 @@ "id": "feedback", "label": "Feedback", "ariaLabel": "Give feedback", - "url": "https://docs.google.com/forms/d/e/1FAIpQLSc_xIinZPbO5RHDjq2a4eMoElkFgfe79U5DQ8-_kVhCNf2FJQ/viewform", + "url": "{feedback-prefill}", "exposeInMobileBanner": true } ] \ No newline at end of file diff --git a/server/templates/metadata/routes.html b/server/templates/metadata/routes.html index bc500b1ed8..07e677ee7c 100644 --- a/server/templates/metadata/routes.html +++ b/server/templates/metadata/routes.html @@ -19,6 +19,7 @@ {% for route_name in routes %}
{% endfor %} +
{% endmacro %} diff --git a/static/js/apps/base/utilities/utilities.ts b/static/js/apps/base/utilities/utilities.ts index 579cd9ce18..4f366cb39e 100644 --- a/static/js/apps/base/utilities/utilities.ts +++ b/static/js/apps/base/utilities/utilities.ts @@ -33,7 +33,18 @@ export const resolveHref = (href: string, routes: Routes): string => { if (match) { const routeKey = match[1]; const resolvedRoute = routes[routeKey] || ""; - return href.replace(regex, resolvedRoute); + + let url = href.replace(regex, resolvedRoute); + + // TODO(beets): Find a more appropriate place to do this only for feedback links. + if (routeKey === "feedback-prefill") { + const windowHash = window.location.hash; + if (windowHash) { + url += encodeURIComponent(windowHash); + } + } + + return url; } else { return href; }