Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Remove unneccessory calls to state change
  • Loading branch information
akasunil committed Apr 15, 2024
commit 9f9768a1c7a9a3147d452e0219195413267ae584
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/editor.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.wp-block-cover {

/* Extra specificity needed because the reset.css applied in the editor context is overriding this rule. */
.editor-styles-wrapper & {
box-sizing: border-box;
Expand Down Expand Up @@ -74,6 +73,7 @@
bottom: 0;
left: 0;
}

}

[data-align="left"] > .wp-block-cover,
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ export default function PostFeaturedImageEdit( {

// Reset temporary url when media is available.
useEffect( () => {
if ( media && temporaryURL ) {
if ( mediaUrl && temporaryURL ) {
setTemporaryURL();
}
}, [ media, temporaryURL ] );
}, [ mediaUrl, temporaryURL ] );

const { createErrorNotice } = useDispatch( noticesStore );
const onUploadError = ( message ) => {
Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/post-featured-image/editor.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Provide special styling for the placeholder.
// @todo this particular minimal style of placeholder could be componentized further.
.wp-block-post-featured-image {


.block-editor-media-placeholder {
z-index: 1; // Need to put it above the overlay so the upload button works.
backdrop-filter: none; // Removes background blur so the overlay's actual color is visible.
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,17 +482,15 @@ export default function LogoEdit( {

if ( ! media.id && media.url ) {
// This is a temporary blob image.
setTemporaryURL( media?.url );
setTemporaryURL( media.url );
setLogo( undefined );
return;
}

setTemporaryURL( media?.url );
setLogo( media.id, shouldForceSync );
};

const onRemoveLogo = () => {
setTemporaryURL();
setLogo( null );
setAttributes( { width: undefined } );
};
Expand All @@ -509,7 +507,7 @@ export default function LogoEdit( {
filesList,
onFileChange( [ image ] ) {
if ( isBlobURL( image?.url ) ) {
setTemporaryURL( image?.url );
setTemporaryURL( image.url );
return;
}
onInitialSelectLogo( image );
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/site-logo/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
}

.wp-block-site-logo {

// Make the block selectable.
a {
pointer-events: none;
Expand Down