-
Notifications
You must be signed in to change notification settings - Fork 384
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 Integration Issues and Shortcomings #3653
Comments
Consider some of the following usability challenges and thoughts for AMP Stories built on Gutenberg as well:
|
Don't have a lot of (new) things to add to the extensive list already logged, great notes. The main problem with the issues related to Gutenberg is that we can't predict the upcoming issues meaning that relying on Gutenberg results in the AMP Stories interface being partly out of our control. We can always adjust it to the current state but it's constantly changing, causing unexpected changes. Not having control over the issues in a tool we're building ourselves isn't probably the best. Some additional (potentially repetitive) notes:
|
Wondering if moving AMP Stories to a separate plugin and outside of Gutenberg editor would be a better option? |
@jdelia Eventually it will be its own plugin, yes. Whether or not it's going to use Gutenberg is very much determined by this discussion here :-) |
I came here looking for how to extend the amp plugin for custom block types built on gutenberg. Please bear with me while I try to express what I think I need to be asking for: Gutenberg no longer uses the "gallery shortcode", and in amp this seems to correspond to class-amp-gallery-embed.php for gallery shortcode support, and class-amp-gallery-block-sanitizer.php for gutenberg galleries. However, when I run gutenberg's parse_blocks on a post which contains a gallery, a gallery block has a structure with:
Meanwhile the AMP_Gallery_Block_Sanitizer (from gallery-block-sanitizer.php) basically ignores all of this and just parses this innerHTML of this block, based on conventions implemented by the default wordpress gallery implementation. (Possibly this was relevant before gutenberg and what I am seeing here is, thus, legacy code?) (I was hoping to see that AMP_Gallery_Block_Sanitizer was instead using the values I see in the attrs element returned by gutenberg's parse_blocks() ... and it's seems likely that the current approach offers better support for non-gutenberg content, but...) Anyways... I need to deploy on a wordpress instance galleries which are not the default wordpress galleries and which can't follow the conventions which the amp plugin is looking for (for reasons not relevant to amp plugin development). And, the gutenberg block system also means that I'm not going to be using shortcodes. So, I am looking for how to extend this plugin to handle custom gutenberg blocks. (And, I'm going to have to do similar work for facebook instant articles... that's not relevant here, except in the sense that it looks like the gutenberg modularity concepts have not yet been used in the way I had hoped to see them used...) But, ... I am unsure about what questions I should be asking. ((Probably, though, I need to know how to build and deploy my own sanitizers, and the calling conventions of the sanitizers? This isn't really a bug report, nor a feature request, but it does seem related to gutenberg integration issues.... so, also... are there good docs for wordpress developers on building our own sanitizers?)) |
The current AMP Stories editor is tied closely to the existing post editor as it builds directly on top of it. Thanks to that we get many things for free, but it requires heavy customization and constantly leads to issues.
This issue tries to provide an overview of issues and shortcomings of both the current approach and the Gutenberg dependency in general.
Technical
Current and previous examples:
UI / UX
The text was updated successfully, but these errors were encountered: