Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
9d64110
add fluent style slot behaviors
JasonVMo Jul 27, 2026
9c0859f
update component types and slot implementations
JasonVMo Jul 28, 2026
4f55cd6
fix bugs around slot types and jsx spreading
JasonVMo Jul 28, 2026
fc9ce51
remove extra file from this branch
JasonVMo Jul 28, 2026
c3404e0
clean up slot types
JasonVMo Jul 29, 2026
eefdf75
update instructions and fix typing issues with usePressableState
JasonVMo Jul 29, 2026
ceb3009
consolidate on useSlot and useOptionalSlot
JasonVMo Jul 29, 2026
35c72a5
consolidate old and new slot patterns into a core set of APIs
JasonVMo Jul 29, 2026
03f181d
sanitize exports and mark internal only routines more clearly
JasonVMo Jul 29, 2026
275e3bc
add changeset
JasonVMo Jul 29, 2026
e925fd7
add v0 and v1 instruction files
JasonVMo Jul 30, 2026
938c1b5
move button spec into the button component directory
JasonVMo Aug 4, 2026
b6589af
initial button seeding
JasonVMo Aug 4, 2026
cda015b
rename button from tsx to ts
JasonVMo Aug 4, 2026
e06cd36
colocate the SPEC.md file with the component
JasonVMo Aug 4, 2026
5f3a6a5
first draft with the agent driven build
JasonVMo Aug 4, 2026
a04e42d
move Icon to primitives rather than components to distinguish patterns
JasonVMo Aug 4, 2026
59cb3f9
Merge branch 'main' of https://github.com/microsoft/fluentui-react-na…
JasonVMo Aug 4, 2026
255ecc6
update structure of flex tokens to optimize usage
JasonVMo Aug 4, 2026
a332c23
combine mappings into new yaml file and update instructions
JasonVMo Aug 4, 2026
b7859d2
Merge remote-tracking branch 'origin/main' into user/jasonvmo/gen-but…
JasonVMo Aug 6, 2026
9da512f
update lockfile and metro config
JasonVMo Aug 6, 2026
5b66c25
fix flex style mapping error
JasonVMo Aug 7, 2026
2e6ff9a
work in progress changes for styling
JasonVMo Aug 10, 2026
076a968
more modifications for component building
JasonVMo Aug 11, 2026
8a3f4f6
in progress changes
JasonVMo Aug 12, 2026
1659778
rework of the color/style factory helpers
JasonVMo Aug 12, 2026
f14b89e
apply branchedStyle helpers to components
JasonVMo Aug 12, 2026
c4e93e5
rework styles with new instructions
JasonVMo Aug 13, 2026
8eeb545
add change file
JasonVMo Aug 13, 2026
f379f2d
Merge branch 'main' of https://github.com/microsoft/fluentui-react-na…
JasonVMo Aug 13, 2026
a1b43f7
fix storybook build, optimize instructions
JasonVMo Aug 13, 2026
cc93f1c
update storybook guidance and add stories
JasonVMo Aug 13, 2026
9974235
fix styling bugs and enhance Icon stories
JasonVMo Aug 13, 2026
f0afa23
restructure authoring skill to use sub-references
JasonVMo Aug 13, 2026
72c457d
add blockers for the specs that can't be generated right now
JasonVMo Aug 13, 2026
238ff11
more blockers
JasonVMo Aug 13, 2026
35c106a
Document InfoLabel blockers
JasonVMo Aug 13, 2026
048b0df
Document Link blockers
JasonVMo Aug 13, 2026
740850c
Document Textarea blockers
JasonVMo Aug 13, 2026
6060056
Document Toolbar blockers
JasonVMo Aug 13, 2026
027abfd
Document Tablist blockers
JasonVMo Aug 13, 2026
0114ba8
Add agentic Divider component
JasonVMo Aug 13, 2026
7ccca3a
Add agentic Tab component
JasonVMo Aug 13, 2026
c3d3704
Add agentic Tag component
JasonVMo Aug 13, 2026
4cb565f
Add agentic Badge component
JasonVMo Aug 13, 2026
e4f9ebe
Add agentic Skeleton component
JasonVMo Aug 13, 2026
29bc176
Add agentic Card component
JasonVMo Aug 13, 2026
c4d1f34
Add agentic Avatar component
JasonVMo Aug 13, 2026
875a1fc
Add agentic Input component
JasonVMo Aug 13, 2026
9c38c47
Add agentic Radio component
JasonVMo Aug 13, 2026
1da0ea7
Add agentic ProgressBar component
JasonVMo Aug 13, 2026
8395312
Add agentic ListboxItem component
JasonVMo Aug 13, 2026
c9b8b20
Add agentic Accordion component
JasonVMo Aug 13, 2026
5e847f4
Add agentic Checkbox component
JasonVMo Aug 13, 2026
84cb540
Add agentic ListItem component
JasonVMo Aug 13, 2026
2fa36a0
Add agentic MenuItem component
JasonVMo Aug 13, 2026
3ff6c75
Add agentic Spinner component
JasonVMo Aug 13, 2026
dc2e046
Add agentic Switch component
JasonVMo Aug 13, 2026
b9afde2
Restore Switch specification content
JasonVMo Aug 13, 2026
c50d267
index updates for components package
JasonVMo Aug 13, 2026
f60d090
Merge branch 'main' of https://github.com/microsoft/fluentui-react-na…
JasonVMo Aug 13, 2026
ace30df
fix build errors after generation
JasonVMo Aug 13, 2026
966ceb3
Merge origin/main and migrate styling imports
JasonVMo Aug 13, 2026
e7152e5
repattern useApplyStyles to involve component names
JasonVMo Aug 13, 2026
cea6ea4
refactor common elements
JasonVMo Aug 14, 2026
808654b
suppress svg warning in test app
JasonVMo Aug 14, 2026
c9df6d2
fix useReducedMotion for react only tests
JasonVMo Aug 14, 2026
0f141f0
Merge branch 'main' of https://github.com/microsoft/fluentui-react-na…
JasonVMo Aug 14, 2026
19b1343
dependency profiles and changeset
JasonVMo Aug 14, 2026
0ab6804
Fix polynomial numeric style regex
JasonVMo Aug 14, 2026
54d54d8
Fix ProgressBar MessageBar spec link
JasonVMo Aug 14, 2026
0a58712
Stabilize Skeleton reduced motion test
JasonVMo Aug 14, 2026
030569b
Remove async timing from Skeleton test
JasonVMo Aug 14, 2026
1342147
Isolate Skeleton reduced motion test
JasonVMo Aug 14, 2026
e9d4268
Allow agentic tests for CI load
JasonVMo Aug 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/bright-otters-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fluentui-react-native/components": minor
---

Export the generated agentic components and their composition helpers, and fix their build errors.
13 changes: 13 additions & 0 deletions .changeset/clever-tools-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@fluentui-react-native/components": minor
"@fluentui-react-native/design": minor
"@fluentui-react-native/framework-base": minor
"@fluentui-react-native/composition": patch
"@fluentui-react-native/use-slots": patch
"@fluentui-react-native/use-styling": patch
"@fluentui-react-native/use-tokens": patch
"@uifabricshared/foundation-settings": patch
"@uifabricshared/themed-settings": patch
---

Add shared component primitives, styling utilities, state hooks, accessibility diagnostics, and owned native-root prop types.
14 changes: 14 additions & 0 deletions .changeset/nice-parts-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@uifabricshared/foundation-settings": patch
"@uifabricshared/themed-settings": patch
"@fluentui-react-native/composition": patch
"@fluentui-react-native/use-styling": patch
"@fluentui-react-native/use-tokens": patch
"@fluentui-react-native/dependency-profiles": patch
"@fluentui-react-native/use-slots": patch
"@fluentui-react-native/components": patch
"@fluentui-react-native/design": patch
"@fluentui-react-native/framework-base": patch
---

Consolidation of shared utilities, dependency profile updates, and more generated components
22 changes: 14 additions & 8 deletions .github/skills/agentic-component-authoring/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,32 @@ authoring rule in one always-loaded instruction file.
[higher-order component instructions](../../../packages/agentic-components/src/components/AGENTS.md).
- Primitive components live in `src/primitives`. Read the
[primitive instructions](../../../packages/agentic-components/src/primitives/AGENTS.md).
- If the change spans multiple components, repeated helpers, or shared dependency boundaries, read the
[package-wide optimization guidance](../agentic-component-optimization/SKILL.md) and
[`packages/agentic-components/src/AGENTS.md`](../../../packages/agentic-components/src/AGENTS.md). Do not run a
whole-package audit for a tiny single-component edit.
- Work on the Storybook application, native projects, bundling, or CocoaPods belongs to the
[agentic Storybook development skill](../agentic-storybook-development/SKILL.md), not this component workflow.

## Load focused references

| Work | Reference |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| Public props, slots, state types, native prop exposure, or exports | [Types and slots](references/types-and-slots.md) |
| Defaults, derived state, interaction hooks, accessibility, or slot construction | [State and accessibility](references/state-and-accessibility.md) |
| Tokens, style factories, theme caching, state precedence, or slot style application | [Styles and tokens](references/styles-and-tokens.md) |
| Pure slot rendering, component assembly, or display names | [Rendering and assembly](references/rendering.md) |
| Runtime tests, type tests, snapshots, Storybook stories, or validation | [Tests and stories](references/tests-and-stories.md) |
| Work | Reference |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| Public props, slots, state types, native prop exposure, or exports | [Types and slots](references/types-and-slots.md) |
| Defaults, derived state, interaction hooks, accessibility, or slot construction | [State and accessibility](references/state-and-accessibility.md) |
| Tokens, style factories, theme caching, state precedence, or slot style application | [Styles and tokens](references/styles-and-tokens.md) |
| Pure slot rendering, component assembly, or display names | [Rendering and assembly](references/rendering.md) |
| Runtime tests, type tests, snapshots, Storybook stories, or validation | [Tests and stories](references/tests-and-stories.md) |
| Cross-component duplication, shared helper extraction, or dependency hygiene | [Package optimization](../agentic-component-optimization/SKILL.md) |

A new higher-order component normally needs every reference. A focused fix should load only the affected reference and
its immediate neighbors. Keep the component's colocated `SPEC.md` and companion files authoritative for its contract.

## Workflow

1. Read the repository and package instructions, the component `SPEC.md`, and every companion file referenced by the
spec.
spec. Use the package-wide optimization guidance only when the change clearly involves repeated patterns or shared
dependency boundaries.
2. Inspect the closest canonical implementation. Use
[`components/button`](../../../packages/agentic-components/src/components/button) for a styled higher-order component
and [`primitives/icon`](../../../packages/agentic-components/src/primitives/icon) for a direct primitive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let consumers bypass slot order.
```ts
export const Component = (props: ComponentProps) => {
const state = useComponent_unstable(props);
useApplyStyles_unstable(state);
useComponentStyles_unstable(state);
return renderComponent_unstable(state);
};
```
Expand All @@ -59,8 +59,10 @@ Set `displayName` for diagnostics and Storybook metadata. Keep unstable stage fu
future composition work can identify them. Do not wrap the component in memoization or another boundary without measured
need and repository precedent.

After assembly, update the package public surface according to the
[types and slots export rules](types-and-slots.md#exports).
After assembly, export `use<Component>_unstable`, `use<Component>Styles_unstable`, and
`render<Component>_unstable` from the package root together with `<Component>State`, according to the
[types and slots export rules](types-and-slots.md#exports). These stages are intentionally unstable but public so other
components can reuse and extend the pipeline without importing internal paths.

## Review checklist

Expand All @@ -69,4 +71,4 @@ After assembly, update the package public surface according to the
- Optional and replacement slots fall back intentionally.
- State-only structure does not leak into public props.
- The assembly file is a readable state -> styles -> render pipeline.
- `displayName` is present and the public surface follows the types and slots export rules.
- `displayName` is present and all three composition stages are exported under component-qualified unstable names.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Return:
Keep property ordering intentional so later spreads cannot silently replace component-owned values. If two state sources
can share a key, assign the final owned value explicitly after spreading.

Export the hook from the package root as `use<Component>_unstable`, together with its resolved `<Component>State` type,
so another component can extend the state stage without importing package internals.

## Platform behavior

Keep platform-specific native imports out of shared files when React Native forks expose incompatible types. Put fork
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Styles and tokens

Use this reference for `<component>.styles.ts`, `useApplyStyles.ts`, token mapping, theme caching, state precedence, and
Use this reference for `<component>.styles.ts`, `use<Component>Styles.ts`, token mapping, theme caching, state precedence, and
slot prop application. The canonical examples are
[`button.styles.ts`](../../../../packages/agentic-components/src/components/button/button.styles.ts) and
[`useApplyStyles.ts`](../../../../packages/agentic-components/src/components/button/useApplyStyles.ts).
[`useButtonStyles.ts`](../../../../packages/agentic-components/src/components/button/useButtonStyles.ts).

## Resolve values from the correct token source

Expand Down Expand Up @@ -97,7 +97,8 @@ token before assigning it to `ViewStyle['gap']`.

## Apply slot props in one stage

`useApplyStyles.ts` should select styles and call `attachSlotProps`; it should not create factories.
`use<Component>Styles.ts` should export `use<Component>Styles_unstable`, select styles, and call `attachSlotProps`; it
should not create factories. Export that hook directly from the package root under the same name.

Compose root styles in this order:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,17 @@ sources. Verify the primitive remains assignable to `SlotProp<typeof Primitive>`

## Exports

Export components and public types explicitly from
[`src/index.ts`](../../../../packages/agentic-components/src/index.ts). Never use wildcard exports. Do not export private
state-only slots, internal style definitions, or render helpers.
Export each component and its composition pipeline explicitly from
[`src/index.ts`](../../../../packages/agentic-components/src/index.ts):

- the component and its public props, slots, variants, and resolved state type
- the state hook as `use<Component>_unstable`
- the style-application hook as `use<Component>Styles_unstable`
- the render helper as `render<Component>_unstable`

Name the source file `use<Component>Styles.ts` and the implementation `use<Component>Styles_unstable` so the local and
public composition APIs match without aliases. Never use wildcard exports. Do not export private state-only slots or
internal style definitions.

## Review checklist

Expand All @@ -82,4 +90,4 @@ state-only slots, internal style definitions, or render helpers.
- Omitted and false values retain distinct semantics where required.
- Root native props cannot bypass owned children or style ordering.
- Resolved state contains every defaulted and derived value needed downstream.
- Public exports are explicit and tree-shakeable.
- Public component, state, style-application, render, and resolved-state exports are explicit and tree-shakeable.
71 changes: 71 additions & 0 deletions .github/skills/agentic-component-optimization/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: agentic-component-optimization
description: Analyze and optimize packages/agentic-components as a whole when repeated patterns, dependency direction, or extraction boundaries cross components.
license: MIT
---

# Agentic component optimization

Use this skill when a change is about the package as a system, not a single component fix. It helps decide whether repeated code
belongs in `src/common`, `@fluentui-react-native/framework-base`, or `@fluentui-react-native/design/styling`, and whether a
primitive or helper should exist at all.

## Read first

1. Read `packages/agentic-components/AGENTS.md` and `packages/agentic-components/src/AGENTS.md`.
2. Read the relevant component or primitive `AGENTS.md` file and the colocated `SPEC.md` files for the affected area.
3. Inspect the canonical implementations:
- `packages/agentic-components/src/components/button`
- `packages/agentic-components/src/primitives/icon`

## Audit checklist

### 1. Dependency direction

- Production source may depend only on React / React Native native components, `@fluentui-react-native/design`, and
`@fluentui-react-native/framework-base`.
- Generalizable non-styling hooks belong in `framework-base/src/hooks`.
- Styling helpers belong in `agentic-design/src/styling`.
- Component-library-specific non-public types, constants, and helpers belong in `packages/agentic-components/src/common`.

### 2. Repetition and ownership

Look for repeated:

- types and discriminated unions
- constants and default tables
- state routines and prop normalization
- slot wiring or subtree assembly
- primitive behaviors or structural contracts

Prefer extraction only when the repeated shape is stable and shared across multiple components.

### 3. Validate extraction payoff

Before extracting, confirm that the change:

- reduces repeated logic without widening public APIs
- preserves component-qualified exports and call sites
- improves dependency direction instead of hiding it
- keeps the resulting abstraction smaller than the duplication it replaces

### 4. Do-not-extract criteria

Do not extract when the code is:

- one-off component behavior
- a styling decision that belongs in the owning component
- a public prop contract or display-specific variant
- a thin wrapper around a single native element
- easier to read in place than through another helper

## Output

Return a short recommendation with:

- what to keep local
- what to move to shared package/common code
- whether the extraction is worth doing now
- any public API or dependency risks

If the work is just a tiny component edit, stop at the component instructions and do not run a whole-package audit.
7 changes: 6 additions & 1 deletion packages/agentic-components/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = require('@fluentui-react-native/scripts/jest-config');
const config = require('@fluentui-react-native/scripts/jest-config');

module.exports = {
...config,
testTimeout: 10000,
};
5 changes: 4 additions & 1 deletion packages/agentic-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@
"react": "19.1.4",
"react-native": "^0.81.6",
"react-native-macos": "^0.81.0",
"react-native-svg": "^15.12.1",
"test-renderer": "catalog:0.81"
},
"peerDependencies": {
"@types/react": "~18.2.0 || ~19.0.0 || ~19.1.4",
"react": "18.2.0 || 19.0.0 || 19.1.4",
"react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6",
"react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
"react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0 || ^15.11.2 || ^15.12.1",
"react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
},
"peerDependenciesMeta": {
Expand All @@ -74,7 +76,8 @@
"alignDeps": {
"capabilities": [
"core",
"core-macos"
"core-macos",
"svg"
]
},
"extends": "@fluentui-react-native/scripts/kit-config"
Expand Down
28 changes: 28 additions & 0 deletions packages/agentic-components/specs/breadcrumb/blockers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Breadcrumb blockers

## Classification

- **Component shape:** higher-order / molecular
- **Pure React Native feasibility:** partial

## Analysis

I reviewed:

- `specs/breadcrumb/SPEC.md`
- `specs/breadcrumb/usage.md`
- `specs/breadcrumb/interaction.md`
- `specs/breadcrumb/accessibility.md`
- `specs/breadcrumb/tokens.yaml`
- canonical `src/components/button/*`
- canonical `src/primitives/icon/*`

## Blockers

1. The spec depends on `Popover`, `Menu`, and `Tooltip` behaviors/components.
2. This package currently only contains `Button` and `Icon`; there is no breadcrumb source tree to extend, and no in-package implementation for the overflow/tooltip surfaces.
3. The package manifest does not currently provide a dependency path to the experimental popover/tooltip packages, and this task scope forbids changing other components.

## Result

I could not fully implement Breadcrumb to the authored spec without out-of-scope dependency/package changes. Leaving the spec files unchanged as requested.
27 changes: 0 additions & 27 deletions packages/agentic-components/specs/divider/accessibility.md

This file was deleted.

29 changes: 29 additions & 0 deletions packages/agentic-components/specs/drawer/blockers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Drawer blockers

## Classification

- **Component kind:** HOC, not primitive.
- **Pure React Native fit:** **does not fully satisfy the contract**.

## Blocking issues

1. **Focus trap over arbitrary drawer body content**
- The spec requires Modal/Alert drawers to trap focus, and the drawer body accepts arbitrary children.
- Pure RN does not provide a built-in focus-trap/FocusZone primitive that can enumerate and cycle through unknown descendants across Windows/macOS.
- Source: `specs/drawer/interaction.md`, `specs/drawer/accessibility.md`.

2. **Return-focus-to-trigger is not self-contained**
- The contract requires focus to return to the element that opened the drawer.
- The drawer spec does not define a trigger ref / return-focus target prop, and the trigger lives outside the component boundary.
- Pure RN cannot reliably infer or restore focus to an arbitrary opener without additional platform or parent-owned focus plumbing.
- Source: `specs/drawer/interaction.md`, `specs/drawer/accessibility.md`.

3. **Modal/Alert semantics depend on platform focus behavior**
- `aria-modal`, `dialog`, and `alertdialog` are available, but they do not by themselves enforce the modal keyboard contract.
- The spec also requires Escape handling, scrim dismissal rules, and seamless overlay/inline reflow while preserving focus state.
- That combination needs either native/platform focus management or an explicit higher-level focus controller contract.
- Source: `specs/drawer/interaction.md`, `specs/drawer/usage.md`, `specs/drawer/accessibility.md`.

## Conclusion

Drawer should remain specified here until the implementation contract adds a supported focus-management path or uses platform-native focus trapping. Moving it to `src/` would overstate what pure RN can guarantee today.
Loading
Loading