Skip to content

RFC: Bring the CAP visual language into Fluent UI v9#36309

Open
GianoglioEnrico wants to merge 8 commits into
microsoft:masterfrom
GianoglioEnrico:feat/rfc-cap-into-fluent-ui-v9
Open

RFC: Bring the CAP visual language into Fluent UI v9#36309
GianoglioEnrico wants to merge 8 commits into
microsoft:masterfrom
GianoglioEnrico:feat/rfc-cap-into-fluent-ui-v9

Conversation

@GianoglioEnrico

@GianoglioEnrico GianoglioEnrico commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Overview

Proposes making the CAP visual language a first-class part of Fluent UI v9: consumers opt in via @fluentui/react-components alone (no @fluentui-contrib/* dependency), CAP source lives in the Fluent monorepo, and CAP is discoverable on the docs site as a visual-language picker alongside the theme picker.

Implementation tracked in #36308 .

What's in this RFC

A phased move of CAP_STYLE_HOOKS from fluentui-contrib into Fluent v9:

  • Phase 1 — re-export. @fluentui/react-components adds the contrib package as an internal dependency and re-exports CAP_STYLE_HOOKS from the main barrel. Consumers drop @fluentui-contrib/* from package.json and write import { CAP_STYLE_HOOKS } from '@fluentui/react-components'.
  • Phase 2 — move source. A new packages/react-components/react-cap-theme/ package owns CAP inside the monorepo, on Fluent's release cadence, gated by Fluent's CI (bundle size, VR, conformance). The contrib package becomes a deprecated re-export shim.

What's already validated

  • Bundle size. Phase 1 was prototyped against live monosize fixtures: 0 bytes for tree-shakable named-import consumers across all 3 component-level fixtures; ≈+16 kB gz only for import *. When CAP is actively imported on a small-app baseline, +36.78 kB gz — that's the cost of the visual language (transitively imports override modules from ~20 Fluent component packages), not the re-export. Tables and methodology are in the RFC.
  • Docs-site toggle UX. A working prototype is up at feat(react-components): integrate CAP visual language as a opt-in #36308 — adds a CAP visual-language toggle to the Storybook toolbar that overlays the currently-selected theme.

What I'm asking reviewers to decide

The RFC closes with the following open questions:

  1. Skip Phase 1 entirely? Collapse Phase 1+2 into a single @fluentui/react-cap-theme move?
  2. Distribution shape — confirm main-barrel re-export over subpath or separate preview package.
  3. Docs-site toggle UX — does docs-site engineering agree with the toolbar-toggle design? https://fluentuipr.z22.web.core.windows.net/pull/36308/public-docsite-v9/react/index.html?path=/docs/components-button-button--docs
Screenshot 2026-06-16 at 13 29 06

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@GianoglioEnrico GianoglioEnrico changed the title RFC: Bring the CAP visual language into Fluent UI v9 (WIP) RFC: Bring the CAP visual language into Fluent UI v9 Jun 15, 2026
@GianoglioEnrico GianoglioEnrico self-assigned this Jun 15, 2026
@GianoglioEnrico GianoglioEnrico marked this pull request as ready for review June 18, 2026 16:41
@GianoglioEnrico GianoglioEnrico requested review from a team as code owners June 18, 2026 16:41
@GianoglioEnrico GianoglioEnrico changed the title (WIP) RFC: Bring the CAP visual language into Fluent UI v9 RFC: Bring the CAP visual language into Fluent UI v9 Jun 19, 2026
EnricoGianoglio added 2 commits June 19, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: RFC Request for Feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant