Skip to content

feat(cards): add portable section layout hints - #1126

Open
maxffarrell wants to merge 2 commits into
vercel:mainfrom
maxffarrell:feat/portable-section-layouts
Open

maxffarrell wants to merge 2 commits into
vercel:mainfrom
maxffarrell:feat/portable-section-layouts

Conversation

@maxffarrell

Copy link
Copy Markdown

Cards can already group content in sections, but consumers cannot request columns or carousels without bypassing the shared card model and building platform-specific payloads.

Adds optional Section(children, { layout }) hints for stack, columns, and carousel, including JSX, React conversion, and literal JSON. The default Section object stays unchanged. Each child section represents a column or carousel item; existing action IDs, values, and handlers are preserved.

  • Slack renders eligible groups as native layouts or carousels. Complex items, field/card limits, and nested block budgets fall back to the existing vertical rendering.
  • Teams renders columns with inline ActionSets so controls remain associated with their column. Carousels keep the existing vertical rendering compatible with Adaptive Card 1.5.
  • Google Chat renders supported columns (up to two) and carousels, falling back when nested widget types cannot be represented.
  • Other adapters retain their existing section rendering. New regression suites cover 15 additional adapter packages, including both Discord formats, Telegram, WhatsApp, email, and text-based adapters.

Both the SDK converters and runtime-free Slack/Teams helpers are covered. The Teams primitive converter also now retains initial select/radio values, matching the SDK converter.

Includes API/guide documentation and a minor changeset for chat, Slack, Teams, and Google Chat. This enables the portable rework of vercel-labs/json-render#457 without requiring its own Slack-specific renderer.

Validation:

  • pnpm validate passed: knip, lint, workspace type checks, tests, and production builds
  • 8,774 tests passed across 28 test packages
  • pnpm konsistent passed
  • Tested json-render's 31 chat tests against both its released adapters and these proposed adapter builds; additional composed payload checks passed for Slack, Teams, and Google Chat

Layout hints preserve each adapter's existing interaction support and platform limits; they do not add unsupported controls to every platform. No live provider API calls were made.

Signed-off-by: Max Farrell <maxffarrell@gmail.com>
@maxffarrell
maxffarrell requested a review from a team November 7, 2026 20:01
@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@maxffarrell is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Signed-off-by: Max Farrell <maxffarrell@gmail.com>

This branch has not been deployed

No deployments
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