feat(sidepanel): inline feedback widget in side panel footer [GET-14]#47
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces a feedback widget feature to the extension's side panel, allowing users to optionally submit feedback including the extension version to Formspree. Supporting changes include privacy policy updates (static HTML and Next.js pages), CSS styling for the widget UI states, comprehensive unit tests, and test configuration updates to include Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Widget as FeedbackWidget
participant Chrome as Chrome Runtime
participant Formspree as Formspree API
User->>Widget: Click feedback trigger
Widget->>Widget: Transition to "open" state
Widget->>User: Show textarea + Cancel/Send buttons
User->>Widget: Type message + Click Send
Widget->>Chrome: Read extension version (manifest)
Chrome-->>Widget: Return version string
Widget->>Widget: Transition to "sending" state
Widget->>Formspree: POST {message, version, subject}
alt Success
Formspree-->>Widget: 200 OK response
Widget->>Widget: Transition to "sent" state
Widget->>User: Show success confirmation
Widget->>Widget: After 4s, reset to "idle"
else Error
Formspree-->>Widget: Non-OK response or network error
Widget->>Widget: Transition to "error" state
Widget->>User: Show error message
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel. A member of the Team first needs to authorize it. |
…-14] - FeedbackWidget.tsx: three-state component (idle/open/sent); POSTs to Formspree with message + extension version; auto-resets to idle 4s after send - App.tsx: render FeedbackWidget below History section - dashboard.css: lco-dash-feedback-* styles; reduced-motion coverage
- FeedbackWidget: hoist VERSION to module constant; useEffect+clearTimeout for timer leak; derive trimmed once per render; add MAX_MESSAGE_LENGTH=2000 guard on textarea and submit - privacy/page.tsx: add Formspree disclosure to Third-party services section (CWS policy compliance) - privacy.html: same Formspree disclosure for CWS-linked privacy page
37dc848 to
dc59d47
Compare
- 12 tests covering all critical paths: idle/open/sent/error states, whitespace guard, 2000-char limit, timer cleanup on unmount, fetch-throws, non-ok status, cancel, POST payload shape
- vitest.config.ts: extend include glob to tests/**/*.test.{ts,tsx}
- bun add -D @testing-library/react@16
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
Adds a zero-friction inline feedback widget to the side panel footer. Users type their issue and hit Send — no new tab, no redirect, no signup. Formspree delivers each submission to devanshurajesh@gmail.com instantly, with the extension version pre-attached so issues are traceable. This ships before the Chrome Web Store launch because users are the top priority.
Type of change
What was changed
entrypoints/sidepanel/components/FeedbackWidget.tsxchrome.runtime.getManifest().versionso it tracks bumps automatically. POSTs JSON to Formspree.entrypoints/sidepanel/App.tsx<FeedbackWidget />below the History section.entrypoints/sidepanel/dashboard.csslco-dash-feedback-*styles matching the existing card/button design system. Full dark mode + reduced-motion coverage.How to test
.output/chrome-mv3in Chrome dev modeNo new permissions required
The side panel is an extension page. Extension pages can make cross-origin fetch requests freely in MV3 — no host_permissions needed for Formspree.
Related issues
Closes GET-14
Summary by CodeRabbit
New Features
Documentation
Tests