Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

VideoPress: ensure "Wide width" and "Full" alignments render correctly in the editor when the VideoPress block replaces the core video block.
8 changes: 5 additions & 3 deletions projects/plugins/jetpack/extensions/blocks/videopress/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1105,18 +1105,20 @@ export const VpBlock = props => {
setAttributes( { maxWidth: newMaxWidth } );
};

const isAligned = align === 'wide' || align === 'full';

return (
<figure { ...blockProps }>
<div className="wp-block-embed__wrapper">
<ResizableBox
enable={ {
top: false,
bottom: false,
left: true,
right: true,
left: ! isAligned,
right: ! isAligned,
} }
maxWidth="100%"
size={ { width: maxWidth } }
size={ { width: isAligned ? '100%' : maxWidth } }
style={ { margin: 'auto' } }
onResizeStop={ onBlockResize }
>
Expand Down
13 changes: 13 additions & 0 deletions projects/plugins/jetpack/extensions/blocks/videopress/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
display: none;
}

// Ensure wide and full alignments render correctly in the editor
// when VideoPress wraps the video in a ResizableBox.
.wp-block-video {

&.alignwide,
&.alignfull {

.wp-block-embed__wrapper {
width: 100%;
}
}
}

.seekbar-color-settings__panel {

.components-panel__body.is-opened {
Expand Down