Skip to content

Consolidate Callout and FocusZone into native-core - #4354

Merged
Jason Morse (JasonVMo) merged 5 commits into
mainfrom
user/jasonvmo/native-lib1
Oct 2, 2026
Merged

Jason Morse (JasonVMo) merged 5 commits into
mainfrom
user/jasonvmo/native-lib1

Conversation

@JasonVMo

Copy link
Copy Markdown
Contributor

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Consolidate the existing Callout and FocusZone implementations into @fluentui-react-native/native-core, while preserving their public APIs and native registration names.

  • Move wrappers, types, tests, stories, and specifications under src/legacy, exported only from @fluentui-react-native/native-core/legacy. Keep the root and macos, windows, win, and win32 entrypoints reserved for modern APIs.
  • Retain @fluentui-react-native/callout and @fluentui-react-native/focus-zone as JS-only compatibility shims under packages/shim, including exact component identity and deprecated type aliases.
  • Consolidate native ownership into one FRNNativeCore macOS pod, one Windows Fabric library/package provider, and one FRNNativeCoreSpec codegen boundary. macOS retains shared AppKit behavior plus Paper and Fabric adapters; Win32 continues using its host-provided native implementations.
  • Update application dependencies, Storybook discovery/imports, TypeScript references, publishing metadata, changesets, and migration documentation.
  • Fix the consolidated macOS Swift interoperability header name, enforce the header/import invariant, and add a type-checked native Callout lifecycle story alongside the existing FocusZone keyboard cases.

Consumer migration: native apps must directly depend on native-core, remove explicit old pod/project references, and regenerate native autolinking/Pods. Existing imports from the Callout and FocusZone shim packages remain supported. Modern consumers can import the preserved APIs from @fluentui-react-native/native-core/legacy.

This is an ownership/API-boundary migration, not a new modern component or TurboModule implementation.

Verification

The following passed for the final branch source. Storybook commands run from apps/storybook; other commands run from the repository root.

Command Result
yarn workspace @fluentui-react-native/native-core format --check Passed
yarn workspace @fluentui-react-native/native-core lint Passed
yarn workspace @fluentui-react-native/native-core test Passed: build, typed stories, 17 Node contracts, 18 Jest tests, and one snapshot
yarn workspace @fluentui-react-native/callout test Passed: two shim compatibility tests
yarn workspace @fluentui-react-native/focus-zone test Passed: two shim compatibility tests
yarn workspace @fluentui-react-native/native-core codegen:windows --check Passed: no generated changes
yarn build Passed
yarn check-publishing Passed
yarn lint-lockfile Passed
yarn change:check Passed
yarn storybook prep --macos Passed: autolinks the consolidated pod and removes the old pods
yarn storybook build --macos Passed, including clean Fabric and temporary Paper builds
yarn storybook bundle --macos Passed
yarn storybook bundle --windows Passed at the final head
yarn storybook bundle --win32 Passed at the final head
yarn format --check and yarn lint in Storybook Both passed
STORYBOOK_SMOKE_STORY='native-*' yarn storybook smoke --macos --mode stories-and-tests Passed: all 168 stories rendered; six native cases passed, zero failed/skipped; owned app/listener cleanup completed

The macOS native cases exercise Callout window creation, onShow/onDismiss, outside-click dismissal and reopening, plus FocusZone directional/geometric navigation, Tab/Shift+Tab exits, and the nested-first-child backward-exit regression.

Earlier Windows-host migration validation also passed:

Command Result and scope
yarn storybook prep --windows and yarn storybook build --windows Both passed; fresh FRNNativeCore.dll and FRNNativeCore.winmd built
yarn storybook smoke --windows --mode stories Passed: 158 stories rendered
yarn storybook smoke --win32 --mode stories Passed: 152 stories rendered, including all three Callout stories
yarn lage test --no-cache --concurrency 4 Passed: all 82 tasks at the legacy-boundary commit 666bcdd67; not rerun as a full graph after the macOS follow-up

Qualification boundaries: Windows/Win32 native builds and smoke were not rerun from the macOS host; their final-head JS bundles were rerun. macOS Paper clean-builds, but runtime/input parity remains unqualified: the current native automation lane lacks Paper enabled-state observations and reliable popup activation. The temporary Paper configuration was removed and the final app restored to Fabric. The existing Windows Callout story exclusion remains unchanged. iOS, Android, VoiceOver, and RTL-specific qualification were not performed. Earlier Windows validation reported existing repo-wide lint/link problems outside this change; those checks are not claimed as passing here.

Before After
Separate Callout/FocusZone native packages, macOS pods, and Windows projects One native-core owner, macOS pod, Windows Fabric library, and shared codegen identity
Component implementations live in their original packages Original packages are compatibility shims; implementations are isolated behind native-core's /legacy entrypoint
Native migration requires independent ownership/configuration updates Applications autolink native-core directly, with export/ownership/shim contracts and macOS native regression coverage

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Tree-shaken, minified production esbuild bundles with React and React Native runtimes externalized.

Scenario Modules-Mac (Δ) Modules-Win (Δ) Size-Mac (Δ) Size-Win (Δ)
components-button 62 (+0) 63 (+0) 49.94k (+0b) 49.87k (+0b)
components-catalog 159 (+0) 160 (+0) 155.26k (+0b) 155.19k (+0b)
design-theme-state 33 (+0) 34 (+0) 30.11k (+0b) 30.03k (+0b)
design-themed-root 37 (+0) 38 (+0) 32.07k (+0b) 32.00k (+0b)
design-color-lib 6 (+0) 6 (+0) 6.33k (+0b) 6.33k (+0b)
design-theme-state-legacy-source 34 (+0) 35 (+0) 31.77k (+0b) 31.69k (+0b)
design-legacy-theme-from-flex 57 (+0) 58 (+0) 97.72k (+0b) 97.59k (+0b)

The job is advisory: size changes are reported but do not fail the pull request. Bundle or analysis errors still fail.


View bundle-size workflow run

Jason Morse (JasonVMo) added a commit that referenced this pull request Oct 2, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JasonVMo
Jason Morse (JasonVMo) merged commit c547395 into main Oct 2, 2026
17 checks passed
@JasonVMo
Jason Morse (JasonVMo) deleted the user/jasonvmo/native-lib1 branch October 3, 2026 00:46
Jason Morse (JasonVMo) added a commit that referenced this pull request Oct 3, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants