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

Remove Story block #6568

Merged
merged 11 commits into from
Jan 25, 2024
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Unreleased
---
* [**] Remove Story block [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6568]

1.111.1
---
Expand Down
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 538 files
2 changes: 1 addition & 1 deletion jetpack
Submodule jetpack updated 1886 files
12 changes: 0 additions & 12 deletions src/initial-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,4 @@ export default `
<div class="wp-block-jetpack-address"><div class="jetpack-address__address jetpack-address__address1">Random Street</div></div>
<!-- /wp:jetpack/address --></div>
<!-- /wp:jetpack/contact-info -->

<!-- wp:jetpack/story {"mediaFiles":[{"alt":"","caption":"","id":320,"link":"https://cldup.com/n48GTQmw7s.jpg","mime":"image/jpeg","type":"image","url":"https://cldup.com/n48GTQmw7s.jpg"},{"alt":"","caption":"","id":321,"link":"https://cldup.com/u2kdydrlQv.jpg","mime":"image/jpeg","type":"image","url":"https://cldup.com/u2kdydrlQv.jpg"},{"alt":"","caption":"","id":319,"link":"https://cldup.com/fi7gqyUrbL.jpg","mime":"image/jpeg","type":"image","url":"https://cldup.com/fi7gqyUrbL.jpg"}]} -->
<div class="wp-block-jetpack-story wp-story"></div>
<!-- /wp:jetpack/story -->

<!-- wp:jetpack/story -->
<div class="wp-block-jetpack-story wp-story"></div>
<!-- /wp:jetpack/story -->

<!-- wp:jetpack/story {"mediaFiles":[]}} -->
<div class="wp-block-jetpack-story wp-story"></div>
<!-- /wp:jetpack/story -->
`;
7 changes: 0 additions & 7 deletions src/jetpack-editor-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ const supportedJetpackBlocks = {
paywall: {
available: true,
},
story: {
available: true,
},
'tiled-gallery': {
available: __DEV__,
},
Expand Down Expand Up @@ -79,10 +76,6 @@ export function registerJetpackBlocks( { capabilities } ) {
return;
}

hideBlockByCapability(
capabilities.mediaFilesCollectionBlock,
'jetpack/story'
);
hideBlockByCapability(
capabilities.contactInfoBlock,
'jetpack/contact-info'
Expand Down
1 change: 0 additions & 1 deletion src/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ describe( 'Gutenberg Mobile initialization', () => {
jest.unmock( '@wordpress/react-native-editor/src/setup' );

const capabilities = {
mediaFilesCollectionBlock: true,
contactInfoBlock: true,
facebookEmbed: true,
instagramEmbed: true,
Expand Down
6 changes: 0 additions & 6 deletions src/test/jetpack-editor-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import setupJetpackEditorHooks, {
const defaultJetpackData = { blogId: 1, isJetpackActive: true };
const defaultProps = {
capabilities: {
mediaFilesCollectionBlock: true,
contactInfoBlock: true,
facebookEmbed: true,
instagramEmbed: true,
Expand All @@ -39,7 +38,6 @@ const defaultProps = {
const jetpackBlocks = [
'jetpack/contact-info',
'jetpack/paywall',
'jetpack/story',
'jetpack/tiled-gallery',
'videopress/video',
];
Expand Down Expand Up @@ -77,7 +75,6 @@ describe( 'Jetpack blocks', () => {
available_blocks: {
'contact-info': { available: true },
paywall: { available: true },
story: { available: true },
'tiled-gallery': { available: true },
'videopress/video': { available: true },
},
Expand All @@ -100,7 +97,6 @@ describe( 'Jetpack blocks', () => {
expect( console ).toHaveLoggedWith(
'Block jetpack/paywall registered.'
);
expect( console ).toHaveLoggedWith( 'Block jetpack/story registered.' );
expect( console ).toHaveLoggedWith(
'Block jetpack/tiled-gallery registered.'
);
Expand Down Expand Up @@ -130,7 +126,6 @@ describe( 'Jetpack blocks', () => {
setupJetpackEditor( defaultJetpackData );
registerJetpackBlocksIsolated( {
capabilities: {
mediaFilesCollectionBlock: true,
contactInfoBlock: false,
paywallBlock: true,
tiledGalleryBlock: true,
Expand All @@ -143,7 +138,6 @@ describe( 'Jetpack blocks', () => {
expect( console ).toHaveLoggedWith(
'Block jetpack/paywall registered.'
);
expect( console ).toHaveLoggedWith( 'Block jetpack/story registered.' );
expect( console ).toHaveLoggedWith(
'Block jetpack/tiled-gallery registered.'
);
Expand Down