-
Notifications
You must be signed in to change notification settings - Fork 0
Replace image URI attribute with state #26
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
Conversation
82889d5 to
7e35792
Compare
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.
Thanks for this @jaymcp - unfortunately this change appears to prevent the sidebar image preview from pulling through.
I can't repro the issue you're experiencing 😕 |
I'm no longer seeing this, so not sure what happened... The change to |
Thanks G, I've adjusted the styles to match the new DOM hierarchy. |
Thanks, the overflow issue is resolved. I'm sorry to be drip-feeding this information, but I noticed another couple of issues when re-testing:
// reset image resolution when image changes
useEffect(() => {
setAttributes({
sizeSlug: 'full',
});
}, [id]);It's not happening on
|
Thanks G, I've implemented those suggestions. I've also fixed up the image URI retrieval, so that the persisted image resolution doesn't impact loading of replaced media if the media doesn't have the specified resolution. |
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.
Thanks for making those changes @jaymcp - works great for me now!





Description
This PR removes the
urlattribute, which is only used in the editor.It then adds a stateful approach to loading the correct image URI in the editor.
This will allow for easier production of sample content for usage via such things as the WP Playground.
Change Log
Steps to test
npm inpm run build:prodScreenshots/Videos
~
Checklist: