Skip to content

Commit

Permalink
Merge pull request #6634 from wordpress-mobile/jetpack/support-for-vi…
Browse files Browse the repository at this point in the history
…deopress-v5

Initial support for VideoPress v5
  • Loading branch information
Siobhan Bamber authored Feb 23, 2024
2 parents 3f841f7 + 9f223de commit ddcac16
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased
---
* [**] Introduce VideoPress v5 support, to fix issues using video block with dotcom and Jetpack sites [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6634]
* [*] Prevent crash when autoscrolling to blocks [https://github.com/WordPress/gutenberg/pull/59110]
* [*] Remove opacity change when images are being uploaded [https://github.com/WordPress/gutenberg/pull/59264]
* [*] Media & Text blocks correctly show an error message when the attached video upload fails [https://github.com/WordPress/gutenberg/pull/59288]
Expand Down
7 changes: 6 additions & 1 deletion bundle/android/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<!-- translators: displays audio file extension. e.g. MP3 audio file -->
<string name="gutenberg_native_audio_file" tools:ignore="UnusedResources">audio file</string>
<string name="gutenberg_native_audio_player" tools:ignore="UnusedResources">Audio Player</string>
<string name="gutenberg_native_autoplay_may_cause_usability_issues_for_some_users" tools:ignore="UnusedResources">Autoplay may cause usability issues for some users</string>
<string name="gutenberg_native_block_cannot_be_rendered_because_it_is_deeply_nested_tap_here_for" tools:ignore="UnusedResources">Block cannot be rendered because it is deeply nested. Tap here for more details.</string>
<!-- translators: displayed right after the block is copied. -->
<string name="gutenberg_native_block_copied" tools:ignore="UnusedResources">Block copied</string>
Expand Down Expand Up @@ -160,6 +161,7 @@
<string name="gutenberg_native_edit_media" tools:ignore="UnusedResources">Edit media</string>
<string name="gutenberg_native_edit_using_web_editor" tools:ignore="UnusedResources">Edit using web editor</string>
<string name="gutenberg_native_edit_video" tools:ignore="UnusedResources">Edit video</string>
<string name="gutenberg_native_edit_video_024aee6d" tools:ignore="UnusedResources">Edit video</string>
<!-- translators: %s: name of the host app (e.g. WordPress) -->
<string name="gutenberg_native_editing_synced_patterns_is_not_yet_supported_on_s_for_android" tools:ignore="UnusedResources">Editing synced patterns is not yet supported on %s for Android</string>
<!-- translators: %s: name of the host app (e.g. WordPress) -->
Expand Down Expand Up @@ -389,10 +391,13 @@ translators: %s: Select control option value e.g: "Auto, 25%". -->
<string name="gutenberg_native_upgrade_your_plan_to_use_video_covers" tools:ignore="UnusedResources">Upgrade your plan to use video covers</string>
<string name="gutenberg_native_uploading" tools:ignore="UnusedResources">Uploading…</string>
<string name="gutenberg_native_use_icon_button" tools:ignore="UnusedResources">Use icon button</string>
<!-- translators: accessibility text. Empty video caption. -->
<string name="gutenberg_native_video_caption_empty" tools:ignore="UnusedResources">Video caption. Empty</string>
<!-- translators: accessibility text. Empty video caption. -->
<string name="gutenberg_native_video_caption_empty_663aab49" tools:ignore="UnusedResources">Video caption. Empty</string>
<!-- translators: accessibility text. %s: video caption. -->
<string name="gutenberg_native_video_caption_s" tools:ignore="UnusedResources">Video caption. %s</string>
<!-- translators: accessibility text. %s: video caption. -->
<string name="gutenberg_native_video_caption_s_0141bd20" tools:ignore="UnusedResources">Video caption. %s</string>
<string name="gutenberg_native_waiting_for_connection" tools:ignore="UnusedResources">Waiting for connection</string>
<string name="gutenberg_native_warning_message" tools:ignore="UnusedResources">Warning message</string>
<string name="gutenberg_native_we_are_working_hard_to_add_more_blocks_with_each_release" tools:ignore="UnusedResources">We are working hard to add more blocks with each release.</string>
Expand Down
1 change: 1 addition & 0 deletions bundle/ios/GutenbergNativeTranslations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private func dummy() {
_ = NSLocalizedString("Audio caption. Empty", comment: "translators: accessibility text. Empty Audio caption.")
_ = NSLocalizedString("audio file", comment: "translators: displays audio file extension. e.g. MP3 audio file")
_ = NSLocalizedString("Audio Player", comment: "")
_ = NSLocalizedString("Autoplay may cause usability issues for some users", comment: "")
_ = NSLocalizedString("Block cannot be rendered because it is deeply nested. Tap here for more details.", comment: "")
_ = NSLocalizedString("Block copied", comment: "translators: displayed right after the block is copied.")
_ = NSLocalizedString("Block cut", comment: "translators: displayed right after the block is cut.")
Expand Down
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 74 files
+0 −4 .github/workflows/end2end-test.yml
+1 −1 docs/reference-guides/block-api/block-registration.md
+3 −0 lib/experimental/editor-settings.php
+14 −0 lib/experiments-page.php
+10 −0 packages/base-styles/_mixins.scss
+3 −0 packages/base-styles/_z-index.scss
+40 −14 packages/block-editor/src/components/global-styles/shadow-panel-components.js
+17 −10 packages/block-editor/src/components/global-styles/style.scss
+100 −0 packages/block-editor/src/components/grid-visualizer/grid-item-resizer.js
+81 −0 packages/block-editor/src/components/grid-visualizer/grid-visualizer.js
+2 −0 packages/block-editor/src/components/grid-visualizer/index.js
+33 −0 packages/block-editor/src/components/grid-visualizer/style.scss
+5 −0 packages/block-editor/src/components/grid-visualizer/utils.js
+1 −1 packages/block-editor/src/components/inserter/mobile-tab-navigation.js
+2 −4 packages/block-editor/src/components/rich-text/index.js
+1 −0 packages/block-editor/src/hooks/index.js
+38 −0 packages/block-editor/src/hooks/layout-child.js
+12 −1 packages/block-editor/src/hooks/layout.js
+5 −7 packages/block-editor/src/hooks/use-bindings-attributes.js
+6 −1 packages/block-editor/src/layouts/grid.js
+0 −10 packages/block-editor/src/store/private-actions.js
+0 −8 packages/block-editor/src/store/private-selectors.js
+0 −15 packages/block-editor/src/store/reducer.js
+1 −0 packages/block-editor/src/style.scss
+2 −1 packages/block-library/src/button/edit.js
+3 −2 packages/block-library/src/columns/edit.js
+1 −1 packages/block-library/src/footnotes/index.php
+2 −1 packages/block-library/src/image/edit.js
+6 −0 packages/block-library/src/image/editor.scss
+5 −4 packages/block-library/src/image/image.js
+15 −0 packages/blocks/src/store/private-actions.js
+23 −0 packages/blocks/src/store/private-selectors.js
+15 −0 packages/blocks/src/store/reducer.js
+4 −0 packages/components/CHANGELOG.md
+2 −1 packages/components/src/tooltip/style.scss
+32 −2 packages/core-data/src/resolvers.js
+54 −4 packages/dataviews/src/bulk-actions.js
+43 −27 packages/dataviews/src/dataviews.js
+6 −1 packages/dataviews/src/filters.js
+2 −0 packages/dataviews/src/single-selection-checkbox.js
+8 −8 packages/dataviews/src/style.scss
+6 −2 packages/dataviews/src/view-grid.js
+109 −75 packages/dataviews/src/view-table.js
+0 −346 packages/e2e-tests/specs/editor/various/autosave.test.js
+0 −56 packages/edit-site/src/components/global-styles/font-library-modal/collection-font-details.js
+4 −4 packages/edit-site/src/components/global-styles/font-library-modal/collection-font-variant.js
+0 −33 packages/edit-site/src/components/global-styles/font-library-modal/confirm-delete-dialog.js
+11 −26 packages/edit-site/src/components/global-styles/font-library-modal/font-card.js
+299 −209 packages/edit-site/src/components/global-styles/font-library-modal/font-collection.js
+38 −4 packages/edit-site/src/components/global-styles/font-library-modal/font-demo.js
+224 −114 packages/edit-site/src/components/global-styles/font-library-modal/installed-fonts.js
+0 −34 packages/edit-site/src/components/global-styles/font-library-modal/library-font-card.js
+4 −4 packages/edit-site/src/components/global-styles/font-library-modal/library-font-variant.js
+15 −8 packages/edit-site/src/components/global-styles/font-library-modal/style.scss
+0 −85 packages/edit-site/src/components/global-styles/font-library-modal/tab-panel-layout.js
+13 −5 packages/edit-site/src/components/global-styles/font-library-modal/upload-fonts.js
+1 −1 packages/edit-site/src/components/global-styles/header.js
+5 −2 packages/edit-site/src/components/global-styles/screen-revisions/index.js
+26 −2 packages/edit-site/src/components/global-styles/ui.js
+3 −1 packages/edit-site/src/components/sidebar-dataviews/default-views.js
+2 −2 packages/editor/src/bindings/index.js
+1 −0 packages/icons/src/index.js
+16 −0 packages/icons/src/library/drafts.js
+3 −0 ...ative-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/GutenbergProps.kt
+1 −0 packages/react-native-bridge/ios/GutenbergBridgeDelegate.swift
+1 −0 packages/react-native-editor/android/app/src/main/java/com/gutenberg/MainActivity.java
+1 −0 packages/react-native-editor/ios/GutenbergDemo/GutenbergViewController.swift
+0 −25 schemas/json/font-collection.json
+69 −0 test/e2e/specs/editor/blocks/columns.spec.js
+378 −0 test/e2e/specs/editor/various/autosave.spec.js
+5 −6 test/e2e/specs/site-editor/new-templates-list.spec.js
+31 −67 test/e2e/specs/site-editor/patterns.spec.js
+29 −0 test/e2e/specs/site-editor/style-book.spec.js
+32 −0 test/e2e/specs/site-editor/user-global-styles-revisions.spec.js
2 changes: 1 addition & 1 deletion jetpack
Submodule jetpack updated 1707 files
14 changes: 13 additions & 1 deletion src/jetpack-editor-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
registerLoomVariation,
registerSmartframeVariation,
} from '../jetpack/projects/plugins/jetpack/extensions/extended-blocks/core-embed';
import '../jetpack/projects/plugins/jetpack/extensions/blocks/videopress/editor';

// When adding new blocks to this list please also consider updating `./block-support/supported-blocks.json`
const supportedJetpackBlocks = {
Expand Down Expand Up @@ -129,6 +128,14 @@ export function registerJetpackEmbedVariations( { capabilities } ) {
} );
}

export function enableVideoPressV5Support( { capabilities } ) {
if ( ! isActive() || ! capabilities.videoPressV5Support ) {
return;
}

require( '../jetpack/projects/plugins/jetpack/extensions/blocks/videopress/editor' );
}

const setupHooks = () => {
// Hook triggered before the editor is rendered
addAction( 'native.pre-render', 'gutenberg-mobile-jetpack', ( props ) => {
Expand All @@ -142,6 +149,11 @@ const setupHooks = () => {
// block type registration, so it’s required to add them before
// the core blocks are registered.
registerJetpackEmbedVariations( props );

// VideoPress v5 conversion also uses WP hooks that are attached to
// block type registration, so it’s required to add them before
// the core blocks are registered.
enableVideoPressV5Support( props );
} );

// Hook triggered after the editor is rendered
Expand Down

0 comments on commit ddcac16

Please sign in to comment.