Skip to content

Commit

Permalink
[0.75] [Fabric] Port fabric fixes (#13456)
Browse files Browse the repository at this point in the history
* [Fabric] Patch yoga to include changes to correctly recalculate layout on scale change (#13407)

* Patch yoga to handle dynamic scale changes

* Change files

* Update vnext/overrides.json

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/overrides.json

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/overrides.json

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/overrides.json

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/overrides.json

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* Update vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* review feedback from yoga PR

---------

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>

* [Fabric] Handle scale factor changes (#13406)

* [Fabric] Handle scalefactor changes

* Change files

* [Fabric] Handle changes to BorderRadius (#13422)

* Handle changes to borderradius

* Change files

* format

* [Fabric] [Win32] Add image response APIs to win32 exports (#13428)

* Add image response APIs to win32 exports

* Change files

* fix

* [Fabric] Move to WinAppSDK types for KeyStatus, and ensure usages account for locked flag (#13435)

* [Fabric] Move to WinAppSDK types for KeyStatus, and ensure usages account for locked flag

* Change files

* Use scrollEnabled flag to enable/disable the ScrollView (#13427)

* Fix scrollview

* Change files

* Address feedback

* Return false for scroll event handlers when scroll is disabled

* Update scrollbar color based on scrollEnabled

* Rename OnThemeChanged to UpdateColorForScrollBarRegions

* [Fabric] Fix image component reference cycle (#13440)

* [Fabric] Fix image component reference cycle

* Change files

* format

* disable aggressive component deleted assert

* Use weak_ref for image didReceiveImage callback

* typo

* Unsubscribe from imageresponseobserver when deleted - aligns with core

* format

* [Fabric] call reportMount to implement UIManagerMountHook support (#13443)

* [Fabric] call reportMount to implement UIManagerMountHook support

* Change files

* Resolve Transform Matrix before Animation (#13450)

* Resolve transform before animation

* Change files

* Minor naming fix

* noexcept

* [Fabric] Text renders borders twice (#13445)

* [Fabric] Text renders borders twice

* Change files

* Add fabric test for text borders

* snapshot updates

* snapshots

* align overrides for 0.75 branch

* snapshot

---------

Co-authored-by: Marlene Cota <1422161+marlenecota@users.noreply.github.com>
Co-authored-by: Sharath Manchala <10109130+sharath2727@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 1, 2024
1 parent cded02b commit ae86b08
Show file tree
Hide file tree
Showing 46 changed files with 4,415 additions and 304 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Handle changes to borderradius",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[Fabric] call reportMount to implement UIManagerMountHook support",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[Fabric] Move to WinAppSDK types for KeyStatus, and ensure usages account for locked flag",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[Fabric] Text renders borders twice",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Add image response APIs to win32 exports",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Fix scrollview",
"packageName": "react-native-windows",
"email": "10109130+sharath2727@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Resolve transform before animation",
"packageName": "react-native-windows",
"email": "10109130+sharath2727@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[Fabric] Fix image component reference cycle",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[Fabric] Handle scalefactor changes",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Patch yoga to handle dynamic scale changes",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,9 @@ function TextBaseLineLayoutExample(props: {}): React.Node {

function TextBorderExample(props: {}): React.Node {
return (
<View testID={'text-border'}>
<View testID={'text-border'}
accessible
accessibilityLabel="Border Example">
<Text style={styles.borderedTextSimple}>
Sample bordered text with default styling.
</Text>
Expand Down Expand Up @@ -1009,7 +1011,9 @@ function TextBorderExample(props: {}): React.Node {

function AdvancedBordersExample(props: {}): React.Node {
return (
<View testID={'advanced-borders'}>
<View testID={'advanced-borders'}
accessible
accessibilityLabel="Advanced Border Example">
<Text
style={{
borderColor: 'red',
Expand Down
12 changes: 12 additions & 0 deletions packages/e2e-test-app-fabric/test/TextComponentTest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,16 @@ describe('Text Tests', () => {
const dump = await dumpVisualTree('text-shadow');
expect(dump).toMatchSnapshot();
});
test('Text can have borders', async () => {
const component = await app.findElementByTestID('text-border');
await component.waitForDisplayed({timeout: 5000});
const dump = await dumpVisualTree('text-border');
expect(dump).toMatchSnapshot();
});
test('Text can have advanced borders', async () => {
const component = await app.findElementByTestID('advanced-borders');
await component.waitForDisplayed({timeout: 5000});
const dump = await dumpVisualTree('advanced-borders');
expect(dump).toMatchSnapshot();
});
});
Loading

0 comments on commit ae86b08

Please # to comment.