Skip to content
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

Fix/1268 content is missing on long posts in html mode #1277

Closed

Conversation

marecar3
Copy link
Contributor

@marecar3 marecar3 commented Aug 8, 2019

Fixes #1268

To test:

  1. Open WPAndroid app
  2. Create new Post
  3. Toggle HTML editor mode
  4. Copy content: https://gist.github.com/hypest/25e6d96b9c45ce92770f3c4c7ccafa9d
  5. Paste into HTML editor

Result: Content should be visible

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

@marecar3 marecar3 added this to the 1.12 milestone Aug 8, 2019
@marecar3 marecar3 mentioned this pull request Aug 8, 2019
1 task
@daniloercoli
Copy link
Contributor

I wasn't able to reproduce the original issue on a Nexus 5X running Android 7.1. The long content is correctly shown on screen after having pasted it into the HTML editor.

Worth to have another set of eyes testing this PR. cc @hypest

@marecar3
Copy link
Contributor Author

Thanks for the update @daniloercoli!
Any chance that you have time to try this fix @hypest? Thanks.

@hypest
Copy link
Contributor

hypest commented Aug 16, 2019

I can see the original issue on my Galaxy S7 (Android 8.0.0) when running WPAndroid develop (wordpress-mobile/WordPress-Android@6a6c100) but not seeing the issue when using this PR. The issue is that the html view of a large-ish post is empty.

Here's the thing though:

  1. I can still see W/View: ReactEditText not displayed because it is too large to fit into a software layer (or drawing cache), needs 112216320 bytes, only 8294400 available lines even with this PR
  2. The ReactEditText component already has a workaround that sets its layer type to "software". See here. Which means, the fix in this PR might actually be fixing something else and not the issue mentioned in the original ticket ("HTML editor won't show any content as a result of: ReactEditText not displayed because it is too large to fit into a software layer (or drawing cache), needs 18616320 bytes, only 18432000 available").
  3. I'm not feeling comfortable withe broadness of the solution in this PR, were we set the layer type to "software" for the whole ReactNative view and for every device and every Android version. If I understand it correctly, this would mean disabling hardware acceleration for the React Native view, a rather drastic measure just to show the html view correctly.

I think we should dig deeper for a solution on this one, possibly finding the specific root cause of the issue, or managing to apply the "software" layer type to the html mode only, if that ReactEditText is still the root cause.

@marecar3
Copy link
Contributor Author

Hey @hypest, thanks for the details, it helps a lot at this stage.

Generally, I agree with your thoughts.
Solution for this issue demands a better understanding of the problem which is causing it, so investing more time would be a good path for us.

@daniloercoli
Copy link
Contributor

We can close this PR since it was replaced by #1401

@daniloercoli daniloercoli deleted the fix/1268_Content-is-missing-on-long-posts-in-html-mode branch October 3, 2019 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] Content is missing on long posts in html mode
3 participants