Skip to content

feat(feedback-pulse): add FeedbackPulse CES survey popover (WDS-98)#226

Open
krnvch wants to merge 20 commits into
mainfrom
artem/feedback-pulse-component
Open

feat(feedback-pulse): add FeedbackPulse CES survey popover (WDS-98)#226
krnvch wants to merge 20 commits into
mainfrom
artem/feedback-pulse-component

Conversation

@krnvch

@krnvch krnvch commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

FeedbackPulse — CES survey popover (WDS-98)

A controlled, self-positioned Customer Effort Score (CES) survey popover. Front-end facade only — no network/storage/analytics; the consumer owns visibility (open / onOpenChange) and receives the result (onSubmit).

Ticket: WDS-98 · Figma: node 8029-72686 (+ Submitted state 11669-905)

Phases

Rating (1–5 scale) → Feedback (score picked → optional comment + Send) → Submitted (confirmation + auto-dismiss timeout bar).

What's in it

  • Controlled phase machine; internal state resets each time open goes false→true.
  • 1–5 scale as an accessible radiogroup (arrow-key nav + roving tabindex).
  • Optional comment (showComment); emits onSubmit({ score, comment? }).
  • Submitted: green check + confirmation, rAF-driven timeout bar (pause-on-hover) with auto-dismiss + manual close; focus moves to Close on submit.
  • Distinct dismiss/submit close reasons via onOpenChange(open, reason).
  • Animations: Rating→Feedback grow (grid-rows reveal) + Feedback→Submitted shrink (height FLIP); honors prefers-reduced-motion.
  • "Close" tooltip on the close button (both phases).
  • Composed from existing DS parts: ToggleButton, Textarea, Button, Tooltip, icons.

How to review

  • Storybook: Overlay/FeedbackPulse (Playground = interactive, Rating = static).
  • Unit: pnpm --filter=@wallarm-org/design-system test:run src/components/FeedbackPulse/ (15 tests).
  • E2E: src/components/FeedbackPulse/FeedbackPulse.e2e.ts.

Status / notes

  • ✅ 15 unit tests, typecheck, and lint green. Interaction + a11y E2E pass locally in a real browser.
  • ⚠️ E2E visual baselines not generated yet — they must be produced in CI/Docker (Linux) via the [update-screenshots] trigger, so the e2e-visual checks will be red until then.
  • 📎 Analytics: closed-target facade — analytics flows through the onSubmit / onOpenChange callbacks (no DOM passthrough by design); documented in FeedbackPulse/ANALYTICS_GAPS.md per the metrics contract.
  • 💬 Open design nit: the Submitted-phase Close tooltip auto-opens (the a11y auto-focus triggers Ark's focus-open) — pending a call on whether to focus the confirmation region instead so it's hover-only.

The feedback-pulse-framework.md / feedback-pulse-data-ops.md docs in the folder are deferred scope (product governance + backend), not part of this component.

🤖 Generated with Claude Code

Artem and others added 17 commits March 26, 2026 16:08
Foundation for the new FeedbackPulse (CES survey) component — includes
architecture spec, data ops design, and usage framework docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The card carried both `fixed` and `relative` position utilities; Tailwind's
cascade lets `relative` win, so the popover rendered in normal flow (top-left,
offset by its insets) instead of pinned bottom-right. `fixed` alone already
establishes the containing block the absolute timeout bar needs, so `relative`
was both redundant and the source of the bug. Caught in browser verification;
jsdom unit tests don't compute layout so it passed CI-style checks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Story title 'Overlay/FeedbackPulse' sanitizes to 'overlay-feedbackpulse'
(Storybook does not split camelCase), not 'overlay-feedback-pulse'. The wrong
id would 404 every e2e test in CI. Verified against Storybook's index.json and
sibling ids (inputs-numberinput, navigation-segmentedtabs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entering the Submitted phase unmounted the rating-phase Send/Close
button without moving focus anywhere, so keyboard users landed on
<body>. Focus the Submitted-phase Close button when the phase flips,
giving focus a home and letting the adjacent aria-live confirmation
be read on landing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FeedbackPulse is a closed-facade popover: its five interactive nodes
(score radios, textarea, Send, Close) are internal and not
consumer-addressable, and it deliberately exposes no arbitrary-
attribute passthrough. Per the metrics contract this is the sanctioned
closed-target -> consumer-callback pattern (onSubmit/onOpenChange),
not a violation, but it still owes the mandatory ANALYTICS_GAPS.md
declaration sibling components (Slider, InlineEdit, Table) ship.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… in root

- Center the Playground trigger button in the canvas (was snapped top-left).
- Wrap the Rating story so a node stays in #storybook-root: FeedbackPulse
  portals its content to document.body, which otherwise left the root empty
  and hung the e2e story loader's render check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lign submitted to Figma

Design-review polish (Figma node 11669-905):
- Animate Rating->Feedback grow via a grid-rows reveal, and Feedback->Submitted
  shrink via a height FLIP (with an rAF failsafe so the card can't stick at the
  pre-collapse height if a frame never runs).
- Reveal container drops overflow clipping once the grow settles so the comment
  textarea's focus ring is no longer clipped.
- Close button now shows a 'Close' tooltip in both phases (mirrors ToastClose).
- Submitted state matches Figma: plain green Check icon (was CircleCheck) and the
  timeout bar uses states/primary-default-alt so the left-to-right fill is visible
  (was an invisible white bar).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@krnvch krnvch changed the title docs: add FeedbackPulse component architecture files feat(feedback-pulse): add FeedbackPulse CES survey popover (WDS-98) Jul 13, 2026
…orts

The package barrel's FeedbackPulse export block had type names out of order
(FeedbackPulseProps before FeedbackPulseCloseReason); biome's organizeImports
flags it as an error and failed CI's lint check. Local lint had only been run
scoped to the component folder, which excludes src/index.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@krnvch

krnvch commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

@ipwallarm @vpavlenko-w cheknite pls, mne na vstreche pokazat nado budet, ty!

artem-desing and others added 2 commits July 14, 2026 10:41
…reenshots]

Trigger CI's Docker/Playwright screenshot-update job to generate the FeedbackPulse
e2e visual baselines (which don't exist yet) and commit them back to this branch,
greening E2E shard 1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants