From 86d26abf7ffad0a829c2248ca579393cd6bd302c Mon Sep 17 00:00:00 2001 From: Siobhan Date: Mon, 26 Feb 2024 17:29:44 +0000 Subject: [PATCH] refactor: Remove unused video block code --- packages/block-library/src/video/edit.native.js | 7 ++----- .../block-library/src/video/test/edit.native.js | 14 -------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/packages/block-library/src/video/edit.native.js b/packages/block-library/src/video/edit.native.js index e37db3feb63d3b..b974e61e109605 100644 --- a/packages/block-library/src/video/edit.native.js +++ b/packages/block-library/src/video/edit.native.js @@ -212,7 +212,7 @@ class VideoEdit extends Component { render() { const { setAttributes, attributes, isSelected, wasBlockJustInserted } = this.props; - const { id, src, guid } = attributes; + const { id, src } = attributes; const { videoContainerHeight } = this.state; const toolbarEditButton = ( @@ -236,10 +236,7 @@ class VideoEdit extends Component { > ); - // NOTE: `guid` is not part of the block's attribute definition. This case - // handled here is a temporary fix until a we find a better approach. - const isSourcePresent = src || ( guid && id ); - if ( ! isSourcePresent ) { + if ( ! src ) { return ( { initialHtml: `
- - `, - } ); - const addVideoButton = screen.queryByText( 'Add video' ); - expect( addVideoButton ).toBeNull(); - } ); - - it( `should not render empty state when 'guid' and 'id' attributes are present`, async () => { - await initializeEditor( { - initialHtml: ` - -
-https://videopress.com/ -
`, } );