Skip to content

Commit 0f7e9df

Browse files
committed
add file attachment support to feedback surveys with screenshot capture and general survey type
1 parent faf1b5b commit 0f7e9df

54 files changed

Lines changed: 2060 additions & 162 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- **General survey type** - `type="general"` collects text feedback (and an optional screenshot) with no rating scale. See the [README](README.md#general-text-feedback-only).
13+
- **Screenshot attachments** - New `onCaptureScreenshot`, `maxAttachments`, `screenshotButtonLabel`, and `screenshotErrorMessage` props add an optional screenshot-attachment control to the feedback step. `attachmentCaption` overrides the caption shown under the thumbnail. Confirmed attachments are surfaced as `attachments?: Attachment[]` on the `onFeedbackSubmit` payload. See [Attachments](README.md#attachments).
14+
- **`strings` prop** - Overrides the library's built-in aria-labels and other screen-reader-only text (`SurveyStrings`), without touching visible copy. See [Accessibility Labels](README.md#accessibility-labels).
15+
- **`getScoreLabelSuffix` prop** - Customizes the text appended after the first/last numbered scale button when it carries `minLabel`/`maxLabel`.
16+
- **`otherPlaceholder` prop** - Placeholder for the free-text input shown alongside choice checkboxes.
17+
- **`Popup.closeLabel` prop** - Overrides the close button's `aria-label`/`title`.
18+
19+
### Changed
20+
21+
- **`--ft-surface-padding` default is now `20px`** (was `24px`).
22+
- **Screen region `aria-label`s replaced by `aria-labelledby`** - The rating/feedback/contact/success regions now derive their accessible name from each screen's own heading instead of a hardcoded `aria-label`. `Feedback`/`Contact` still expose overridable `feedbackFormLabel`/`contactFormLabel`. Consumer tests querying `getByRole('region', { name: 'Feedback form' })` (etc.) should update.
23+
- **Feedback step: Submit requires content** - Submitting fully empty input is no longer equivalent to Skip. For `responseType: 'text'`, an attachment alone unlocks Submit, but submitting without text flags the field (red border, `aria-invalid`) instead of sending. For `responseType: 'choices'`, an attachment alone doesn't unlock Submit at all — a selected choice or text is required.
24+
- **Feedback step: Skip is disabled while an attachment is confirmed** - Once a screenshot is attached, Skip is disabled until the attachment is removed, so an attachment can no longer be silently discarded.
25+
826
## [1.8.0] - 2026-08-25
927

1028
### Changed

README.md

Lines changed: 141 additions & 12 deletions
Large diffs are not rendered by default.

docs/assets/ces7.png

-173 Bytes
Loading

docs/assets/csat2.png

-357 Bytes
Loading

docs/assets/csat5-popup.png

28 Bytes
Loading

docs/assets/csat5.png

-525 Bytes
Loading

docs/assets/general.png

21.5 KB
Loading

docs/assets/nps10-mobile.png

51 Bytes
Loading

docs/assets/nps10.png

-309 Bytes
Loading

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)