-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Layouts: Layouts generate console messages for block updates #40658
Comments
When all those layouts are initially loaded for the selector (doesn't matter if you create a blank page or are switching), they need to be parsed from the HTML string with block comments into proper block objects that the block editor understands Since most of those templates were written a long time ago, the block syntax has changed slightly from the one that Gutenberg generates today (for example alignment used to be an inline style In order to get rid of these messages, we would need to regenerate the source code of all our templates (by opening it in new version of the editor and saving it). This would also need to be done to all language mutations of such templates. |
How quickly can we do that? Especially since it's something code we've written (Gutenberg) is able to do automatically. |
For templates in English fairly quickly because we keep the originals in Gutenberg. For the 16 translations we'll have to manually replace it in their json files, so quite a bit longer. |
@ianstewart has updated the homepage templates in theme demo sites and the remaining templates on a8ctm1. He'll ship the updated homepage templates (en) today. I created a script to update a8ctm1 templates in D41467-code (including the script's results) and will test & iterate on that today. We should be able to reuse that script for localized homepage templates as well. |
@obenland EN homepage layouts have all been updated. |
All non-homepage templates have been updated in r205519-wpcom. I'll adjust the script and continue working on translated homepage templates tomorrow |
Translated homepage templates are being worked on in D41555-code |
I decided to stop updating translated homepage templates after realizing that all the work we've put in so far will become pointless once Gutenberg 7.9 has shipped to dotcom. It includes gems like:
The only tenable solution to this would be to write a job that runs these templates through block transformations and updates annotations automatically. I'm not sure how high up in our priorities that should be, given Create's plans to replace the system (p58i-8On-p2). @davemart-in? |
@mtias this seems like a really expensive thing for us to have to be doing manually each time there is an update to the markup of any block, especially since this has to be done for all language mutations for each layout. This process of manually making updates doesn't feel very sustainable. What happens when we have 100+ layouts? Would it be possible to just add something like a |
@davemart-in it seems imperative that we have a system for updating templates and their translations (I don't know why we don't decouple the translated strings from the template markup) that is not expensive to do. We should avoid suppressing migration logs like this because they indicate extra operational power that we should eliminate at the source. Otherwise we are contributing to degrading performance. @obenland have you narrowed down the reason for the extra |
cc @johnHackworth who's team just took over templates again. |
That's how the Editor saved them at the time they were created. 193098-wpcom |
Yes, I mean why the difference. |
I have not. Looking at the milestone, WordPress/gutenberg#21037 feels like a candidate but I couldn't point out what would cause it. |
It would be a good one to include as heuristics for WordPress/gutenberg#21703 I gather it was just the comment attribute shape that was changing. |
This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels. |
This report was found during a recent backlog sweep. Reviewing WordPress/gutenberg#21703 (comment), it looks like this will not be fixed at the core level.
|
Steps to reproduce
cc @marekhrabe @obenland @iamtakashi @alaczek
(This might be an issue that touches on themes, page layouts, the layout selector, and theme switching?)
The text was updated successfully, but these errors were encountered: