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

fix update apiVersion of block to version 3 #211

Merged
merged 6 commits into from
Aug 21, 2024
Merged

Conversation

fabiankaegy
Copy link
Member

Description of the Change

Since WordPress 6.3 any blocks that support being rendered in an iframe should use apiVersion: 3 or higher. The Apple maps block has long supported being rendered in an iframe because of the Site Editor support. So we should have opted in right away.

Closes #

How to test the Change

Everything should work as expected.

Changelog Entry

Changed - Update apiVersion of Apple Maps Block to Version 3

Credits

Props @fabiankaegy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@fabiankaegy fabiankaegy added the type:enhancement New feature or request. label May 15, 2024
@fabiankaegy fabiankaegy self-assigned this May 15, 2024
@github-actions github-actions bot added this to the 1.2.0 milestone May 15, 2024
@github-actions github-actions bot added the needs:code-review This requires code review. label May 15, 2024
Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

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

In testing this out, I can't get the block to load properly using apiVersion 3. The block exists and I can add it to the content but it just shows a loading icon and the block settings aren't shown in the sidebar panel. If I downgrade to v2, things work as expected

@fabiankaegy
Copy link
Member Author

@dkotter sorry that I didn't notice. From all my experience with version 3 I had never encountered a failure and since I implemented the initial iframe support I assumed it would just work. My bad. Will dive into this. Relly odd that it fails 🤔

@fabiankaegy fabiankaegy marked this pull request as draft May 16, 2024 14:27
@github-actions github-actions bot removed the needs:code-review This requires code review. label May 16, 2024
@dmtrmrv dmtrmrv self-assigned this May 28, 2024
Copy link
Member Author

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

@jeffpaul @wadebekker and I worked on this together for a bit today and figured out that in fact this issue had been present for at least the last 4 major WP releases... 😞

But this code does now fix the issue and also resolves the API Version 3 problem.

Before the api version change the issue was only noticeable inside the site editor which was always loaded in an iframe...

@dkotter dkotter marked this pull request as ready for review August 21, 2024 20:04
@github-actions github-actions bot added the needs:code-review This requires code review. label Aug 21, 2024
Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

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

Thanks for all the work here! Tested things out and works great. Had to fix the E2E tests since the editor now loads in an iframe and Cypress doesn't like that without a few changes but all looks good now

@dkotter dkotter merged commit 3adbf91 into develop Aug 21, 2024
14 checks passed
@dkotter dkotter deleted the fix/update-api-version branch August 21, 2024 20:46
@dkotter dkotter modified the milestones: 1.2.0, 1.1.4 Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review. type:enhancement New feature or request.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants