Closed marecar3 closed 4 years ago
I hope I have tested the right hashes :) but i'm still seeing problems with the BR
tags at the end of the PRE
block.
I see that some of those BR tags are removed when opened in GB-Mobile. Below is a test Preformatted block i was using during tests:
<!-- wp:preformatted -->
<pre class="wp-block-preformatted">This is a prefortmatted block
not a new
but not that old
d
</pre>
<!-- /wp:preformatted -->
and when loading it in GB-mobile i see the following (sorry for the low-res picture):
Adding another thing i found on the problem reported above.
If i set the caret beside the d
letter on the last line of text, last line before the empty line, and tap Enter.Key I see the caret going down and then back immediately beside the d
letter.
Adding another thing i found on the problem reported above.
If i set the caret beside the
d
letter on the last line of text, last line before the empty line, and tap Enter.Key I see the caret going down and then back immediately beside thed
letter.
Hey Danilo, me and @mchowning have experienced a similar problem with quote block on the latest develop: https://github.com/wordpress-mobile/gutenberg-mobile/issues/1555 Not 100% sure if the root cause is a same?
I hope I have tested the right hashes :) but i'm still seeing problems with the
BR
tags at the end of thePRE
block. I see that some of those BR tags are removed when opened in GB-Mobile. Below is a test Preformatted block i was using during tests:<!-- wp:preformatted --> <pre class="wp-block-preformatted">This is a prefortmatted block not a new but not that old d </pre> <!-- /wp:preformatted -->
and when loading it in GB-mobile i see the following (sorry for the low-res picture):
Hey @daniloercoli, I have tested with your example:
and I didn't find that BR tags are removed when GB-mobile is loaded
Tried with WPAndroid and noticed an issue with these steps:
<!-- wp:preformatted -->
<pre class="wp-block-preformatted">just a text<br>line2<br></pre>
<!-- /wp:preformatted -->
<br>
s are not there
6b. Open the post on the web and notice a new autosave available. Check the revision viewer and notice that the <br>
s have been replaced with newlines.Is that <br>
replacement expected?
You are totally right @marecar3 - it was a problem on my side with me not updating the Aztec hash on WP-Android. I guess i messed up with things when pointing to your branches. Sorry about that.
I've also found another problem when merging an empty para block with the PRE block above. See the video here: https://cloudup.com/cWRJW-rtDLm
Steps to repro:
Edited: It seems the web is affected by the issue mentioned above. So not a problem introduced in this PR.
You are totally right @marecar3 - it was a problem on my side with me not updating the Aztec hash on WP-Android. I guess i messed up with things when pointing to your branches. Sorry about that.
I've also found another problem when merging an empty para block with the PRE block above. See the video here: https://cloudup.com/cWRJW-rtDLm
Steps to repro:
- Create a preformatted block with empty lines in it
- Create new paragraph below it
- Tap Backspace to merge those
- You will see a preformatted paragraph with all the new lines/ br tags got removed
This is a problem in Gutenberg code base it also happens on the web.
Oh yes, we have mentioned that on Slack on Friday, but forgot to update the description here.
At this point, if the parent PR passes testing phase we can merge this one.
I tried https://github.com/wordpress-mobile/AztecEditor-Android/pull/869#issuecomment-551612057 again but now I see that if I re-open the post the editor red-screens with block validation error.
👋 @hypest, if there are no new requests from your side, maybe we can merge this PR and start with a new tag release for Aztec Android?
Oh, can you also link to the related WPAndroid and gutenberg-mobile PRs in the description @marecar3 ? Thanks!
Oh, can you also link to the related WPAndroid and gutenberg-mobile PRs in the description @marecar3 ? Thanks!
Thanks for the hint. Now they are added.
Fix
This PR adds a method that can change preformatted background alpha color from the child class and also adds method which can control tidying in AztecParser (we want to avoid tidying for
pre
block.Related PR's: Gutenberg PR: https://github.com/WordPress/gutenberg/pull/18777 Gutenberg-mobile PR: https://github.com/wordpress-mobile/gutenberg-mobile/pull/1615 WPAndroid PR: https://github.com/wordpress-mobile/WordPress-Android/pull/10868
Test
Test 1:
<br>
tags on the end of the text are removed frompre
after app is started.Test 2:
pre
block with multiple<br>
tags on the end of the text and check that they aren't removed.Review
@daniloercoli
Make sure strings will be translated:
strings.xml
as a part of the integration PR.