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

[Lean Core] Add deprecation notice to ImageStore #23330

Closed
wants to merge 6 commits into from
Closed

[Lean Core] Add deprecation notice to ImageStore #23330

wants to merge 6 commits into from

Conversation

EvanBacon
Copy link
Contributor

Summary

  • Related: ☂️ Lean Core #23313
  • ImageStore is iOS only. AFAIK there is no reason this functionality isn't available on Android.
  • base64 is very inefficient with the React Native bridge
  • Ideally the FileSystem solutions will integrate Turbo Modules to circumvent bridge issues by passing direct references to files.

Changelog

  • [General][added] - A deprecation notice with info about third-party solutions for getting a base64-encoded string.
  • [General][fixed] - Missing warnings for unimplemented platform methods.

Test Plan

  • Run the console warnings in any React Native app to test the format.

# Why

- Related: #23313
- ImageStore is **iOS only**
- base64 is very inefficient with the React Native bridge
- Ideally the `FileSystem` solutions will integrate Turbo Modules to circumvent bridge issues by passing direct references to files.

# How

- Added a deprecation notice with info about third-party solutions for getting a base64-encoded string.
- Added missing warnings for unimplemented platform methods.
@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 Feb 7, 2019
@cpojer
Copy link
Contributor

cpojer commented Feb 7, 2019

Thank you! 🙏

Could you change your implementation to use the warnOnce module that's already in the repo? We shouldn't spam the yellowbox multiple times for each module.

@elicwhite
Copy link
Member

Should these warnings be added in react-native-implementation.js? That is where we've put the other warnings.

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues.

Libraries/react-native/react-native-implementation.js Outdated Show resolved Hide resolved
Libraries/react-native/react-native-implementation.js Outdated Show resolved Hide resolved
@EvanBacon
Copy link
Contributor Author

Could the failure be unrelated?

 FAIL  RNTester/e2e/__tests__/Switch-test.js (38.853s)
  Switch
    Switches can be set to true or false
      ✓ Switch that starts off should switch (732ms)
      ✕ Switch that starts on should switch (652ms)
    Switches can be disabled
      ✓ disabled switch should not toggle (300ms)

  ● Switch › Switches can be set to true or false › Switch that starts on should switch

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Thank you!

@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 Feb 11, 2019
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.

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

@react-native-bot
Copy link
Collaborator

@EvanBacon merged commit 62599fa into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 11, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 11, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 14, 2019
@hramos hramos added Partner p: Expo Partner: Expo labels Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: ImageStore CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Component: Image Merged This PR has been merged. p: Expo Partner: Expo Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants