Skip to content

EDU-19729: Add follow-up panel to FeedbackSection - #112

Merged
mariana-caetano merged 5 commits into
mainfrom
EDU-19729
Oct 5, 2026
Merged

mariana-caetano merged 5 commits into
mainfrom
EDU-19729

Conversation

@mariana-caetano

@mariana-caetano mariana-caetano commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds an inline follow-up panel to FeedbackSection that opens automatically right after the user votes ("Was this helpful?" -> Yes/No), letting them optionally leave a comment and/or email for more context.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

How it works

  • The vote is saved immediately, exactly as before (POST /api/feedback/), so existing tracking is unaffected.
  • Right after the vote, the panel opens automatically (panelStage: 'open') with a textarea ("Tell us more") and an optional email field.
  • Send submits the detailed feedback as a second, independent row to the same spreadsheet already used for votes (POST /api/feedback/).
  • Skip closes the panel without sending anything.
  • New props: collectDetailedFeedback (default true), detailedFeedbackEndpoint, sendDetailedFeedback, defaultPanelStage - all overridable, keeping the component backward-compatible for consumers that don't want the follow-up panel.

How to test

  1. Open this repository locally.
  2. Checkout the EDU-19729 branch.
  3. Open a terminal and run npm run storybook.
  4. Open the Storybook server and, in the left menu, find the FeedbackSection component.
  5. In the FeedbackSection menu, check the new stories: FollowUpOpen, FollowUpSubmitted, FollowUpError and FollowUpOpenSmall.
  6. On any story, click Yes or No to see the follow-up panel open automatically, and then try Send and Skip.

P.S.: None of the actions in the Storybook environment persist data because there's no real backend behind /api/feedback/. Voting (Yes/No) will still visually open the follow-up panel (the request silently fails without showing an error), but clicking Send afterward will land in the error state.

feedback-section

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['release-no', 'release-auto', 'release-patch', 'release-minor', 'release-major']

@mariana-caetano mariana-caetano added the release-auto Automatic version bump label Sep 25, 2026

@karenkrieger karenkrieger left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carolinamenezes carolinamenezes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@carolinamenezes carolinamenezes added release-patch Patch version bump and removed release-auto Automatic version bump labels Oct 5, 2026
@mariana-caetano mariana-caetano self-assigned this Oct 5, 2026
@mariana-caetano
mariana-caetano merged commit 653b863 into main Oct 5, 2026
4 checks passed
@mariana-caetano
mariana-caetano deleted the EDU-19729 branch October 5, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-patch Patch version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants