-
Notifications
You must be signed in to change notification settings - Fork 4.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
[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! |
packages/block-editor/src/components/page-template-picker/default-templates.js
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks for trying on web.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good from my side =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me too
Looking good, @geriux! |
I can't approve since I'm the original author but from me. I tested |
Thanks!! |
Waiting for #19106, rebase to
master
before 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: