mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
chore: fix typos in test descriptions and code comments (#55651)
Summary: I was upgrading bare react native project to expo sdk 54 and stumbled upon ``` "TurboModule system assumes returnType == void iff the method is synchronous." ``` error from `turbomodule/core/TurboModuleInteropUtils.kt` I thought that `iff` with double `f` was a typo and wanted to submit a pr with fix - I learned that it means `if and only if` - decided to scan the repo for any other typos anywany - submitting the ones that I've found. ## Changelog: [Internal] <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message Pull Request resolved: https://github.com/facebook/react-native/pull/55651 Reviewed By: cipolleschi Differential Revision: D93876470 Pulled By: cortinico fbshipit-source-id: 43fc905bda14e77b27cdeda568bde1e2299d9d0f
This commit is contained in:
1 parent
efb80f99fc
commit
ac1aa7588a
8 files changed
+108
-108
No files matched your search
+1
-1
@@ -152,7 +152,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL
|
||||
};
|
||||
|
||||
// Check whether the native component exists in the app binary.
|
||||
// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless.
|
||||
// Old getViewManagerConfig() checks for the existence of the native Paper view manager. Not available in Bridgeless.
|
||||
// New hasViewManagerConfig() queries Fabric’s native component registry directly.
|
||||
const DeprecatedComponentNameCheckTemplate = ({
|
||||
componentName,
|
||||
|
||||
@@ -592,10 +592,10 @@ function buildSchemaFromConfigType(
|
||||
if (parsingErrors.length > 0) {
|
||||
/**
|
||||
* TODO(T77968131): We have two options:
|
||||
* - Throw the first error, but indicate there are more then one errors.
|
||||
* - Throw the first error, but indicate there are more than one error.
|
||||
* - Display all errors, nicely formatted.
|
||||
*
|
||||
* For the time being, we're just throw the first error.
|
||||
* For the time being, we're just throwing the first error.
|
||||
**/
|
||||
|
||||
throw parsingErrors[0];
|
||||
|
||||
@@ -158,7 +158,7 @@ RCT_EXPORT_MODULE()
|
||||
buttonConfig.background.cornerRadius = 10;
|
||||
buttonConfig.baseForegroundColor = color;
|
||||
|
||||
// Button is a visual cue to tap anywhere on the banner to dismiss so no seperate action is needed
|
||||
// Button is a visual cue to tap anywhere on the banner to dismiss so no separate action is needed
|
||||
self->_dismissButton = [UIButton buttonWithConfiguration:buttonConfig primaryAction:nil];
|
||||
self->_dismissButton.userInteractionEnabled = NO;
|
||||
self->_dismissButton.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
@@ -1055,7 +1055,7 @@ TEST_F(HostTargetTest, NetworkLoadNetworkResourceStreamInterrupted) {
|
||||
})
|
||||
.RetiresOnSaturation();
|
||||
|
||||
// Load the resource, receiving headers succesfully.
|
||||
// Load the resource, receiving headers successfully.
|
||||
toPage_->sendMessage(R"({
|
||||
"id": 1,
|
||||
"method": "Network.loadNetworkResource",
|
||||
@@ -1269,7 +1269,7 @@ TEST_F(HostTargetTest, NetworkLoadNetworkResourceStreamClosed) {
|
||||
})
|
||||
.RetiresOnSaturation();
|
||||
|
||||
// Load the resource, receiving headers succesfully.
|
||||
// Load the resource, receiving headers successfully.
|
||||
toPage_->sendMessage(R"({
|
||||
"id": 1,
|
||||
"method": "Network.loadNetworkResource",
|
||||
@@ -1358,7 +1358,7 @@ TEST_F(HostTargetTest, NetworkLoadNetworkResourceAgentDisconnect) {
|
||||
})
|
||||
.RetiresOnSaturation();
|
||||
|
||||
// Load the resource, receiving headers succesfully.
|
||||
// Load the resource, receiving headers successfully.
|
||||
toPage_->sendMessage(R"({
|
||||
"id": 1,
|
||||
"method": "Network.loadNetworkResource",
|
||||
|
||||
@@ -19,7 +19,7 @@ PointerHoverTracker::PointerHoverTracker(
|
||||
: target_(std::move(target)) {
|
||||
if (target_ != nullptr) {
|
||||
// Retrieve the root shadow node at this current revision so that we can
|
||||
// leverage it to get the event path list at the moment the event occured
|
||||
// leverage it to get the event path list at the moment the event occurred
|
||||
auto rootShadowNode = std::shared_ptr<const ShadowNode>{};
|
||||
auto& shadowTreeRegistry = uiManager.getShadowTreeRegistry();
|
||||
shadowTreeRegistry.visit(
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ const BASIC_CONSTRUCTORS = [Number, String, Boolean, Date];
|
||||
|
||||
const ObjectPrototype = Object.prototype;
|
||||
|
||||
// Technicall the memory value should be a parameter in
|
||||
// Technically the memory value should be a parameter in
|
||||
// `structuredCloneInternal` but as an optimization we can reuse the same map
|
||||
// and avoid allocating a new one in every call to `structuredClone`.
|
||||
// This is safe because we don't invoke user code in `structuredClone`, so at
|
||||
@@ -205,7 +205,7 @@ function structuredCloneInternal<T>(value: T): T {
|
||||
* but implements the cloning in a single step.
|
||||
*
|
||||
* Known limitations:
|
||||
* - It does not support transfering values.
|
||||
* - It does not support transferring values.
|
||||
*/
|
||||
export default function structuredClone<T>(value: T): T {
|
||||
try {
|
||||
|
||||
@@ -1374,12 +1374,12 @@ it('does not over-render when there is less than initialNumToRender cells', asyn
|
||||
);
|
||||
});
|
||||
|
||||
// Check that the first render clamps to the last item when intialNumToRender
|
||||
// Check that the first render clamps to the last item when initialNumToRender
|
||||
// goes over it.
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('retains intitial render if initialScrollIndex == 0', async () => {
|
||||
it('retains initial render if initialScrollIndex == 0', async () => {
|
||||
const items = generateItems(20);
|
||||
const ITEM_HEIGHT = 10;
|
||||
|
||||
@@ -1415,7 +1415,7 @@ it('retains intitial render if initialScrollIndex == 0', async () => {
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('discards intitial render if initialScrollIndex != 0', async () => {
|
||||
it('discards initial render if initialScrollIndex != 0', async () => {
|
||||
const items = generateItems(20);
|
||||
const ITEM_HEIGHT = 10;
|
||||
|
||||
@@ -1617,7 +1617,7 @@ it('adjusts render area with non-zero initialScrollIndex', async () => {
|
||||
jest.advanceTimersToNextTimer(3);
|
||||
});
|
||||
|
||||
// We should expand the render area after receiving a message indcating we
|
||||
// We should expand the render area after receiving a message indicating we
|
||||
// arrived at initialScrollIndex.
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
@@ -1711,7 +1711,7 @@ it('renders no spacers up to initialScrollIndex on first render when virtualizat
|
||||
});
|
||||
|
||||
// There should be no spacers present in an offset initial render with
|
||||
// virtualiztion disabled. Only initialNumToRender items starting at
|
||||
// virtualization disabled. Only initialNumToRender items starting at
|
||||
// initialScrollIndex.
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
@@ -1734,7 +1734,7 @@ it('expands first in viewport to render up to maxToRenderPerBatch on initial ren
|
||||
});
|
||||
|
||||
// When virtualization is disabled we may render items before initialItemIndex
|
||||
// if initialItemIndex + initialNumToRender < maToRenderPerBatch. Expect cells
|
||||
// if initialItemIndex + initialNumToRender < maxToRenderPerBatch. Expect cells
|
||||
// 0-3 to be rendered in this example, even though initialScrollIndex is 4.
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
+92
-92
@@ -2097,7 +2097,7 @@ exports[`constrains batch render region when an item is removed 1`] = `
|
||||
</RCTScrollView>
|
||||
`;
|
||||
|
||||
exports[`discards intitial render if initialScrollIndex != 0 1`] = `
|
||||
exports[`discards initial render if initialScrollIndex != 0 1`] = `
|
||||
<RCTScrollView
|
||||
data={
|
||||
Array [
|
||||
@@ -5846,97 +5846,7 @@ exports[`retains batch render region when an item is appended 1`] = `
|
||||
</RCTScrollView>
|
||||
`;
|
||||
|
||||
exports[`retains initial render region when an item is appended 1`] = `
|
||||
<RCTScrollView
|
||||
data={
|
||||
Array [
|
||||
Object {
|
||||
"key": 0,
|
||||
},
|
||||
Object {
|
||||
"key": 1,
|
||||
},
|
||||
Object {
|
||||
"key": 2,
|
||||
},
|
||||
Object {
|
||||
"key": 3,
|
||||
},
|
||||
Object {
|
||||
"key": 4,
|
||||
},
|
||||
Object {
|
||||
"key": 5,
|
||||
},
|
||||
Object {
|
||||
"key": 6,
|
||||
},
|
||||
Object {
|
||||
"key": 7,
|
||||
},
|
||||
Object {
|
||||
"key": 8,
|
||||
},
|
||||
Object {
|
||||
"key": 9,
|
||||
},
|
||||
Object {
|
||||
"key": 10,
|
||||
},
|
||||
]
|
||||
}
|
||||
getItem={[Function]}
|
||||
getItemCount={[Function]}
|
||||
getItemLayout={[Function]}
|
||||
initialNumToRender={3}
|
||||
onContentSizeChange={[Function]}
|
||||
onLayout={[Function]}
|
||||
onMomentumScrollBegin={[Function]}
|
||||
onMomentumScrollEnd={[Function]}
|
||||
onScroll={[Function]}
|
||||
onScrollBeginDrag={[Function]}
|
||||
onScrollEndDrag={[Function]}
|
||||
renderItem={[Function]}
|
||||
scrollEventThrottle={0.0001}
|
||||
stickyHeaderIndices={Array []}
|
||||
>
|
||||
<View>
|
||||
<View
|
||||
onFocusCapture={[Function]}
|
||||
style={null}
|
||||
>
|
||||
<MockCellItem
|
||||
value={0}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
onFocusCapture={[Function]}
|
||||
style={null}
|
||||
>
|
||||
<MockCellItem
|
||||
value={1}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
onFocusCapture={[Function]}
|
||||
style={null}
|
||||
>
|
||||
<MockCellItem
|
||||
value={2}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"height": 80,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
</RCTScrollView>
|
||||
`;
|
||||
|
||||
exports[`retains intitial render if initialScrollIndex == 0 1`] = `
|
||||
exports[`retains initial render if initialScrollIndex == 0 1`] = `
|
||||
<RCTScrollView
|
||||
data={
|
||||
Array [
|
||||
@@ -6119,6 +6029,96 @@ exports[`retains intitial render if initialScrollIndex == 0 1`] = `
|
||||
</RCTScrollView>
|
||||
`;
|
||||
|
||||
exports[`retains initial render region when an item is appended 1`] = `
|
||||
<RCTScrollView
|
||||
data={
|
||||
Array [
|
||||
Object {
|
||||
"key": 0,
|
||||
},
|
||||
Object {
|
||||
"key": 1,
|
||||
},
|
||||
Object {
|
||||
"key": 2,
|
||||
},
|
||||
Object {
|
||||
"key": 3,
|
||||
},
|
||||
Object {
|
||||
"key": 4,
|
||||
},
|
||||
Object {
|
||||
"key": 5,
|
||||
},
|
||||
Object {
|
||||
"key": 6,
|
||||
},
|
||||
Object {
|
||||
"key": 7,
|
||||
},
|
||||
Object {
|
||||
"key": 8,
|
||||
},
|
||||
Object {
|
||||
"key": 9,
|
||||
},
|
||||
Object {
|
||||
"key": 10,
|
||||
},
|
||||
]
|
||||
}
|
||||
getItem={[Function]}
|
||||
getItemCount={[Function]}
|
||||
getItemLayout={[Function]}
|
||||
initialNumToRender={3}
|
||||
onContentSizeChange={[Function]}
|
||||
onLayout={[Function]}
|
||||
onMomentumScrollBegin={[Function]}
|
||||
onMomentumScrollEnd={[Function]}
|
||||
onScroll={[Function]}
|
||||
onScrollBeginDrag={[Function]}
|
||||
onScrollEndDrag={[Function]}
|
||||
renderItem={[Function]}
|
||||
scrollEventThrottle={0.0001}
|
||||
stickyHeaderIndices={Array []}
|
||||
>
|
||||
<View>
|
||||
<View
|
||||
onFocusCapture={[Function]}
|
||||
style={null}
|
||||
>
|
||||
<MockCellItem
|
||||
value={0}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
onFocusCapture={[Function]}
|
||||
style={null}
|
||||
>
|
||||
<MockCellItem
|
||||
value={1}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
onFocusCapture={[Function]}
|
||||
style={null}
|
||||
>
|
||||
<MockCellItem
|
||||
value={2}
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"height": 80,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
</RCTScrollView>
|
||||
`;
|
||||
|
||||
exports[`unmounts sticky headers moved below viewport 1`] = `
|
||||
<RCTScrollView
|
||||
data={
|
||||
|
||||
Reference in new issue
Block a user