-
Notifications
You must be signed in to change notification settings - Fork 13
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
Optional modal for editor fields #93
Conversation
On clicking the <ServerSideRender>, this will show the block form in a <Modal>.
There was a conflict in edit.js.
No need to wrap that in ()
To save in the block properties.
Testing that it's not open initially but it opens on clicking.
…electors Might have to revert this, but it simplifies it.
Also, add engine-strict = true to .npmrc
Hi @RobStino, It's basically the same styling as in the block editor. |
This still isn't ideal, even if it worked. It's opaque why this needs to click escape.
This reverts commit f026292.
Thanks to this for the solution: WordPress/gutenberg#12830 (comment)
|
||
# ack | ||
.ackrc | ||
|
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.
Not related to this PR, but some of these ignores aren't needed.
"phpcs" | ||
], | ||
"lint-fix": [ | ||
"phpcbf" |
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.
Might as well run phpcbf
and phpcs
from within Composer, instead of running them like ./vendor/bin/phpcbf
Also, correct some JSDoc headings. Those were from copypasta.
> | ||
{ __( 'Upload', 'genesis-custom-blocks' ) } | ||
</FormFileUpload> | ||
<MediaUploadCheck> | ||
<MediaUpload | ||
gallery={ false } | ||
multiple={ false } |
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.
These are default props, so no need to pass them
This removed the Inspector styling, and it wasn't showing.
Remove an extra class, as the first class is for the same element.
Just slightly modified from Phil's idea. This should make it much clearer what the checkbox does.
Before, it was using block.label, which didn't exist. Also, import the Block definition to prevent this.
And add a Jest test that it converts UpperCase to lowercase.
Working well for me here! |
I wish that when I changed a field in the modal that it would reflect in the background imediately instead of showing a reloading icon spinner for a second. But that's not really a blocker. |
Yeah, that's poor UX. Maybe the post you shared about rendering the template in the editor could help. It'd probably have |
It will fail if the query fails, anyway.
@johnstonphilip, thanks a lot for your great ideas and for testing this! |
Really like this improvement, Ryan! Worked well in my testing. |
@mikemcalister, |
Changes
<ServerSideRender>
, this will show the block form in a<Modal>
.Feature Walkthrough (updated September 24)
composer i && npm i && npm run dev
/wp-admin
> Custom Blocks > Add New