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

Gutenberg: Remove 'type' from attributes where 'source' is set. #1622

Merged
merged 1 commit into from
Nov 19, 2018

Conversation

miina
Copy link
Contributor

@miina miina commented Nov 16, 2018

Removes 'type' from attributes where 'source' is set, apparently that was deprecated in 4.1.0, removed in 4.2.0 and is now causes issues with blocks and extended features.

Note that type isn't mandatory for other cases either (if the source is not set at all).

@miina
Copy link
Contributor Author

miina commented Nov 16, 2018

@kienstra and @westonruter:
This PR should fix most of the custom blocks and some custom AMP features not working in Gutenberg.

For some reason the branch 1.0 is showing some additional file changes as well, would it be better if I'd create the PR into develop?

There is another branch doing the same thing but based on develop if that's better:
https://github.com/Automattic/amp-wp/compare/fix/block-attributes?expand=1

@westonruter westonruter force-pushed the fix/editor_block_attributes branch from cf92d6c to 7300101 Compare November 17, 2018 00:33
@westonruter
Copy link
Member

For some reason the branch 1.0 is showing some additional file changes as well, would it be better if I'd create the PR into develop?

Fixed by cherry-picking your commit onto 1.0 and then force-pushing to this branch.

@westonruter westonruter modified the milestones: v1.1, v1.0 Nov 17, 2018
@kienstra
Copy link
Contributor

Approved

Hi @miina,
Thanks for fixing this. All of the blocks that this affects looks good, except for some issues not related to this PR (mentioned below).

amp-fit-text

amp-fit-text-test

amp-brid-player

amp-brid-player-test

amp-ima-video

amp-ima-video-test

amp-jwplayer

amp-jwplayer-test

Issues Unrelated To PR

The <amp-springboard-player> doesn't render, but it doesn't render on ampbyexample.com, either. This could be a matter of finding the right attribute values to test this.

amp-springboard-player

There's a validation error for the <amp-o2-player>, though I don't think it's related to this PR. I'll open a separate issue for this:

validation-error-amp-o2-player

@kienstra
Copy link
Contributor

amp-o2-player

This wasn't related to this PR. But the problem I mentioned above with the <amp-o2-player> doesn't seem to exist when using the attribute values from ampbyexample.com:

amp-o2-player

@westonruter westonruter merged commit 7b45933 into 1.0 Nov 19, 2018
@westonruter westonruter deleted the fix/editor_block_attributes branch November 19, 2018 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants