Gutenberg-mobile: Post save is triggered without the user changing the post

Created on 13 Oct 2020  ·  2Comments  ·  Source: wordpress-mobile/gutenberg-mobile

Describe the bug
When working on WPAndroid's post saving mechanism, I noticed that multiple saves were being triggered from gutenberg when scrolling through a post. This seemed to occur reliably with long posts (for example, the gutenberg app demo content), but would occasionally occur with shorter posts as well.

To Reproduce
Steps to reproduce the behavior:

  1. Add logging to the WPAndroid app to record when Gutenberg is triggering a post save
  2. Open a large post (i.e., roughly the size of the demo app is good)
  3. _Without making any changes to the post_, scroll to the bottom of the post and back to the top
  4. Observe that there are _multiple_ change events (which trigger saves).

Expected behavior
When a user does not change the post, the app should not save the post.

Smartphone (please complete the following information):

  • Device: Pixel
  • OS: Android X
  • Version WPAndroid 076c52d869 (HEAD of develop on October 13, 2020)

Additional context
Interestingly, another recent issue notes the opposite problem: that changes are not resulting in change events being sent, which causes the fallback save-on-exit to trigger.

This could be one of the causes of Android's performance issues with longer posts.

Performance Writing Flow [OS] Android [Type] Bug

All 2 comments

👋 @designsimply , issues like this one where posts get trivially marked as modified can lead to confusing UX and lowering user's trust so, what do you think about prioritizing this rather high in the "Groundskeeping" list, considering that Matt Chowning will be on the role this week and has the best context to tackle it anyway?

We have some high priority crashes to look at first, but I've added this one to the list. If we don't get to it in this round, I'll added to the next rotation as well. 👍 Thanks for asking about it!

Was this page helpful?
0 / 5 - 0 ratings