From b3f5174358775b4812fbfb45f2149a1f983ea95f Mon Sep 17 00:00:00 2001 From: Siobhan Bamber Date: Tue, 27 Feb 2024 10:21:49 +0000 Subject: [PATCH] refactor: Remove unused video block code (#59378) Co-authored-by: SiobhyB Co-authored-by: derekblank Co-authored-by: fluiddot --- 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/ -
`, } );