-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix withMediaLibraryNotice
issue with latest Gutenberg releases
#7711
Conversation
Plugin builds for c247702 are ready 🛎️!
Checksums
Warning These builds are for testing purposes only and should not be used in production. |
124af16
to
fd4933a
Compare
Tested for the following Media blocks
The issue seems resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple tweak suggestions. However, I'd love to learn more about how you came up with the code here. I see some of it is forked from underlying code either in Gutenberg or core. Could you add more links to the original code being overridden? Or otherwise if you came up with the code on your own, I'd love to learn how you learned :)
* Create select toolbar. | ||
* | ||
* The only reason for this method is to override the select toolbar view class. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides a method, right? So it should link to https://github.com/WordPress/wordpress-develop/blob/71cb3f861573f065c6d7d7ef1975bf98532239b4/src/js/media/views/frame/select.js#L167-L179
assets/src/block-editor/components/with-media-library-notice.js
Outdated
Show resolved
Hide resolved
assets/src/block-editor/components/with-media-library-notice.js
Outdated
Show resolved
Hide resolved
assets/src/block-editor/components/with-media-library-notice.js
Outdated
Show resolved
Hide resolved
assets/src/block-editor/components/with-media-library-notice.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Weston Ruter <[email protected]>
Co-authored-by: Weston Ruter <[email protected]>
I have forked the whole logic from the Gutenberg MediaUpload component and overrode the The only piece modified in forked code is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Summary
Update the
withMediaLibraryNotice
component to extend logic fromMediaUpload.buildAndSetFeatureImageFrame
.Fix failing E2E tests due to - WordPress/gutenberg#56921 which updated the class names for Post Preview button in the block editor.
Fixes #7710
Checklist