Commit Graph

55 Commits

Author SHA1 Message Date
Marco Wang 8351a5d186 Pre-Suppress errors for xplat/js for general strict comparison in non-generated files (#53342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53342

Commands

```
scripts/flow/tool add-comments --comment 'Error discovered during Constant Condition roll out. See https://fburl.com/workplace/4oq3zi07.' .
```
```
arc f
```

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D80487235

fbshipit-source-id: 9e7c1a2641ddc0da0400fa1aff598b112a0434d5
2025-08-19 01:09:22 -07:00
Panos Vekris 0c70c0166e pre-suppress errors for natural inference rollout in xplat/js (#51524)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51524

Links in error suppressions will point to the announcement post in Flow FYI.

Changelog: [Internal]

drop-conflicts

Reviewed By: marcoww6

Differential Revision: D75188177

fbshipit-source-id: 27ea1fbee848e9371e679cf423e30bc9608edea0
2025-05-22 02:50:47 -07:00
Tim Yung d78916d6ca RN: Prefer Destructured Import for cloneElement (#51410)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51410

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895844

fbshipit-source-id: 67f334981a1effce051c89e3d4643232aa22b4e9
2025-05-16 16:33:18 -07:00
Tim Yung 1bf167ce97 RN: Prefer Destructured Import for useRef (#51404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51404

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74893440

fbshipit-source-id: 9032f1e867a34b9cfa808f920a38f2630046eed7
2025-05-16 16:33:18 -07:00
Jakub Piasecki 39f051aeb6 Add a test case ensuring touch events are dispatched to views overflowing ScrollView content container (#49967)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49967

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D71030561

fbshipit-source-id: 4d73a0c4d3dc22b83c47091ba8de1d5261ab9ed5
2025-03-12 05:18:43 -07:00
Dawid Małecki f36bfe5dfa Remove redundant {||} syntax (#48686)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48686

Changelog:
[Internal] - Removed redundant `{||}` syntax

Reviewed By: javache

Differential Revision: D68205038

fbshipit-source-id: f7d3271142b6443a5859c3b668b7aebd3ce3ef3f
2025-01-15 07:07:01 -08:00
generatedunixname89002005232357 38fb83ca86 Revert D65556000 (#47642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47642

Reverts https://github.com/facebook/react-native/pull/47468

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D66030953

fbshipit-source-id: aea1f681e1916cc234b69bce650670451829bb55
2024-11-15 16:55:33 -08:00
Peter Abbondanzo 5b609cca09 Fix onMomentumScrollBegin not dispatching from animations (#47468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47468

Across our scroll view implementations on iOS, we fire `onMomentumScrollEnd` whenever the scroll view finishes decelerating, whether it comes from a user's touch or call to `setContentOffset` with animations. But we omit dispatching the `onMomentumScrollBegin` event in the latter cases.

This change updates both old and new architecture to dispatch `onMomentumScrollBegin` when a view-command-driven scroll occurs with animation, like `scrollTo` or `scrollToEnd`.

Changelog:
[iOS][Fixed] - Fixed `onMomentumScrollBegin` event not firing on command-driven scroll events

Reviewed By: javache

Differential Revision: D65556000

fbshipit-source-id: bc4b778c63d8a032e1d8e00b9d4d5f83a5d651d6
2024-11-11 10:12:33 -08:00
Nick Gerleman 0df59d4f03 Fix RTL ScrollView position when content smaller than container (#47280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47280

Noticed in the screenshots of https://github.com/facebook/react-native/pull/47230 that Android's logic of setting scroll content origin to zero, then right aligning scroll offset, won't correctly handle case where content is smaller than scrolling container. We can fix that by only resetting the origin when content overflows container, since we otherwise are not scrollable, and scroll adjustment will not translate.

Changelog:
[Android][Fixed] - Fix RTL ScrollView position when content smaller than container

Reviewed By: rshest

Differential Revision: D65136654

fbshipit-source-id: 2818ff6360cbfac64d7e57bdcbbe8c0a9b4bbb97
2024-10-29 16:29:36 -07:00
Peter Abbondanzo 09682b5109 Fix dark mode text (#46898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46898

Replaces *many* `Text` component usages with `RNTesterText`: a thin wrapper around `Text` that applies color based on the color scheme chosen by the user. It makes text legible for dark mode across 41 different example files. This changes intentionally do not touch a few larger component sites that expand beyond RNTester, like `Animated` and `NewAppScreen`

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D64053464

fbshipit-source-id: 9516fef2afe1b364eb38e85e3a2dbb5c434e44db
2024-10-10 11:02:18 -07:00
Sam Zhou a622a43764 Replace all exact React.Element type in react-native with ExactReactElement_DEPRECATED (#45998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45998

The exact `React.Element` type is deprecated and will be removed in a future version of Flow.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D61205640

fbshipit-source-id: a029a3a46c7d8d9f94b0b931b991b2ce461151b2
2024-08-13 09:08:44 -07:00
Sam Zhou ae73fe462e Replace React$Element that will cause an error in the future
Summary:
For the ones where `React.MixedElement` would suffice, I change them to `React.MixedElement`. For everything else, I changed it to be `React.Element`

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D60798229

fbshipit-source-id: 40176b44769aade2c6b63a680d03c10056b2ddfa
2024-08-05 18:42:05 -07:00
Nick Gerleman c046198cc9 Add more clipping examples (#44735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44735

Add some more examples of overflow clipping for scrollview, text, textinput.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D57999676

fbshipit-source-id: dfede321b2c7c61dda3afaf2aea784f6c295c384
2024-05-31 12:06:33 -07:00
Gijs Weterings f4ec8cbdba Add rntester_android as a valid app in ReactNativeCoreE2ESetup
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D54662740

fbshipit-source-id: f845b127dc1cf5ef509eebea29c1c495a9ceb763
2024-05-29 07:06:19 -07:00
Fabrizio Cucci 95de14dc53 Drop unused code + minor lint fixes (#44645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44645

Changelog: [Internal]

As per title.

Reviewed By: NickGerleman

Differential Revision: D57664819

fbshipit-source-id: 2388bd01c00d814a12de7f2e285b78f207e6012c
2024-05-22 12:11:33 -07:00
George Zahariev 608029aed2 Convert unannotated variable declaration with cast init to annotated variable declaration in xplat/js (#42880)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42880

Convert `const x = (a: T)` into `const x: T = a`. These are equivalent in Flow, and helps reduce the amount of colon-casts.

```
js1 flow-runner codemod flow/castToAnnotatedVariable --target colon xplat/js
```

Changelog: [Internal]

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D53392999

fbshipit-source-id: 3b4602618d6990e8642b423edaeb4e89b01a199a
2024-02-05 23:07:17 -08:00
Riccardo Cipolleschi 6cd1aaf3ae Refactor ScrollView example to trigger onScrollToTop (#42127)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42127

The current scrollViewExamples does not trigger the OnScrollToTop event.
This change for Paper adds that and refactors the codebase to isolate that example.

## Changelog:
[Internal] - Improve RNTester ScrollView example adding OnScrollView event.

Reviewed By: sammy-SC

Differential Revision: D52509669

fbshipit-source-id: 8fd0fcca7153ba41bf054832928e661ef7dff3fe
2024-01-03 08:08:30 -08:00
Kevin Gozali d5797aef98 RNTester: fixed up ScrollViewExample test name (#42043)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42043

It had a typo: pressableStickyHeader vs pressableStickyHeaders

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D52378237

fbshipit-source-id: b0ee4029797868298c00aab74808fce73e59e357
2023-12-21 17:56:18 -08:00
Sam Zhou 11d9b9cef0 Prepare to make React.Element fully opaque (#40798)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40798

Changelog: [Internal]

Reviewed By: sullenor

Differential Revision: D50194982

fbshipit-source-id: 21d2f86dd787952ceed9a4f862a3fcaa2b063349
2023-10-12 08:43:32 -07:00
Jordan Brown 37460b06a4 Deploy 0.210.0 to xplat (#38097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38097

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D47056034

fbshipit-source-id: 3a5f387722b637ad56a7871008bd9afecb0c52c8
2023-06-27 09:14:20 -07:00
David Richey da027dd2fd Pre-suppress unused-promise lint errors in xplat/js (#36590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36590

Pre-suppress unused-promise lint errors in xplat/js. The next diff enables the lint.

See https://flow.org/en/docs/linting/rule-reference/#toc-unused-promise for more details.

Changelog: [Internal]

drop-conflicts
bypass-lint

Reviewed By: pieterv

Differential Revision: D43967290

fbshipit-source-id: f36242a732dbc18bf7482adfb46ca2b77e1b1493
2023-03-22 18:24:22 -07:00
Janic Duplessis 59c4db85fb Add fabric support for maintainVisibleContentPosition on iOS (#36095)
Summary:
Reland of https://github.com/facebook/react-native/issues/35319 with a fix for custom pull to refresh components.

Custom pull to refresh component in fabric will need to conform to the `RCTCustomPullToRefreshViewProtocol` protocol, this way we know that the view is a pull to refresh and not the content view.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[IOS] [ADDED] - Add fabric support for maintainVisibleContentPosition on iOS

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

Pull Request resolved: https://github.com/facebook/react-native/pull/36095

Test Plan:
This will need to be tested internally in the product the crash happened.

Take a local build of Wilde open Marketplace.

Reviewed By: jacdebug

Differential Revision: D43128163

Pulled By: cipolleschi

fbshipit-source-id: 6cf8ddff92aeb446072a3d847434e21b9e38af61
2023-03-07 04:20:31 -08:00
Deepak Jacob 9d98e2cb07 Revert D41273822: Add fabric support for maintainVisibleContentPosition on iOS
Differential Revision:
D41273822 (https://github.com/facebook/react-native/commit/ecf967a51d358f3759acbf7795675f52d7190280)

Original commit changeset: 7900898f2828

Original Phabricator Diff: D41273822 (https://github.com/facebook/react-native/commit/ecf967a51d358f3759acbf7795675f52d7190280)

fbshipit-source-id: 0f4b9695c805407b9a41b0fec63784bd0e84be43
2023-02-07 13:06:38 -08:00
Janic Duplessis ecf967a51d Add fabric support for maintainVisibleContentPosition on iOS (#35319)
Summary:
This adds support for the `maintainVisibleContentPosition` in iOS fabric. This was previously only implemented in the old renderer. The implementation is very similar to what we currently have.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[iOS] [Added] - Add fabric support for maintainVisibleContentPosition on iOS

Pull Request resolved: https://github.com/facebook/react-native/pull/35319

Test Plan:
Test in RN tester example.

https://user-images.githubusercontent.com/2677334/201484543-f7944e34-6cb7-48d6-aa28-e2a7ccdfa666.mov

Reviewed By: sammy-SC

Differential Revision: D41273822

Pulled By: jacdebug

fbshipit-source-id: 7900898f28280ff01619a4af609d2a37437c7240
2023-02-07 02:54:06 -08:00
Janic Duplessis c19548728c Add maintainVisibleContentPosition support on Android (#35049)
Summary:
This adds support for `maintainVisibleContentPosition` on Android. The implementation is heavily inspired from iOS, it works by finding the first visible view and its frame before views are update, then adjusting the scroll position once the views are updated.

Most of the logic is abstracted away in MaintainVisibleScrollPositionHelper to be used in both vertical and horizontal scrollview implementations.

Note that this only works for the old architecture, I have a follow up ready to add fabric support.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Android] [Added] - Add maintainVisibleContentPosition support on Android

Pull Request resolved: https://github.com/facebook/react-native/pull/35049

Test Plan:
Test in RN tester example on Android

https://user-images.githubusercontent.com/2677334/197319855-d81ced33-a80b-495f-a688-4106fc699f3c.mov

Reviewed By: ryancat

Differential Revision: D40642469

Pulled By: skinsshark

fbshipit-source-id: d60f3e2d0613d21af5f150ca0d099beeac6feb91
2023-01-23 12:00:05 -08:00
Marshall Roch 68983b6631 fix some flow reference-before-declaration errors
Summary:
The `typeof X` type annotation now respects the initialization state of `X`: if `X` hasn't been declared it will be an error to get its type.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D40638870

fbshipit-source-id: 57459dec30ec5b87397365a709f2d846c87e378a
2022-10-25 11:07:40 -07:00
Sam Zhou 466ba91657 Implicit instantiation codemod
Summary: Changelog: [Internal]

Reviewed By: bradzacher

Differential Revision: D40543059

fbshipit-source-id: 4d10671d8f2734b47d2aa86646be7f543a174515
2022-10-20 19:06:09 -07:00
Pieter Vanderwerff ff14ff3d92 Add explicit React useState annotations in xplat/js
Reviewed By: SamChou19815

Differential Revision: D39756144

fbshipit-source-id: d34c86b62e82e771723714fb7896058b7f27670f
2022-09-23 15:18:54 -07:00
Gabriel Donadel Dall'Agnol c2b699abc5 chore: Fix RNTester typos (#34757)
Summary:
While working on https://github.com/facebook/react-native/pull/34550 I noticed that a couple of words inside the RNTester package were misspelled, this gave me the idea to test other files as well using the VS Code extension [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) which unveiled quite a few other typos.

## Changelog

[Internal] [Fixed] - Fix RNTester typos

Pull Request resolved: https://github.com/facebook/react-native/pull/34757

Test Plan: Shouldn't require much testing as this is just fixing some typos inside the RNTester package.

Reviewed By: dmytrorykun

Differential Revision: D39722889

Pulled By: cortinico

fbshipit-source-id: a575ab8337586c5fe2d68ce73d2aae27d24a6384
2022-09-22 03:14:51 -07:00
Pieter Vanderwerff ee3d3c248d Add missing class annotations xplat/js
Reviewed By: SamChou19815

Differential Revision: D38373443

fbshipit-source-id: 1222c4845ebd6b72bd6f54af1a27cf8542dd883a
2022-08-03 12:43:58 -07:00
fabriziobertoglio1987 5ddb9977e6 Adding grid role to ViewAccessibility to fix flow errors. (#34267)
Summary:
Adding grid role to ViewAccessibility to fix flow errors.
fixes https://github.com/facebook/react-native/issues/30861 fixes https://github.com/facebook/react-native/issues/30972

## Changelog

[General] [Fixed] - Adding grid role to ViewAccessibility to fix flow errors.

Pull Request resolved: https://github.com/facebook/react-native/pull/34267

Test Plan:
<details><summary>flow error for missing accessibilityRole type grid</summary>
<p>

<image src="https://user-images.githubusercontent.com/24992535/180728969-beccb7f7-d882-4a94-831d-1c08822fc030.png" width="800" />
</p>
</details>

<details><summary>adding grid role to ScrollView</summary>
<p>

https://user-images.githubusercontent.com/24992535/180721100-62de76af-ea23-44a6-816e-f6fa39835b77.mp4
</p>
</details>

<details><summary>adding grid role to FlatList</summary>
<p>

https://user-images.githubusercontent.com/24992535/180724852-861c2981-0b06-4c66-a983-0017785062fe.mp4
</p>
</details>

<details><summary>adding grid role to SectionList</summary>
<p>

https://user-images.githubusercontent.com/24992535/180788810-d1869381-1e6b-42aa-b9b2-a84aece41326.mp4
</p>
</details>

Reviewed By: NickGerleman

Differential Revision: D38121921

Pulled By: dmitryrykun

fbshipit-source-id: 3bc335b3a525e75ae2e032f6a35540b3e95cd6a8
2022-07-27 07:44:59 -07:00
Pieter Vanderwerff e7a4dbcefc Add LTI annotations to function params in xplat/js [1/2]
Summary: Add annotations to function parameters required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predicatable.

Reviewed By: evanyeung

Differential Revision: D37353648

fbshipit-source-id: e5a0c685ced85a8ff353d578b373f836b376bb28
2022-06-22 21:36:52 -07:00
Genki Kondo 7c581f3d30 Move ScrollView's contentOffset to common props
Summary:
ScrollView's contentOffset prop was assumed to be iOS only, but in reality it is supported on Android as well: https://fburl.com/code/nuxpjpth

Changelog:
[General] - Move ScrollView's contentOffset to common props

Reviewed By: yungsters

Differential Revision: D36219604

fbshipit-source-id: f41679fd2ce7971a30129e0d91ae9f32b9cf756e
2022-05-09 13:05:16 -07:00
Luna Wei 6958bbb28c Fix up lint errors under react-native-github (#33622)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33622

Changelog: [Internal] Clean up eslint errors

Reviewed By: yungsters

Differential Revision: D35599445

fbshipit-source-id: bbb9061a3cf9df32daacad9a9b44eba94d3ce48c
2022-04-22 16:25:25 -07:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Tim Yung 77ecc7ede1 JS: Format with Prettier v2.4.1 [3/n]
Summary:
Changelog:
[General][Internal]

Reviewed By: zertosh

Differential Revision: D31883447

fbshipit-source-id: cbbf85e4bf935096d242336f41bf0cc5d6f92359
2021-11-02 22:14:16 -07:00
George Zahariev 6790cf137f Change usages of exports.foo and module.exports.foo to just foo
Summary:
Change usages of `exports.foo` and `module.exports.foo` to just `foo`.

This will fix future errors when Flow no longer allows reads from `exports`/`module.exports`.

Changelog: [Internal]

Reviewed By: bradzacher

Differential Revision: D32009490

fbshipit-source-id: bb609b37ba948b44c3877f8dbbfa9137b963586b
2021-10-29 20:09:13 -07:00
Jesse Katsumata 3c5d3bce00 add persistentScrollbar option example for ScrollView (#31895)
Summary:
There was an unused example in ScrollView example, so I've added the example to RNTester App

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Added] - Added persistentScrollbar option example for ScrollView in RNTester App

Pull Request resolved: https://github.com/facebook/react-native/pull/31895

Test Plan: - RNTester App builds and shows example properly on Android

Reviewed By: sshic

Differential Revision: D29881126

Pulled By: mdvacca

fbshipit-source-id: 9e7e61c9d3f712cb767a78e729469fc95cb9953e
2021-07-26 10:58:36 -07:00
Luna Wei fa3243ad33 Rename things in RNTester
Summary:
Changelog:
[Internal] - Rename some types and components in RNTester to support work for tertiary levels of navigation.

module = component | api
moduleExample = an example of a certain feature a module

Reviewed By: kacieb

Differential Revision: D29381875

fbshipit-source-id: c348bcbb73aaf95e85928bb14080a097e685cc78
2021-07-01 14:35:30 -07:00
Kacie Bawiec 40a93914c6 Move Pressable Sticky Header Example to RNTester
Summary:
Add a test case showing off a pressable sticky header to RNTester.

Note that this test case does not follow the styling of the other ScrollView Examples. I chose not to make it follow the styling because the existing examples need to be refactored later to not use custom buttons.

Changelog:
[General][Added] Add Pressable Sticky Header example to ScrollViewExamples in RNTester

Reviewed By: lunaleaps

Differential Revision: D29437827

fbshipit-source-id: 3ccee5df99bc6f00a04e1ecbd47fbe86b1eda4dc
2021-06-30 15:44:31 -07:00
Kacie Bawiec 685ac9a792 Fix screenshot test failures for E2E tests in ScrollViewExamples
Summary:
Adding a minHeight property messed up some screenshot tests. T93437971

I'm honestly not sure why this happened since that ScrollView container has a fixed height set of 300, so it shouldn't have changed heights... It didn't change heights in RNTester.

We should probably take the full example (including title etc.) from RNTester for our E2E tests to avoid these types of weird layout breakages in the future.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D29201224

fbshipit-source-id: 30b98fa43d06eec1da345becc473690a3b075fb7
2021-06-17 13:36:31 -07:00
Kacie Bawiec 61f538ae95 Add minHeight to buttons in in ScrollViewExamples
Summary:
Quick fix to fix a few test cases that had very small height buttons. (buttons became like this after flex: 1 was added to them in D29082450 (https://github.com/facebook/react-native/commit/f12f0e679dd6f1cdbd3c993d940a736ea1e952a3))

Added a minHeight to the buttons and added Views around groups of buttons.

Eventually we should update these examples to not use a custom button.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D29145288

fbshipit-source-id: 238c298a25b33da662b4897399f82ad0aa29b9cd
2021-06-16 12:01:30 -07:00
Luna Wei f12f0e679d Remove Picker from ScrollView examples
Summary: Changelog: [Internal] - Remove Picker from ScrollView examples

Reviewed By: kacieb

Differential Revision: D29082450

fbshipit-source-id: 6c186e565b70eac9023b87f52f6174f9a0e993f2
2021-06-14 21:54:16 -07:00
Andrew 47b0be5f55 Fix a couple of places RNTester is using non-theme values (#31479)
Summary:
A few places in RNTester where using hard coded color values, which meant the UI looks broken in dark themes.

The area behind the bookmark button was using a solid color png file, which I've replaced with a color from the theme object.

## Changelog

[Internal] [Fixed] - Fix a couple of places RNTester is using non-theme values

Pull Request resolved: https://github.com/facebook/react-native/pull/31479

Test Plan: Verified in RNTester in react-native-windows in light+dark theme.

Reviewed By: TheSavior

Differential Revision: D28290192

Pulled By: rozele

fbshipit-source-id: 78192200ac2dc8629759c10f8e8b3ec2f6699acd
2021-06-03 07:46:28 -07:00
Luna Wei 321de15803 Delete unused FlowFixMes in xplat/js/react-native-github
Summary:
Changelog:
[Internal] - Remove unused FlowFixMes

Reviewed By: kacieb

Differential Revision: D27445690

fbshipit-source-id: c1fbf4495ae020b30a458c2ef4870547fd5d5c6e
2021-03-31 18:21:47 -07:00
Kacie Bawiec cfb5b5e20a Add test with Multiple Sticky Headers for ScrollView
Summary:
Changelog:
[Added] Add a test with multiple sticky headers for ScrollView

Reviewed By: nadiia

Differential Revision: D27131325

fbshipit-source-id: 8793a246ee5433aa2f97d3f05cdb5c86412f8168
2021-03-18 16:50:59 -07:00
Kacie Bawiec 54f754b390 Add LTR and RTL Horizontal ScrollViews for E2E Tests
Summary:
This diff splits up the LTR and RTL examples in RNTester for Horizontal ScrollView into two examples for ease of E2E testing.

Changelog:
[Changed] Split RTL and LTR Horizontal ScrollView tests in RNTester into two tests

Reviewed By: lunaleaps

Differential Revision: D27139885

fbshipit-source-id: aae8aa06f4827507d1bc26a6b173d39cc92e20fe
2021-03-18 08:15:14 -07:00
Kacie Bawiec fb0a7edd6c Add scroll buttons to invertStickyHeaders ScrollView test
Summary:
This diff adds buttons to scroll to top and scroll to end to the invertStickyHeaders ScrollView test. This will allow programmatic scrolling to test sticky header behavior in end-to-end tests.

NOTE: This prop doesn't seem to work at all to invert the sticky header.

NOTE: There is also a bug where on first render, the sticky header does not "stick" correctly. My diff has not changed this and it seems to be a JS issue - I will investigate in another diff.

Changelog:
[General][Added] Added scroll buttons to invertStickyHeaders ScrollView test

Reviewed By: nadiia

Differential Revision: D26735461

fbshipit-source-id: 66db39ab9c9dbc9c62f50c5ff56db67a829f6db8
2021-03-03 15:34:36 -08:00
Kacie Bawiec f0ed1e8201 Add to an RNTester ScrollView example a TextInput and a Button to test keyboardShouldPersistTaps
Summary:
This is an example from RNTester. I added a button in the ScrollView which can eat taps. This allows us to test the `keyboardShouldPersistTap` prop values for `ScrollView`, since there was no way to differentiate between "handled" and "always".

Expected behavior for each value of `keyboardShouldPersistTaps`:
* `"handled"` - The keyboard should dismiss if the ScrollView is tapped, but pressable components like buttons can eat taps (and not dismiss the keyboard)

* `"never"` - The keyboard should always dismiss when anything in the ScrollView is tapped. Buttons won't be pressed - the keyboard will dismiss instead.

* `"always"` - The keyboard should never dismiss. Buttons and other content in the ScrollView can be tapped.

Reviewed By: lunaleaps, nadiia

Differential Revision: D26228852

fbshipit-source-id: 1df78f0be10e2f2cc81e95548a6a6f7cab07894f
2021-02-04 12:48:13 -08:00
Micha Reiser 93377ff508 Remove "use strict" directive from ES Modules
Summary:
ES Modules implicitly enable strict mode. Adding the "use strict" directive is, therefore, not required.

This diff removes all "use strict" directives from ES modules.

Changelog:

[Internal]

Reviewed By: motiz88

Differential Revision: D26172715

fbshipit-source-id: 57957bcbb672c4c3e62b1db633cf425c1c9d6430
2021-02-02 11:12:56 -08:00