Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tidy-callouts-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fluentui-react-native/native-core': patch
---

Restore the macOS Paper FRNCallout manager alias for older Callout JavaScript bundles while retaining the current RCTCallout registration.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ class CalloutManager: RCTViewManager {
return true
}
}

// Keep the Paper component name used by older Callout JS bundles.
@objc(FRNCalloutManager)
class LegacyCalloutManager: CalloutManager {}
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ @interface RCT_EXTERN_MODULE(RCTCalloutManager, RCTViewManager)
RCT_EXPORT_VIEW_PROPERTY(onDismiss, RCTDirectEventBlock)

@end

@interface RCT_EXTERN_MODULE(FRNCalloutManager, RCTCalloutManager)
@end
3 changes: 3 additions & 0 deletions packages/agentic/native-core/src/legacy/callout/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ The JavaScript component and its public types are exported only from
deprecated aliases for the public types in the legacy entrypoint.

Existing `Callout`/`RCTCallout` native registration names remain unchanged.
On macOS Paper, `FRNCallout` remains available as an alias of `RCTCallout` for
older JavaScript bundles, with the same view properties, events, and commands.
Fabric registration is unchanged.
Native applications must directly depend on `@fluentui-react-native/native-core`
so native tooling discovers the shared pod and Windows project.

Expand Down
10 changes: 10 additions & 0 deletions packages/agentic/native-core/tests/native-ownership.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ test('macOS Swift interoperability uses the consolidated pod module name', async
}
});

test('macOS Paper registers the legacy FRNCallout alias through the current manager', async () => {
const swift = await readFile(new URL('macos/components/Callout/paper/CalloutManager.swift', packageRoot), 'utf8');
assert.match(swift, /@objc\(RCTCalloutManager\)\s*class CalloutManager: RCTViewManager/);
assert.match(swift, /@objc\(FRNCalloutManager\)\s*class LegacyCalloutManager: CalloutManager\s*\{\s*\}/);

const objc = await readFile(new URL('macos/components/Callout/paper/FRNCalloutManager.m', packageRoot), 'utf8');
assert.match(objc, /RCT_EXTERN_MODULE\(RCTCalloutManager, RCTViewManager\)/);
assert.match(objc, /@interface RCT_EXTERN_MODULE\(FRNCalloutManager, RCTCalloutManager\)\s*@end/);
});

for (const shim of ['callout', 'focus-zone']) {
test(`${shim} is a JS-only compatibility shim with no duplicate native ownership`, async () => {
const root = new URL(`../../shim/${shim}/`, packageRoot);
Expand Down
Loading