Skip to content
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

Calendly: Fix the overlay when the block is left or right aligned #14820

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

pablinos
Copy link
Contributor

In WordPress/gutenberg#19593 a wrapper div was removed, which had a
position value of relative. Our overlay div to prevent the iframe
from being interacted with, relies on a parent element being
positino: relative. This is still the case when the block is in the
main flow/centre aligned, but when the block is left or right aligned,
it can't be selected, and clicks are handled by the iframe.

Changes proposed in this Pull Request:

This simply adds position:relative to the block container, so the overlay always covers it.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

This is a bug fix

Testing instructions:

  • Setup a test site not running the Gutenberg plugin and the TwentyTwenty theme
  • Add a Calendly block
  • Set it's alignment to left or right.
  • Check that you can still select and deselect the block.
  • Install and activate the Gutenberg plugin.
  • Check that you now can't select the block.
  • Apply this patch
  • Check that you can now select the block again by clicking on it.

Proposed changelog entry for your changes:

Bug fixed that caused the overlay not to render properly for the Calendly block in the editor.

In WordPress/gutenberg#19593 a wrapper `div` was removed, which had a
`position` value of `relative`. Our overlay `div` to prevent the iframe
from being interacted with, relies on a parent element being
`positino: relative`. This is still the case when the block is in the
main flow/centre aligned, but when the block is left or right aligned,
it can't be selected, and clicks are handled by the iframe.

I think the above PR is in Gutenberg 7.3 and higher, so this problem can
be replicated with the plugin installed, and therefore also on WPCOM.
@pablinos pablinos requested a review from a team February 26, 2020 21:35
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello pablinos! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D39475-code before merging this PR. Thank you!

@pablinos pablinos requested a review from a team February 26, 2020 21:36
@pablinos pablinos self-assigned this Feb 26, 2020
@pablinos pablinos added [Block] Calendly [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Type] Bug When a feature is broken and / or not performing as intended labels Feb 26, 2020
@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: March 3, 2020.
Scheduled code freeze: February 25, 2020

Generated by 🚫 dangerJS against b8300e2

@jeherve jeherve added this to the 8.3 milestone Feb 27, 2020
@jeherve jeherve added [Status] Needs Cherry-Pick [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Feb 27, 2020
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well for me. Should be good to merge.

@matticbot
Copy link
Contributor

pablinos, Your synced wpcom patch D39475-code has been updated.

@mdbitz
Copy link
Contributor

mdbitz commented Feb 27, 2020

Simple Note - Test Failure was due to instability at time of the test execution, rebase and re-run of tests succeeded. Moving forward with Merge

@mdbitz mdbitz merged commit 5708011 into master Feb 27, 2020
@mdbitz mdbitz deleted the fix/calendly-overlay branch February 27, 2020 16:55
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Feb 27, 2020
mdbitz pushed a commit that referenced this pull request Feb 27, 2020
#14820)

In WordPress/gutenberg#19593 a wrapper `div` was removed, which had a
`position` value of `relative`. Our overlay `div` to prevent the iframe
from being interacted with, relies on a parent element being
`positino: relative`. This is still the case when the block is in the
main flow/centre aligned, but when the block is left or right aligned,
it can't be selected, and clicks are handled by the iframe.
@mdbitz
Copy link
Contributor

mdbitz commented Feb 27, 2020

Cherry-Picked into Release branch-8.3 in d4eb752

mdbitz added a commit that referenced this pull request Feb 27, 2020
apeatling added a commit that referenced this pull request Feb 27, 2020
…t the iframe cannot be interacted with when alignment is set. See #14820
mdbitz added a commit that referenced this pull request Feb 27, 2020
* Readme for #14820

* Alphabetical entries :)
mdbitz added a commit that referenced this pull request Feb 27, 2020
* Readme for #14820

* Alphabetical entries :)
@mdbitz
Copy link
Contributor

mdbitz commented Feb 27, 2020

Change Log added to release in 044b064

@pablinos
Copy link
Contributor Author

r203588-wpcom

scruffian added a commit that referenced this pull request Mar 5, 2020
* Eventbrite Alignment: Add left, center, right alignment support to the Eventbrite block. Fixes #14505

* Eventbrite Alignment: Add position relative to block to make sure that the iframe cannot be interacted with when alignment is set. See #14820

* Eventbrite Alignment: Make sure the alignment classes are added to the server side rendered iframe embed.

* Use the block_classes helper function and escape the result

* Update the CSS to target the new class name

* Add support for wide and full alignments

Co-authored-by: Ben Dwyer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Calendly Touches WP.com Files [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants