Repository navigation
Fix VR Gutenberg block - #9935
Conversation
tyxla
left a comment
There was a problem hiding this comment.
This tests well! 👍 I haven't seen any errors, and couldn't break it in my various way of testing.
I've left several small notes, nothing critical - the main thing i see is that we need to make sure fields are aligned and sized properly in any width.
| } | ||
|
|
||
| .wp-block-jetpack-vr .components-placeholder__fieldset { | ||
| justify-content: space-around; |
| className={ props.className } | ||
| > | ||
| <UrlInput | ||
| <TextControl |
There was a problem hiding this comment.
Any good reason to use TextControl here? Is it because of the style prop?
There was a problem hiding this comment.
What would be the alternative? As @simison noted in the PR desc, UrlInput is deprecated...
There was a problem hiding this comment.
We could use <input> like core-embed block does:
There was a problem hiding this comment.
Yeah, that might make sense.
| <UrlInput | ||
| <TextControl | ||
| type="url" | ||
| style={ { flex: '1 1 auto' } } |
There was a problem hiding this comment.
I'm not sure this flex: '1 1 auto' is really necessary here - could you expand on why we need it? On a quick test, when I remove it I don't see a difference.
Found out that `.min.js` does get generated, I was just building things the wrong way. :-)
This is automated check which relies on Generated by 🚫 dangerJS |
ockham
left a comment
There was a problem hiding this comment.
I can confirm that this fixes the block -- it works again, according to testing instructions.
The block is obviously still in a rather raw state, but my vote is to merge this PR since I'd like to proceed to move it out of JP (#10331) and into Calypso (Automattic/wp-calypso#27873).
|
@jeherve so our plan here would be to:
|
jeherve
left a comment
There was a problem hiding this comment.
This seems to work well on my end. No more errors, the photos render well in the editor and on the frontend now.
I have not tested adding a block with an old version of Gutenberg and then updating Gutenberg and Jetpack though.

Current VR block is incompatible with latest Gutenberg 3.2.0:
The block was originally implemented in #9560
Changes proposed in this Pull Request:
UrlInputwithTextControlTesting instructions:
yarn build(or use un-minified version by settingdefine ( 'SCRIPT_DEBUG', true );)https://en-blog.files.wordpress.com/2016/12/regents_park.jpg