Skip to content

Draft: Move fluentui-react-native to the jsx-runtime #3949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 36 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a2bfc62
create a more robust depcheck implementation
JasonVMo Jul 28, 2025
0a19faa
fix missing eslint config dependencies
JasonVMo Jul 28, 2025
cc464e2
apply depcheck fix to directories to fix error level issues
JasonVMo Jul 28, 2025
271699d
fix missing deps for private packages
JasonVMo Jul 28, 2025
a9fc3a2
applying package updates
UI-Fabric-RN-Bot Jul 25, 2025
8440fa2
JSX runtime (part 2 of 3) - more formal rendering logic for both clas…
JasonVMo Jul 29, 2025
5076751
applying package updates
UI-Fabric-RN-Bot Jul 29, 2025
b9aa67b
apply more dependency fixes
JasonVMo Jul 29, 2025
fb9d675
JSX runtime (part 2 of 3) - more formal rendering logic for both clas…
JasonVMo Jul 29, 2025
7d54e98
applying package updates
UI-Fabric-RN-Bot Jul 29, 2025
0494df9
Merge remote-tracking branch 'origin/main' into user/jasonvmo/deps
JasonVMo Jul 29, 2025
24a8f09
switch to pnpm and fix to build stage
JasonVMo Jul 29, 2025
18c1435
fix dependencies up through linting
JasonVMo Jul 29, 2025
caded41
fix babel and jest configs and add dedicated babel config package
JasonVMo Jul 30, 2025
9b614c5
split jest configurations into a separate package
JasonVMo Jul 31, 2025
2366a6a
fix more tests
JasonVMo Jul 31, 2025
6e24494
move repo to pnpm, create babel and jest config packages, fix depende…
JasonVMo Aug 1, 2025
fabe04b
Change files
JasonVMo Aug 1, 2025
e27726a
add missing @types/jest devDependency
JasonVMo Aug 1, 2025
495139d
fix ios/mac pod install
JasonVMo Aug 1, 2025
3ac02b8
fix align-deps issue
JasonVMo Aug 1, 2025
febbb2e
fix more align-deps / depcheck issues
JasonVMo Aug 1, 2025
8800909
switch back to node-modules temporarily to deal with appium issues as…
JasonVMo Aug 4, 2025
8d122ae
add build fixes for node-modules linking
JasonVMo Aug 4, 2025
3f432ce
revert podfiles to non-pnpm behavior, fix prettier issues, respond to…
JasonVMo Aug 4, 2025
68984d3
start of jsx work, move eslint config to configs directory
JasonVMo Aug 5, 2025
2f902a2
get jsx-runtime transition building
JasonVMo Aug 5, 2025
096809d
Merge remote-tracking branch 'origin/main' into user/jasonvmo/runtime
JasonVMo Aug 5, 2025
185474c
convert repo to modern jsx-runtime
JasonVMo Aug 5, 2025
5eeb371
Change files
JasonVMo Aug 5, 2025
5b33dab
fix bundling babel configurations
JasonVMo Aug 5, 2025
ec39e91
add direct jsx-runtime accessors to allow bundling without special ha…
JasonVMo Aug 5, 2025
a86e725
move jsx-runtime.cjs to jsx-runtime.js to handle metro fallback
JasonVMo Aug 5, 2025
932bb27
switch repo to use the jsx-runtime
JasonVMo Aug 7, 2025
0a10297
Merge remote-tracking branch 'origin/main' into user/jasonvmo/runtime
JasonVMo Aug 7, 2025
785f743
Change files
JasonVMo Aug 7, 2025
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},

"eslint.enable": true,
"eslint.workingDirectories": [{ "pattern": "./packages/framework/eslint-config-rules" }], // use the common eslint config file
"eslint.workingDirectories": [{ "pattern": "./packages/configs/eslint-config-rules" }], // use the common eslint config file

"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ Reach out to Samuel Freiberg with any questions related to E2E testing.

1. `index.ts`
- This is the file listed as `main` inside your package.json and simply exports other files.
1. `<new-component>.tsx` - This is the file that will actually define your function component, and compose it into a higher order component with slots, theming, and design tokens. - Note that we need the comment `/** @jsxRuntime classic */
/** @jsx withSlots */` at the top of this file. An explanation can be found in the comment at `packages/experimental/use-slots/src/withSlots.tsx`
1. `<new-component>.tsx` - This is the file that will actually define your function component, and compose it into a higher order component with slots, theming, and design tokens. - Note that we need the comment `/** @jsxImportSource @fluentui-react-native/framework-base */` at the top of this file. An explanation can be found in the comment at `packages/experimental/use-slots/src/withSlots.tsx`
1. `<new-component>.<types | settings | platform | blah>.tsx` (Optional)
- Optional extra files to subdivide your code however you see fit. You can also add platform specific files as you see fit.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @jsxRuntime classic */
/** @jsx withSlots */
/** @jsxImportSource @fluentui-react-native/framework */
import * as React from 'react';
import { View } from 'react-native';
import { componentName, ComponentNameType, ComponentNameProps } from './ComponentName.types';
import type { ComponentNameType, ComponentNameProps } from './ComponentName.types';
import { componentName } from './ComponentName.types';
import { TextV1 as Text } from '@fluentui-react-native/text';
import { stylingSettings } from './ComponentName.styling';
import { compose, mergeProps, withSlots, UseSlots } from '@fluentui-react-native/framework';
import type { UseSlots } from '@fluentui-react-native/framework';
import { compose, mergeProps } from '@fluentui-react-native/framework';
import { useComponentName } from './useComponentName';
/**
* A function which determines if a set of styles should be applied to the component given the current state and props of the component-name.
Expand Down
4 changes: 1 addition & 3 deletions apps/fluent-tester/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
module.exports = {
presets: [['module:@react-native/babel-preset', { runtime: 'classic' }]],
};
module.exports = require('@fluentui-react-native/babel-config');
1 change: 1 addition & 0 deletions apps/fluent-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@fluentui-react-native/babel-config": "workspace:*",
"@fluentui-react-native/eslint-config-rules": "workspace:*",
"@fluentui-react-native/experimental-native-font-metrics": "workspace:*",
"@fluentui-react-native/focus-zone": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useCallback } from 'react';
import { useState, useCallback } from 'react';
import type { FunctionComponent } from 'react';
import { View, Text, Platform } from 'react-native';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as React from 'react';
import { Platform } from 'react-native';
import type { ColorValue } from 'react-native';

Expand Down
4 changes: 1 addition & 3 deletions apps/win32/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
};
module.exports = require('@fluentui-react-native/babel-config');
1 change: 1 addition & 0 deletions apps/win32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@fluentui-react-native/babel-config": "workspace:*",
"@fluentui-react-native/eslint-config-rules": "workspace:*",
"@fluentui-react-native/scripts": "workspace:*",
"@office-iss/react-native-win32": "^0.74.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui/react-native",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/badge",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/callout",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/chip",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/composition",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/contextual-menu",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/divider",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/drawer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/dropdown",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-activity-indicator",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-appearance-additions",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-avatar",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-expander",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-menu-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-shadow",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/experimental-shimmer",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/focus-trap-zone",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/focus-zone",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/framework",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/framework-base",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/icon",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/input",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/interactive-hooks",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/link",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/menu-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/menu",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/notification",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/overflow",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/persona",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/persona-coin",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/popover",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/pressable",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/radio-group",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/separator",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/spinner",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "convert repo to modern jsx-runtime",
"packageName": "@fluentui-react-native/stack",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Loading