-
Notifications
You must be signed in to change notification settings - Fork 798
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
Blocks: Add a new Google Calendar block #13999
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: March 3, 2020. |
I may be missing something obvious, but should the block be called differently if it aims to embeds different kinds of Google Content and not just calendars? Could it be "Google Content", "Google Embed", "Google services" instead? In any case, it may be useful to consider the AMP plugin if we develop any kind of Google-related block. Googlers have been contributing quite a bit of enhancements to Jetpack in the past few months to help make each one of our features compatible with AMP views. I think it would be nice if this new block supported that as well. Here is a recent example with the Slideshow block: #13009 |
On the topic of a single "Google Suite" block, vs individual blocks for different Google services, @davemart-in has mentioned a preference for individual blocks. I suspect that there'll be room for different options on each block depending on which service is being embedded. 👍🏻 on adding AMP support. While investigating transforms, I've run into WordPress/gutenberg#10674, which will prevent transforming from the |
Given the issues in Gutenberg I've run into here, and with Jetpack supporting the current and previous versions of WordPress, I'm wondering if it's worth exploring version gating this block. If the Gutenberg issues are fixed, we can say the block is only available if you're running Gutenberg x.y+, or WordPress 5.4+. Does Jetpack have any examples of calls to action encouraging people to upgrade their WordPress version (or install another plugin) to get full functionality? |
We have had pieces of code that were previously only available for specific WordPress versions (the Jetpack tests inside the new Tools > Site Health screen come to mind: https://github.com/Automattic/jetpack/blob/7.8/_inc/lib/debugger/0-load.php#L19 ) Similarly, some of the things we offer require a specific plugin. The whole jetpack/3rd-party/woocommerce.php Line 18 in b245765
I think we could do the same when we register that block, that should be fine. That will impact the number of sites where the feature is available, but you will be okay with Atomic sites though.
We don't really have that in Jetpack today. You could, however, create a JITM that would be displayed to a specific subset of users to invite them to install Gutenberg for example. |
With a conditional, please do add an inline |
As this is going to require a bit more foundational work, I'm moving it out of the 8.0 milestone for now. |
I've just been reviewing where things are at in the blockers for this PR. Completed
In Progress
Stalled/Not Started
|
af8f379
to
53e9df9
Compare
pento, Your synced wpcom patch D38733-code has been updated. |
@glendaviesnz yes that is fine. I like that approach even better. Nice adjustment! Thanks. |
<> | ||
<InspectorControls> | ||
<PanelBody title={ __( 'Calendar Settings', 'jetpack' ) } initialOpen={ false }> | ||
{ this.getEditForm( `${ className }-embed-form-sidebar`, editedEmbed ) } |
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 is causing issues when you use the custom css class field in the editor:
This is a problem a few lines down as well.
Related: #14623
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.
pento, Your synced wpcom patch D38733-code has been updated. |
@jeherve - I think all the latest feedback has been covered off, so it may be good to go. |
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. 👍
pento, Your synced wpcom patch D38733-code has been updated. |
r203268-wpcom |
* 8.3 release: changelog * Changelog: add #14516 * Changelog: add #14574 * Bring in changes from 8.2.1 and 8.2.2 * Update stable version * Bring in 8.2.3 changes * Changelog: add #14714 * Changelog: add #14639 * Changelog: add #14678 * Changelog: add #14673 * Changelog: add #14687 * Changelog: add #14704 * Changelog: add #14702 * Changelog: add #14541 * Changelog: add #14657 * Changelog: add #14622 * Changelog: add #14582 * Changelog: add #14638 * Changelog: add #14633 * Changelog: add #14571 * Changelog: add #14592 * Changelog: add #14539 * Changelog: add #14514 * Changelog: add #14643 * Changelog: add #14494 * Changelog: add #13739 * Changelog: add #14707 * Changelog: add #14736 * Changelog: add #14706 * Changelog: add #14730 * Changelog: add #14685 * Changelog: add #14727 * Changelog: add #14711 * Changelog: add #14742 * Changelog: add #14746 * Changelog: add #14725 * Changelog: add #13999 * Changelog: add #14740 * Changelog: add #14759 * Changelog: add #14703 * Changelog: add #14753 * Changelog: add #14754 * Changelog: add #14645 * Cahngelog: add #14599
Caution: This PR has changes that must be merged to WordPress.com |
^ The above seems to have been created by mistake. Abandoning. |
This is the first step towards replacing the
[googleapps]
shortcode with blocks.This PR is currently a work in progress, so please don't be surprised when things don't work. 🙂
Things that aren't working yet:
[googleapps]
shortcode (Re-evaluate shortcode blocks for more specific shortcode transforms WordPress/gutenberg#8569 - no progress yet ).<iframe>
if user doesn't have UnfilteredHTML permissions (Block API: pasteHandler() removes iframes too early. WordPress/gutenberg#18389 - draft PR Defer removal of iFrames on paste until transform stage, and only rem… WordPress/gutenberg#19998,Block API: pasteHandler() incorrectly treats single-line pastes as inline content. WordPress/gutenberg#18390fixed).Changes proposed in this Pull Request:
Add a new block,
jetpack/google-calendar
.Add a block version gating arg to jetpack_register_block
Is this a new feature or does it add/remove features to an existing part of Jetpack?
This is an existing feature being ported to the block editor.
Testing instructions:
This is currently marked as a beta block, you will need to add
define( 'JETPACK_BETA_BLOCKS', true );
to yourwp-config.php
file.This block also introduces version gating, and you will need wp > 5.3 or gutenberg plugin >= 7.2 to see the block.
https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York
or
<iframe src="https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
<iframe>
in them.[googleapps domain="calendar" dir="calendar/embed" query="src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York" width="800" height="600" /]
Proposed changelog entry for your changes: