-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Convert to blocks: preserve alignment #19097
Conversation
👋, this PR introduces a regression in the native mobile app (wordpress-mobile/gutenberg-mobile#1688) most probably due to the usage of |
@hypest Why is it not available there? |
👋 @ellatrix. The jsdom library currently used in the native mobile side doesn't support/parse the style atrributes for the nodes. If I should speculate, I'd assume it's not supported because styling in RN is not applied via CSS. We had a similar case before (code here), where we have to guard for null |
@hypest I expect it to be used much more in the future. Can it be set to an empty object or something? |
Hi @ellatrix 👋
We could set this to Solving it on a case-by-case basis like this is not ideal, but at least allows us to see what impact it might have if we "fake" the property. A better long term solution would be to have an implementation of the |
Thanks for adding your thoughts @mkevins ! I agree that only fixing this for the specific breaking case is not a long term solution but it will at least help us to not turn the crashes into silent errors that will manifest elsewhere (which would be harder to debug). Let's go with the |
I just opened #19196. |
Description
Fixes #11676. When converting to blocks from legacy content, preserve alignment on paragraphs and headings.
How has this been tested?
Add a classic block, then add a paragraph and align it. Convert to blocks. Alignment should be preserved.
Screenshots
Types of changes
Checklist: