-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RNMobile] Embed block: Implement specific Embed preview (#33426)
* Created an EmbedPreview component to house the caption. * Disabled the placeholder mode temporarily until the linking is enabled. * added the react-native-web-view package. * linked react-native-web-view to ios * integrated react-native-web-view with android * initial integration of WebView into the embed-preview component. * added project configurations for react-native-webview android * Add sandbox component native version * Use webview to preview embed block * Update aspect ratio calculation in sandbox component * Add native styles to sandbox component * Open embed content in external browser * Add comment to sandbox webview * Update react-native-webview package to wp-fork * Bump react-native-webview version * Bump react-native-webview version * Use provider url as base url for embed webview * Add forceRender param to trySandbox * Handle case of setting empty URL after preview * Enable embed preview interaction when selected * Add max allowed requests to embed preview * Prevent navigation in embed preview on Android * Recreate WebView in Android on orientation change * Disable embed preview interaction * Remove unused clientId prop from embed web version * Enable inline preview only in dev mode * Remove URL from embed block internal state I noticed that for the mobile version we don't really need to keep the URL in the internal state, as we were only modifying it once it changed, and that's already being handled with the url block's attribute. * Use memo in embed preview component * Use memo in sandbox component * Rename iframe html to content html and update logic * Bump react-native-webview package * Add comments to explain the postMessage function * Remove onBlur prop from embed preview * Add sandbox classnames * Use url instead of provider url as key in sandbox component * Stop passing scripts to sandbox component * Add size style calculation to sandbox * Prevent calling updateContentHtml on very render * Reset sandbox size when device orientation changes * Update pods in react-native-editor demo project Co-authored-by: Joel Dean <jdeanjj1000@gmail.com>
- Loading branch information
1 parent
fce770a
commit 8ff6687
Showing
13 changed files
with
396 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.