Skip to content

Commit

Permalink
Merge pull request #6568 from wordpress-mobile/remove-story-block
Browse files Browse the repository at this point in the history
Remove Story block
# Conflicts:
#	gutenberg
#	jetpack
  • Loading branch information
fluiddot committed Jan 26, 2024
1 parent 98206ef commit 9fe9630
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Unreleased
1.111.2
---
* [*] [internal] Remove `mediaFilesCollectionBlock` initial prop [https://github.com/WordPress/gutenberg/pull/58140]
* [**] Disable Story block [https://github.com/Automattic/jetpack/pull/35202]
* [**] Remove Story block [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6568]

1.111.1
---
Expand Down
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

0 comments on commit 9fe9630

Please sign in to comment.