Skip to content
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

Add deprecation warnings for a few IOS components #21901

Closed
wants to merge 4 commits into from

Conversation

matthargett
Copy link
Contributor

Test Plan:

  • npm run lint
  • npm run flow
  • local-cli/cli.js bundle --entry-file RNTester/js/RNTesterApp.android.js --bundle-output android.bundle --platform android
  • local-cli/cli.js bundle --entry-file RNTester/js/RNTesterApp.ios.js --bundle-output ios.bundle --platform ios

Release Notes:

[IOS] [BREAKING] [TabBarIOS] - Report deprecation warning on use. Will be removed entirely soon.
[IOS] [BREAKING] [TabBarItemIOS] - Report deprecation warning on use. Will be removed entirely soon.
[IOS] [BREAKING] [VibrationIOS] - Report deprecation warning on use. Will be removed entirely soon.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 23, 2018
render() {
if (!showedDeprecationWarning) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about the different places this could go? At the top level, constructor, componentDidMount, render. My feeling is that I'd prefer constructor or componentDidMount but I'm curious if you had thought about this already.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Oct 23, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
static Item = TabBarItemIOS;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this caused Flow errors on Android:

Error ---------------------------------------------------------------------------
react-native/RNTester/js/TabBarIOSBarStyleExample.js:40:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
  react-native/RNTester/js/TabBarIOSBarStyleExample.js:40:10
  40|         <TabBarIOS.Item title="Tab" icon={{uri: base64Icon, scale: 3}} selected>
               ^^^^^^^^^^^^^^
References:
  react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
  19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
            ^^^^^^^^^^^^^^ [1]
Error -------- react-native/RNTester/js/TabBarIOSExample.js:49:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
  react-native/RNTester/js/TabBarIOSExample.js:49:10
  49|         <TabBarIOS.Item
               ^^^^^^^^^^^^^^
References:
  react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
  19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
            ^^^^^^^^^^^^^^ [1]
Error -------- react-native/RNTester/js/TabBarIOSExample.js:60:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
  react-native/RNTester/js/TabBarIOSExample.js:60:10
  60|         <TabBarIOS.Item
               ^^^^^^^^^^^^^^
References:
  react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
  19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
            ^^^^^^^^^^^^^^ [1]
Error -------- react-native/RNTester/js/TabBarIOSExample.js:73:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
  react-native/RNTester/js/TabBarIOSExample.js:73:10
  73|         <TabBarIOS.Item
               ^^^^^^^^^^^^^^
References:
  react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
  19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
            ^^^^^^^^^^^^^^ [1]
Found 4 errors

I'll fix it

@react-native-bot
Copy link
Collaborator

@matthargett merged commit 1746448 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 23, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 23, 2018
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
rozele pushed a commit to microsoft/react-native-windows that referenced this pull request Apr 14, 2019
Summary: Pull Request resolved: facebook/react-native#21901

Differential Revision: D10502816

Pulled By: TheSavior

fbshipit-source-id: 1890aa35251cff0ac2c15760ecd5aabeb7652558
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary: Pull Request resolved: facebook#21901

Differential Revision: D10502816

Pulled By: TheSavior

fbshipit-source-id: 1890aa35251cff0ac2c15760ecd5aabeb7652558
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants