diff --git a/.env.example b/.env.example index e0df515a..1cf7d104 100644 --- a/.env.example +++ b/.env.example @@ -1,15 +1,10 @@ # Copy to `.env` (or set via your shell) to enable optional integrations. # `.env`, `.env.local`, and `.env.production` are all gitignored. # -# Both of these values are PUBLIC (they're shipped to the browser by Astro's +# Values below are PUBLIC (they're shipped to the browser by Astro's # `envField`, and live behind rate limiting / allow-lists on the vendor side). # Kapa Custom Frontend integration ID for the "Ask AI" button in the header. # If unset, the Ask AI button is hidden and the site still runs normally. # Get yours at: https://app.kapa.ai/admin PUBLIC_KAPA_INTEGRATION_ID= - -# PushFeedback project ID for the per-page "Was this helpful?" widget and the -# feedback widget on the Scalar API page. If unset, both widgets are hidden. -# Dashboard: https://app.pushfeedback.com -PUBLIC_PUSHFEEDBACK_PROJECT_ID= diff --git a/astro.config.mjs b/astro.config.mjs index 10fac584..6a4ed7b9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -20,11 +20,6 @@ export default defineConfig({ access: 'public', optional: true, }), - PUBLIC_PUSHFEEDBACK_PROJECT_ID: envField.string({ - context: 'client', - access: 'public', - optional: true, - }), PUBLIC_RUDDERSTACK_WRITE_KEY: envField.string({ context: 'client', access: 'public', @@ -82,12 +77,6 @@ export default defineConfig({ // on every page on docs.warp.dev today; Starlight does not produce // them by default. Per-page OG/Twitter tags (image, branded title, // twitter:title/description) live in src/components/CustomHead.astro. - // - // PushFeedback CSS + JS used to live here, but they were render- - // blocking on every page even though the widget itself only sits - // at the bottom of the page in `FeedbackFooter.astro`. The lazy - // loader now lives inside `FeedbackButtons.astro` and pulls the - // assets in `requestIdleCallback` time — off the critical path. { tag: 'meta', attrs: { name: 'robots', content: 'index, follow' }, diff --git a/src/components/FeedbackButtons.astro b/src/components/FeedbackButtons.astro deleted file mode 100644 index 326a5f3a..00000000 --- a/src/components/FeedbackButtons.astro +++ /dev/null @@ -1,162 +0,0 @@ ---- -/** - * Shared PushFeedback thumbs-up/down widget. - * - * Used by: - * - `FeedbackFooter.astro` — appears at the bottom of every Starlight page - * - `pages/api.astro` — fixed bottom-right on the standalone /api page - * - * Both call sites previously hand-rolled the same markup (identical SVG - * paths, identical `` props). This consolidates them so - * future changes (icons, label, modal-position) land in one place. - * - * The PushFeedback CDN assets used to ship in the page `` (via - * `astro.config.mjs` for Starlight pages and inline for `/api`), which - * meant a render-blocking CSS round-trip + a deferred 70 KB+ script on - * every page even though the widget only renders below the fold. The - * inline ` -
- {question} - - - Yes - - - - No - -
- -)} - - diff --git a/src/components/FeedbackFooter.astro b/src/components/FeedbackFooter.astro index c6ae987b..8c085df1 100644 --- a/src/components/FeedbackFooter.astro +++ b/src/components/FeedbackFooter.astro @@ -1,15 +1,11 @@ --- -// Custom footer with PushFeedback "Was this helpful?" widget. -// PushFeedback CDN is loaded via Starlight's `head` config in astro.config.mjs. -// Dashboard: https://app.pushfeedback.com +// Custom footer: drops EditLink + LastUpdated from Starlight's default +// footer and keeps Pagination + the Starlight credits link. import Pagination from 'virtual:starlight/components/Pagination'; import config from 'virtual:starlight/user-config'; -import FeedbackButtons from './FeedbackButtons.astro'; --- diff --git a/vercel.json b/vercel.json index 830d8d81..f2b32ed3 100644 --- a/vercel.json +++ b/vercel.json @@ -29,7 +29,7 @@ }, { "key": "Content-Security-Policy", - "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.pushfeedback.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" + "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" } ] }, @@ -38,7 +38,7 @@ "headers": [ { "key": "Content-Security-Policy", - "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.pushfeedback.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" + "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" } ] }, @@ -47,7 +47,7 @@ "headers": [ { "key": "Content-Security-Policy", - "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.pushfeedback.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" + "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" } ] },