Documentation Feedback
The documentation feedback widget records public page ratings and comments in a GxP survey. Readers can choose Helpful or Not helpful, classify an issue and leave an optional comment without signing in. Maintainers inspect the responses in GxP.
Rollout status: production feedback remains hidden until the prepared survey privacy and receipt API changes are deployed and verified. One approved synthetic response confirmed storage, but also exposed a public-response read that the patch must restrict. A successful static build does not establish safe deployed feedback collection.
Quiz status: embedded quizzes and their email OTP pilot are on hold. Questions and answers are maintained as a separate Markdown bank for later hosting. The documentation footer does not mount the quiz, including when the former quiz enable variable is set.
Configure the GxP project
| Resource | Value |
|---|---|
| Survey portal page | https://docs-gxp-dev.gxp.events/feedback |
| Form slug | page-feedbacl-6jri |
| API base | https://docs-gxp-dev.gxp.events/api/v1/projects/gramercy-tech/gxp-documentation-feedback-bgnb |
Keep the serving portal hostname. The API must resolve the portal page and the survey bound to it. Enable guest access to that page/form, keep the survey active and configure these field slugs:
| Field | Adapter value |
|---|---|
was_the_page_helpful | true or false as the configured option value |
comment | Optional reader text, limited to 2,000 characters by the widget |
url_path | Current documentation page path |
The adapter also records category, source, document ID/path/revision/version and a request hash in metadata.documentation. Use this metadata to identify which text received feedback. Survey feedback does not require an attendee token, the review quiz, email OTP or a question bank.
Configure Docusaurus
Supply these values through build configuration or an ignored website/.env:
DOCS_GXP_API_BASE=https://docs-gxp-dev.gxp.events/api/v1/projects/gramercy-tech/gxp-documentation-feedback-bgnb
DOCS_GXP_FEEDBACK_ENABLED=false
DOCS_GXP_FEEDBACK_FORM_SLUG=page-feedbacl-6jri
DOCS_GXP_FEEDBACK_PAGE_TOKEN=
Use the existing public portal-page key associated with this survey. Never put privileged Project/Admin API credentials in browser configuration. In GitHub Pages, use Actions variables for non-token configuration and an Actions secret for the page-token input. That key becomes public in the built browser configuration; the secret input does not make the static site a trusted server.
Leave the earlier standalone feedback service disabled. After the API release and live privacy/access/CORS/receipt checks pass, set DOCS_GXP_FEEDBACK_ENABLED=true and rebuild. No quiz configuration or learner sign-in is needed. The former DOCS_GXP_QUIZ_ENABLED value cannot enable the paused quiz.
Quiz questions for separate hosting
The separate repository file docs/gxp-documentation-question-bank.md contains topic banks, stable question IDs, choices, correct answers, explanations and documentation source links. It is outside the published documentation/static roots. Copy selected questions to the later quiz host and retain IDs when editing or translating them. Recheck questions when their source pages change.
The retained catalog at website/plugins/docs-feedback/quiz-banks.json provides topic slugs for organizing that file. Its generated metadata does not display a quiz or start an attempt. Questions about GxP's native quiz module remain part of the platform documentation; pausing this documentation widget does not disable platform quizzes.
Feedback recording and privacy
The adapter loads GET /forms/{form} using the configured public page key and validates the form slug, active state and field schema. An unavailable or incompatible form displays no widget.
A deliberate submission calls POST /forms/{form}/responses with a UUID, status: submitted, configured fields and documentation metadata. It requires a valid saved response ID before showing success. A network failure leaves the payload locked for safe retry with the same UUID/hash. A confirmed validation/access failure unlocks editing.
The prepared POST /forms/{form}/responses/receipt operation recovers a matching response ID after a lost reply without exposing raw comments or IP addresses. This receipt operation and restricted public response access require the accompanying API release. Maintainers use authorized GxP survey reporting, rather than exposing response records to the browser.
The explicitly approved synthetic response 20443 confirmed field/metadata persistence on 2026-10-13. The deployed public key could read that record's comment/IP, so feedback remains hidden until the restriction is deployed and verified. That one-record approval does not authorize another durable test submission.
Acceptance and troubleshooting
Verify guest page/form access and the field slugs before enabling the widget. With authorized test data, confirm helpfulness, comment, path, category and revision appear in the intended survey. Test lost-reply recovery and repeat clicks; confirm the same UUID/hash identifies one response.
Prove that public response lists/raw reads and unauthorized updates/deletes are denied, while authorized maintainers can inspect the results. Test wrong page/form context, disabled forms and invalid fields. Local mocks and a successful docs build do not replace those live checks.
If no widget appears, check the feedback enable flag, configured page key/form slug, active survey and compatible fields. For access failures, inspect serving portal/page binding and guest rules. For browser network failures, verify CORS permits the documentation origin and the Authorization/JSON request headers used by the survey adapter. Survey requests use bearer page context without cookies. If saving is unconfirmed, use the offered retry for the same locked response; do not clear it and submit a second record blindly.
Implementation evidence
The prepared platform API patch includes PrivateSurveyResponseScope and DocumentationFeedbackReceiptController, with the form response/page-context handlers. Its prior focused validation passed 72 PHP tests and two bank-slug store tests. The shared draft also contains deferred quiz changes; no deployed quiz acceptance is claimed.
The current site uses GxpDocs/Feedback.tsx and the form/receipt adapter in GxpDocs/client.ts. The original quiz adapter remains dormant for possible future work. Release and live feedback privacy/access/reporting acceptance are separate from the documentation build.