-
Notifications
You must be signed in to change notification settings - Fork 58
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
Issue/1966 Disable whitespace collapse in Aztec #2127
Conversation
You can trigger optional full suite of UI tests for these changes by visiting CircleCI here. |
1 similar comment
You can trigger optional full suite of UI tests for these changes by visiting CircleCI here. |
Tests using Gutenberg example project on iPhone 7: Copy Paste - Test Cases
Multiline components - Test Cases
Rich Text Formatting - Test Cases
Splitting and merging - Test Cases
@SergioEstevao, I noticed a tiny, but expected, difference in behavior here when splitting blocks: Previously, splitting blocks would strip any leading/trailing whitespace from the content that will populate the new block, but now, whitespace is preserved. |
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.
Working great as expected! 🎉
@SergioEstevao, I noticed a tiny, but expected, difference in behavior here when splitting blocks: Previously, splitting blocks would strip any leading/trailing whitespace from the content that will populate the new block, but now, whitespace is preserved.
This is also the behaviour on Web, so I guess it's the expected one.
It would be great to add this corner case to the manual tests!
(Tested only on iOS)
# Conflicts: # gutenberg
I am changing the milestone of this PR as 1.27 because the 1.26 release branch will be cut quite soon. Let me know if you instead wanted to include this to 1.26. |
@etoledom I'm not sure if this would be appropriate as a general observation in the splitting/merging test cases – let me know what you think. Otherwise, we could just leave it out since this new behavior feels quite normal. |
Oh! I meant to add the main issue that this PR solves: "Adding format with many empty spaces at the beginning":
|
@etoledom Gotcha! Sorry for the misunderstanding. @SergioEstevao, do you think I should run through more manual test cases on this? Otherwise I'd be happy to mark approved 💯. |
Hey @guarani @SergioEstevao |
Thanks very much @marecar3! I'll give it a test. |
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 is looking great on both iOS and Android, thanks very much @marecar3 and @SergioEstevao!
I repeated the testing steps on both platforms, and smoke tested many of our blocks to try to catch any regressions and I found none.
I didn't run through all our test cases as this will be done when the release is cut.
@marecar3 thanks for your work on this! If CI goes green I'm going to merge it! |
# Conflicts: # react-native-aztec/android/build.gradle
Fixes #1966
Related PRs:
This PR fixes a bug where white space inserted at the start of text blocks ( Paragraph, Heading, Lists) were removed when applying a formatting option ( Bold, Italic, Strike).
The underlying issue was a sync issue between the content representation in the JS side and the Aztec content.
Aztec by default removes extra spaces (like most browsers do), but GB internal format doesn't do that, so when spaces were sent to Aztec they were removed and then when we apply formats Aztec will send the content back with all the extra space removed.
This PR links a new version of Aztec that allows disabling the removal/collapse of extra spaces.
To test:
PR submission checklist:
RELEASE-NOTES.txt
if necessary.