Skip to content

feat(widget): Storybook story for EscalatedWidget (Task 8.1)#33

Open
mpge wants to merge 1 commit intofeat/public-ticket-systemfrom
feat/widget-storybook
Open

feat(widget): Storybook story for EscalatedWidget (Task 8.1)#33
mpge wants to merge 1 commit intofeat/public-ticket-systemfrom
feat/widget-storybook

Conversation

@mpge
Copy link
Copy Markdown
Member

@mpge mpge commented Apr 24, 2026

Summary

Closes Plan Task 8.1's Storybook checkbox. The widget ticket form already collects `name` + `email` + `subject` + `description` + `department_id` and POSTs that Pattern-B-compatible shape to `/support/widget/tickets`; this PR documents the surface so QA + reviewers can smoke-test the launcher visually without booting a host app.

What's added

`src/widget/EscalatedWidget.stories.js` — four variants exercising the `initialColor` + `initialPosition` props:

  • Default — indigo, bottom-right
  • BrandedBlue — blue accent, bottom-right
  • BrandedGreen — green accent, bottom-right
  • BottomLeft — indigo, bottom-left

The widget fetches `/support/widget/config` on mount; when Storybook's `baseUrl` points at a stub that returns 404/5xx, the widget falls back to the `initialColor` / `initialPosition` props and still renders fully. Chat availability similarly degrades gracefully.

Test plan

  • `npx eslint src/widget/EscalatedWidget.stories.js` — clean locally.
  • `npm run storybook` and visually verify each variant after merge.

Adds a story with 4 variants (Default / BrandedBlue / BrandedGreen /
BottomLeft) exercising the color + position props. The ticket form
inside the widget already collects name + email for Pattern B public
submission; this story documents the surface for QA and gives
reviewers a way to smoke-test the launcher visually.

Marks Task 8.1 complete — both checkboxes satisfied.
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.

1 participant