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

Register VideoPress block behind a DEV flag #5459

Merged
merged 32 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c4f8198
Update Jetpack submodule reference
Feb 8, 2023
9d774b3
Update Gutenberg submodule reference
Feb 8, 2023
b93ef4b
Revert "Update Jetpack submodule reference"
Feb 8, 2023
045022d
Update Jetpack submodule reference
Feb 8, 2023
04a6bbc
Register VideoPress block
Feb 8, 2023
33ce5ec
Update Gutenberg submodule reference
Feb 8, 2023
00a5cea
Merge branch 'trunk' into register-videopress-block
Feb 8, 2023
23e66db
Fix code formatting
Feb 8, 2023
a1bd0a5
Add tests for VideoPress block
Feb 8, 2023
075f914
Update Jetpack submodule reference
Feb 8, 2023
6bca0e9
Update reference to Gutenberg submodule
Feb 8, 2023
a205ac6
Apply changes from bundle
Feb 8, 2023
f997a4e
Update Gutenberg submodule reference
Feb 8, 2023
97b9b06
Update Gutenberg submodule reference
Feb 8, 2023
0b4b05d
Apply changes to bundle
Feb 8, 2023
364d743
Jetpack: Update reference
renatoagds Feb 9, 2023
c2ad65c
Trigger CI
fluiddot Feb 9, 2023
c957912
Move blocks to 'devOnly' section
Feb 10, 2023
0f38528
Update iOS bundle with latest changes
Feb 10, 2023
2209d48
Fix logic so that VideoPress block is dev-only
Feb 10, 2023
518cb39
Restore code for testing block's availability
Feb 13, 2023
81826df
Apply changes to iOS bundle
Feb 13, 2023
0b04147
Remove redundant _DEV_ flag
Feb 13, 2023
62902ca
Update Jetpack submodule reference
Feb 13, 2023
2df3df6
Apply changes to iOS bundle
Feb 13, 2023
370a468
Update Jetpack reference
Feb 14, 2023
95ef3ed
Apply changes to iOS bundle
Feb 14, 2023
cd4d471
Update Jetpack submodule reference
Feb 15, 2023
1e104ad
Update Gutenberg submodule reference
Feb 15, 2023
427b7d6
Apply changes to iOS bundle
Feb 15, 2023
bf7e3e9
Apply changes to iOS bundle
Feb 15, 2023
bdbb5e7
Apply changes to iOS bundle
Feb 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,373 changes: 2,691 additions & 2,682 deletions bundle/ios/App.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/ios/App.js.map

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 39 files
+1 −1 .github/workflows/performance.yml
+1 −1 docs/reference-guides/core-blocks.md
+53 −35 package-lock.json
+0 −9 packages/block-editor/src/components/block-actions/index.js
+10 −12 packages/block-editor/src/components/image-size-control/index.js
+3 −21 packages/block-editor/src/components/image-size-control/style.scss
+1 −1 packages/block-editor/src/components/off-canvas-editor/block-contents.js
+7 −1 packages/block-library/src/button/block.json
+36 −0 packages/block-library/src/button/editor.scss
+37 −1 packages/block-library/src/button/style.scss
+5 −0 packages/block-library/src/classic.scss
+10 −1 packages/block-library/src/file/block.json
+1 −0 packages/block-library/src/file/style.scss
+2 −0 packages/block-library/src/image/style.scss
+2 −0 packages/components/CHANGELOG.md
+12 −5 packages/components/src/color-palette/index.tsx
+17 −1 packages/components/src/color-palette/test/utils.ts
+12 −7 packages/components/src/color-palette/utils.ts
+31 −0 packages/components/src/tools-panel/test/index.js
+4 −5 packages/components/src/tools-panel/tools-panel/hook.ts
+9 −1 packages/data/README.md
+1 −1 packages/data/package.json
+4 −2 packages/data/src/plugins/persistence/index.js
+18 −2 packages/data/src/redux-store/index.js
+4 −0 packages/dependency-extraction-webpack-plugin/CHANGELOG.md
+1 −1 packages/dependency-extraction-webpack-plugin/package.json
+14 −7 packages/edit-site/src/components/global-styles/screen-css.js
+2 −1 packages/edit-site/src/components/global-styles/style.scss
+2 −1 packages/edit-site/src/components/sidebar-navigation-screen/style.scss
+18 −12 packages/editor/src/components/page-attributes/order.js
+0 −12 packages/editor/src/components/page-attributes/style.scss
+0 −1 packages/editor/src/style.scss
+23 −14 packages/format-library/src/image/index.js
+6 −25 packages/format-library/src/image/style.scss
+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/babel.config.js
+1 −0 packages/react-native-editor/ios/GutenbergDemo/GutenbergViewController.swift
2 changes: 1 addition & 1 deletion jetpack
Submodule jetpack updated 2256 files
3 changes: 2 additions & 1 deletion src/block-support/supported-blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"jetpack/email",
"jetpack/phone",
"jetpack/address",
"jetpack/tiled-gallery"
"jetpack/tiled-gallery",
"videopress/video"
fluiddot marked this conversation as resolved.
Show resolved Hide resolved
],
"devOnly": [ "core/code" ],
"iOSOnly": [],
Expand Down
13 changes: 12 additions & 1 deletion src/jetpack-editor-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const supportedJetpackBlocks = {
'tiled-gallery': {
available: __DEV__,
},
'videopress/video': {
available: __DEV__,
},
};

const setJetpackData = ( {
Expand Down Expand Up @@ -85,8 +88,10 @@ export function registerJetpackBlocks( { capabilities } ) {
capabilities.tiledGalleryBlock,
'jetpack/tiled-gallery'
);
hideBlockByCapability( capabilities.videoPressBlock, 'videopress/video' );

// Register Jetpack blocks
require( '../jetpack/projects/packages/videopress/src/client/block-editor/editor' );
require( '../jetpack/projects/plugins/jetpack/extensions/editor' );
}

Expand Down Expand Up @@ -157,7 +162,13 @@ const setupStringsOverrides = () => {
( name ) => `jetpack/${ name }`
);

if ( onlyCoreBlocks && jetpackBlockNames.includes( blockName ) ) {
const videoPressBlock = blockName === 'videopress/video';

if (
onlyCoreBlocks &&
jetpackBlockNames.includes( blockName ) &&
videoPressBlock
) {
return null;
}
return defaultValue;
Expand Down
3 changes: 3 additions & 0 deletions src/test/jetpack-editor-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const jetpackBlocks = [
'jetpack/contact-info',
'jetpack/story',
'jetpack/tiled-gallery',
'videopress/video',
];
const jetpackEmbedVariations = [
'facebook',
Expand Down Expand Up @@ -74,6 +75,7 @@ describe( 'Jetpack blocks', () => {
'contact-info': { available: true },
story: { available: true },
'tiled-gallery': { available: true },
'videopress/video': { available: true },
},
jetpack: { is_active: true },
siteFragment: null,
Expand Down Expand Up @@ -114,6 +116,7 @@ describe( 'Jetpack blocks', () => {
mediaFilesCollectionBlock: true,
contactInfoBlock: false,
tiledGalleryBlock: true,
videoPressBlock: true,
},
} );

Expand Down