Skip to content

docs(conversational-ai): rework pattern README with grouped building-block previews#6265

Open
rubencarvalho wants to merge 5 commits into
mainfrom
rcarvalho/docs-convai-pattern-readme
Open

docs(conversational-ai): rework pattern README with grouped building-block previews#6265
rubencarvalho wants to merge 5 commits into
mainfrom
rcarvalho/docs-convai-pattern-readme

Conversation

@rubencarvalho
Copy link
Copy Markdown
Contributor

@rubencarvalho rubencarvalho commented May 11, 2026

Description

Reworks 2nd-gen/packages/swc/patterns/conversational-ai/README.mdx to be a more dynamic landing page for the Conversational AI pattern.

  • Keeps the headline FullPattern <Canvas> as the hero.
  • Adds an Anatomy of a conversation section with a three-layer explanation and a minimal composition tree.
  • Replaces the static components table with a Building blocks section grouped by lifecycle role (Input → Conversation structure → User turn → System turn → Follow-ups).
  • Embeds 10 live <Canvas> previews — one per component — rendering each component's Overview (or Anatomy/Loading where more illustrative) story.
  • Tightens copy: each component has a one-line description tied to its role (events emitted, slot it fills, etc.).
  • Uses <kbd> for keyboard keys in the thread description.

Motivation and context

The previous README was a single intro paragraph, one full-pattern demo, and a static description table. Landing on this page didn't communicate how the pieces relate to each other or what each one looks like in isolation. The reworked layout walks readers through the pattern with live previews at each stage.

Related issue(s)

  • N/A (documentation-only change)

Screenshots (if appropriate)

N/A — Storybook page; rendered output visible by running the Storybook dev server on this branch and visiting Conversational AI → README.

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Tests and changeset intentionally skipped: documentation-only change to a Storybook MDX page; no published package output and no behavioral surface to test.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • README renders with all live previews

    1. Run Storybook on this branch (yarn storybook in 2nd-gen/).
    2. Open Conversational AI → README.
    3. Confirm the "Full example", "Anatomy of a conversation", and "Building blocks" sections all render without MDX errors.
    4. Confirm each of the 10 <Canvas> blocks under "Building blocks" renders a live preview (prompt-field, upload-artifact, conversation-thread, conversation-turn, user-message anatomy, system-message, response-status loading, message-feedback, message-sources, suggestion-group, suggestion-item).
  • Composition tree code block

    1. Inspect the HTML code block under "Anatomy of a conversation".
    2. Confirm it shows the swc-conversation-threadswc-conversation-turn → message → supporting parts nesting.

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Accessibility testing checklist

  • Keyboard (required — document steps below)

    1. Open Conversational AI → README in Storybook.
    2. Tab through the page from the top.
    3. Expect focus to move only through the rendered Canvas previews and their internal controls; no focus traps introduced by this README itself.
  • Screen reader (required — document steps below)

    1. Open Conversational AI → README with a screen reader running (VoiceOver/NVDA).
    2. Navigate by heading.
    3. Expect: one H1 ("Conversational AI"), H2 sections ("Full example", "Anatomy of a conversation", "Building blocks"), H3 lifecycle groups, and H4 per-component subsections — all announced in order with no skipped levels.

@rubencarvalho rubencarvalho requested a review from a team as a code owner May 11, 2026 13:48
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

⚠️ No Changeset found

Latest commit: 7a7f8c9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

📚 Branch Preview Links

🔍 First Generation Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-6265

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@rubencarvalho rubencarvalho added Status:Ready for review PR ready for review or re-review. 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. labels May 11, 2026
Copy link
Copy Markdown
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

This is a really nice update! I added a few suggestions/questions/comments but would be happy to approve if addressing them is not in scope!

Comment thread 2nd-gen/packages/swc/patterns/conversational-ai/README.mdx
Comment thread 2nd-gen/packages/swc/patterns/conversational-ai/README.mdx Outdated
Comment thread 2nd-gen/packages/swc/patterns/conversational-ai/README.mdx
Comment thread 2nd-gen/packages/swc/patterns/conversational-ai/README.mdx
Copy link
Copy Markdown
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

This looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants