-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make StaticViewConfigValidator permissive of extra attributes on SVC …
…compared to native viewconfig (#45859) Summary: Pull Request resolved: #45859 "Fabric without SVCs" configuration is nearly gone, and so it doesn't make sense to need to add no-op methods, on normally Paper only code, etc to satisfy native viewconfig. These particular warnings are then more often noise, than things we need to action on. Checking for native code to be present can also break development where users are using distributed native app, slightly older than JS. This keeps the warning, only if static viewconfigs are missing native view config attributes (i.e. new prop would only be exposed to Paper, instead of only exposed to Fabric) Changelog: [Internal] Reviewed By: javache Differential Revision: D60575253 fbshipit-source-id: 1c118274b92eb7922c0dd92df060b24e44fceb3d
- Loading branch information
1 parent
a949e0d
commit 387560a
Showing
9 changed files
with
44 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 0 additions & 103 deletions
103
...es/react-native/Libraries/Utilities/__tests__/verifyComponentAttributeEquivalence-test.js
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
packages/react-native/Libraries/Utilities/stringifyViewConfig.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
* @flow | ||
*/ | ||
|
||
export default function stringifyViewConfig(viewConfig: any): string { | ||
return JSON.stringify( | ||
viewConfig, | ||
(key, val) => { | ||
if (typeof val === 'function') { | ||
return `ƒ ${val.name}`; | ||
} | ||
return val; | ||
}, | ||
2, | ||
); | ||
} |
135 changes: 0 additions & 135 deletions
135
packages/react-native/Libraries/Utilities/verifyComponentAttributeEquivalence.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.