Doc gap feedback form in every page footer#74
Conversation
Adds a "Send feedback" button next to "Edit this page" in the doc footer. Clicking it opens a slide-in card from the bottom-right with a HubSpot-connected form (direct API call, no embed) that lets users report missing content. The button bounces once when the footer scrolls into view to draw attention. Closes #64
Swap the inline bouncing footer button for a fixed-position floating action button that slides in from the bottom when the footer scrolls into view. Removes the distracting bounce animation in favour of a subtle slide-up transition. Also auto-dismisses the drawer two seconds after a successful submission.
Move portal ID and form ID to environment variables only. Add secrets to CI deploy workflows.
- Add pointer-events and visibility to closed drawer so hidden form controls are not reachable by keyboard or screen readers - Guard FAB and drawer behind hasFeedbackConfig to handle missing env vars - Remove dead .doc-gap-backdrop and #doc-gap-hs-form CSS rules - Add maxLength to textarea (2000) and email input (254)
felipefdl
left a comment
There was a problem hiding this comment.
Submitting the review with findings. 4 bugs (including a TypeScript breakage that will fail typecheck), 2 suggestions, 2 nits. Primary blockers: unrelated DocSearch CSS polluting the diff (conflicts with feat/218), missing required secrets with no docs, accessibility gaps on the FAB/drawer, and the React namespace issue on SyntheticEvent. See the 8 inline comments for line-specific details.
Retrospective reviewCaught this after merge while rebasing Critical1. Scope creep: 60+ lines of unrelated DocSearch/Algolia CSS ( The PR title and body are scoped to "Doc gap feedback form," but the diff adds two CSS blocks for DocSearch (Algolia) light/dark theming. These are unrelated and should have been a separate PR. They also conflict with the in-flight Algolia removal on #218. 2. Silent failure in submit handler ( } catch {
setStatus(\"error\");
}The catch swallows errors with no logging. If a CORS or HubSpot API issue hits in production, the user sees "Something went wrong" with zero debugging signal. Add 3. PR description does not match implementation PR body says "Swizzles Important4. Incrementing a key to force-remount 5. Unnecessary const portalId = siteConfig.customFields?.hubspotPortalId as string | undefined;
// ...
portalId={portalId as string}The double cast indicates the type guard is not expressed through the type system. Narrow once at the top with an early return. 6. No timeout on the fetch ( If HubSpot hangs, the button stays in "Sending..." forever. Add 7. z-index magic numbers conflict with Docusaurus (
8. Hardcoded colors that should be CSS variables (
9. "Secrets" treatment of public values (
Suggestions10. Feature gated on Pages without tags or edit metadata get no feedback button. Those are arguably pages most in need of feedback. Decide whether that gate is intentional. 11. No tests for a 239-line interactive component. The form, observer, escape handler, success timeout, and HubSpot submission all lack tests. 12. Bounce-once language vs. behavior. PR says "bounces once when the footer first scrolls into view," but the implementation resets Strengths
Recommended follow-ups
|
Address post-merge review feedback from PR #74

Summary
DocItem/Footerto add a "Send feedback" button next to "Edit this page" in the footer of every doc pagecustomFieldsindocusaurus.config.ts(env varsHUBSPOT_PORTAL_ID/HUBSPOT_DOC_GAP_FORM_IDoverride the defaults)Test plan
Closes #64