-
Notifications
You must be signed in to change notification settings - Fork 802
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
Story Block: Fix edit button used in block's toolbar #19778
Conversation
…o use the our provided render function
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
I gave this a try and it looks to have a few issues:
I guess maybe the workaround is also setting it in 'feature image' mode in some way? |
@aforcier Updated the PR and its description, this should be fixed now |
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 tests well for me. 🚢
…ck-option-pencil-icon
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.
Tests well for me now, on both Jetpack and WPcom 👍
Great news! One last step: head over to your WordPress.com diff, D61141-code, and commit it. Thank you! |
Deployed to WPCOM with changeset ID 225846 |
This was already refactored in #19778, but didn't need to remain that complicated.
This PR fixes an issue with the story block toolbar edit button that was reported in #19628 (comment)
More precisely, the
render
props of theMediaUpload
component used in the story block's toolbar is being ignored and replaced with a button having the label "Select Media".Changes proposed in this Pull Request:
This PR attempts to fix this issue by looking at the element rendered in MediaUpload. If it's a simple button containing only text then we can replace it with our own label, otherwise we try to reuse the rendered element. In this case we check if the element's
children
props is simply astring
. There are other approaches we could take: for instance we could whitelistEditButton
intances. I'm open to other ideas.Most recent work on this component: #19644
Does this pull request change what data or activity we track or use?
no
Testing instructions:
Make sure there is no regressions: