-
Notifications
You must be signed in to change notification settings - Fork 846
Update BlockStylesSelector component and implement in Eventbrite #14528
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
|
Caution: This PR has changes that must be merged to WordPress.com |
a6ee769 to
4306427
Compare
|
scruffian, Your synced wpcom patch D38351-code has been updated. |
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 7, 2020. |
|
scruffian, Your synced wpcom patch D38351-code has been updated. |
1 similar comment
|
scruffian, Your synced wpcom patch D38351-code has been updated. |
|
While I appreciate the code consolidation, I think an image is a better fit for the Eventbrite in page embed preview
The Button & Modal embed does benefit from a live preview, because it shows the button with the style and color defaults of the active theme. Two ideas to reconcile this
Then we could keep the image for the In Page preview and have a dynamic preview for the Button & Modal. What do you think? |
I'm not sure what you mean by this, sorry |
I mean the example url for the block. If the Eventbrite event at that url is in the past, deleted, or otherwise not working, the preview for the In Page embed won't show correctly. |
Ah yes, good point. I'm also not sure why we use the example attributes, rather than previewing with the actual URL the user enters. That's how the core block works, but it doesn't make a lot of sense to me. I'll think about it some more... |
4372647 to
44c2489
Compare
|
The |
|
I think we have an issue with how we slot-fill the various block controls, that is causing the toolbar controls to never show up. The way we are using the <InspectorControls>
<PanelBody>
<BlockStylesSelector />
</PanelBody>
</InspectorControls>But then, inside of <BlockControls>
<Toolbar />
</BlockControls>In my tests, the Style button never shows up in the block toolbar. // block edit.js
<BlockStylesSelector />
// BlockStylesSelector
<BlockControls>
<Toolbar />
</BlockControls>
<InspectorControls>
<PanelBody>
<div className="block-editor-block-styles jetpack-block-styles-selector">
{ /* ... */ }
</div>
</PanelBody>
</InspectorControls> |
That was it.
Yeah, it would be a nice compatibility fix, while also helping to keep things simple. 🙂 |
When an Eventbrite URL couldn't be embedded the inspectorControls would still display as the URL prop would have a value. This swaps the check to the `cannotEmbed` method.
de2a47d to
adeb0ad
Compare
|
This works fine, but there seems to be some visual inconsistencies with the latest Gutenberg (7.7, but checked out from master right now), that doesn't happen without the Gutenberg plugin.
|
|
Thanks for finding this @Copons. This will be an issue even if we don't merge this PR, so I think we should go ahead and merge and then fix in a different issue. |
Copons
left a comment
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 will be an issue even if we don't merge this PR, so I think we should go ahead and merge and then fix in a different issue.
Makes sense @scruffian, go for it!
jeherve
left a comment
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 looks good to me. I agree that the inconsistencies between Gutenberg versions aren't ideal though, but we can address this in a follow-up PR.
@Copons Thanks for finding these! Can you please open a Jetpack issue for these (if there isn't one already) and add to our global backlog? |
|
scruffian, Your synced wpcom patch D38351-code has been updated. |
|
r204888-wpcom |
* Initial changelog entry * Changelog: add #14904 * Changelog: add #14910 * Changelog: add #14913 * Changelog: add #14916 * Changelog: add #14922 * Changelog: add #14924 * Changelog: add #14925 * Changelog: add #14928 * Changelog: add #14840 * Changelog: add #14841 * Changelog: add #14842 * Changelog: add #14826 * Changelog: add #14835 * Changelog: add #14859 * Changelog: add #14884 * Changelog: add #14888 * Changelog: add #14817 * Changelog: add #14814 * Changelog: add #14819 * Changelog;: add #14797 * Changelog: add #14798 * Changelog: add #14802 * Changelog: add #13676 * Changelog: add #13744 * Changelog: add #13777 * Changelog: add #14446 * Changelog: add #14739 * Changelog: add #14770 * Changelog: add #14784 * Changelog: add #14897 * Changelog: add #14898 * Changelog: add #14968 * Changelog: add #14985 * Changelog: add #15044 * Changelog: add #15052 * Update to remove Podcast since it remains in Beta * Changelog: add #14803 * Changelog: add #15028 * Changelog: add #15065 * Changelog:add #14886 * Changelog: add #15118 * Changelog: add #14990 * Changelog: add #14528 * Changelog: add #15120 * Changelog: add #15126 * Changelog: add #15049 * Chanegelog: add #14852 * Changelog: add #15090 * Changelog: add #15138 * Changelog: add #15124 * Changelog:add #15055 * Changelog: add #15017 * Changelog: add #15109 * Changelog: add #15145 * Changelog:add #15096 * Changelog:add #15153 * Changelog: add #15133 * Changelog: add #14960 * Changelog: add #15127 * Changelog: add #15056 * Copy current changelog to changelog archive. * Clarify changelog description







This makes some changes to the BlockStylesSelector component and implements it in the Eventbrite block.
Fixes #14527
Changes proposed in this Pull Request:
useModalattribute in the block is now deprecated and replaced with astyleattribute.Is this a new feature or does it add/remove features to an existing part of Jetpack?
Testing instructions:
"style":"modal"in the block attributes.Proposed changelog entry for your changes: