[RNMobile] Final Page Templates with localization#19525
Conversation
|
It would be good to add more description about how to generate the json of the page in a practical way. |
87213dc to
df44ae6
Compare
df44ae6 to
da3dee5
Compare
…template-i18n # Conflicts: # packages/block-editor/src/components/page-template-picker/default-templates.js
|
Hey @iamthomasbishop ! Can you please review these emojis? I chose some random ones for |
|
@koke I can't assign you as a reviewer because it's your PR 😄but whenever you have time, could you please check the added templates? I think they have the right format. Thanks! |
Definitely! And we should probably start a spreadsheet to document which emoji/icon each layout uses 😄 Here's a start:
I'm not 100% sure if it matches what you've already got, feel free to correct me 😄 |
|
Thank you @iamthomasbishop ! Updated them:
|
| 'https://a8ctm1.files.wordpress.com/2019/08/scatter-1.jpg?w=640', | ||
| link: | ||
| 'https://a8ctm1.wordpress.com/portfolio/scatter-3/', | ||
| id: '658', |
There was a problem hiding this comment.
This could be problematic. I imagine those IDs are for the site where the templates were created, but it could break things on any other site.
Also perhaps we should avoid the links as week, it's one thing that we are hot linking images from a demo site, but having them link to that site as well would be unexpected and confusing.
There was a problem hiding this comment.
Interestingly enough, if I remove the links and ids from the template, when you try to add an image to that gallery, it replaces all the existing images. I'm not entirely sure if that's good or bad 😁
There was a problem hiding this comment.
😅You're right, I've just tested that myself. Were there any discussions about these cases? Blocks that have media content: Gallery, Media & Text etc.?
There was a problem hiding this comment.
Not that I'm aware of, I think we didn't consider it could be an issue. I'd say removing the IDs and links is likely the least harmful option. It might be a bit confusing if they disappear when the user adds a new image, but they are meant to be placeholders, so maybe not that confusing? cc @pinarol @iamthomasbishop
There was a problem hiding this comment.
Why don't we loose the IDs but keep the links? When we insert an image from a web url we don't have any ID at all, so it should be a valid case?
<!-- wp:image {"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://a8ctm1.files.wordpress.com/2019/08/scatter-1.jpg" alt=""/></figure>
<!-- /wp:image -->
There was a problem hiding this comment.
Why don't we loose the IDs but keep the links? When we insert an image from a web url we don't have any ID at all, so it should be a valid case?
This works! Forgot about linking images directly by URL, so there won't be any issues if we remove the IDs
Interestingly enough, if I remove the links and ids from the template, when you try to add an image to that gallery, it replaces all the existing images.
This looks like a bug? It should be happening independent from the SPTs
Hmm I don't know if its a bug or just an edge case. I tried to do that on the Web editor and the gallery removes the images when you add a new one as well. (Using this template without IDs)
There was a problem hiding this comment.
Ok thanks for trying on web.
There was a problem hiding this comment.
Looking good to me too
|
Looking good, @geriux! |
|
I can't approve since I'm the original author but |
Thanks!! |



Waiting for #19106, rebase to
masterbefore it's ready for final review.Description
This seems like the most sensible approach to template i18n for now. It would add some friction to creating and maintaining the templates, but we could create some tooling around that so we can create templates in Gutenberg, then export a JSON. It needs some comments for translators to clarify that it’s example content, but other than that this might be it
For wordpress-mobile/gutenberg-mobile#1473
How has this been tested?
Screenshots
Types of changes
Adds final set of page templates for mobile with their localization
Checklist: