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

Mobile: Broken Undo/Redo Behaviour after Setting Featured Image via Image Block #32937

Open
SiobhyB opened this issue Jun 23, 2021 · 2 comments
Labels
[Block] Image Affects the Image Block [Feature] History History, undo, redo, revisions, autosave. Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Block library /packages/block-library [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended

Comments

@SiobhyB
Copy link
Contributor

SiobhyB commented Jun 23, 2021

Description

The undo/redo functionality doesn't work as expected after setting a featured image via the image block.

After setting a featured image via the block and then tapping undo, it appears as though the action has successfullye reverted, as the Featured banner is removed from the block. However, the image still remains as the post's featured image.

Step-by-step reproduction instructions

  • In the app, navigate to HomeBlog Posts to create a new blog post, one which doesn't already have a featured image set.
  • Add a new image block, and upload an image to it.
  • Tap the image block's cog/gear icon to access its settings and then tap the Set as Featured button at the bottom.
  • Verify that you see a confirmation message about the newly set featured image and that the block now has a Featured banner overlaying it.
  • Tap the undo button in the app's toolbar.

Expected behaviour

I would expect the image to be removed as the post's featured image after tapping the undo button.

Actual behaviour

The Featured banner is removed from the image after tapping undo, which gives the illusion that it's been removed as the post's featured image. However, navigating to the Post Settings (by tapping the three dots to the upper right of the editor) reveals that the image hasn't been removed as the featured image.

The fact that the Featured banner is removed from the block adds a further layer of confusion to the undo functionality not working.

Screenshots or screen recording (optional)

You'll see from the following screen recording that the undo button appears to revert the featured image change, due to the Featured banner changing, but the post's featured image isn't actually changed:

Screen.Recording.2021-06-23.at.19.13.14.mov

Device information

  • Device: Pixel 5
  • Operating system: Android version 11
  • WordPress app version: Android 17.6
@SiobhyB SiobhyB added [Type] Bug An existing feature does not function as intended Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Block library /packages/block-library [Block] Image Affects the Image Block [Feature] History History, undo, redo, revisions, autosave. labels Jun 23, 2021
@SiobhyB SiobhyB self-assigned this Jun 23, 2021
@mchowning mchowning added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Jun 24, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 28, 2021
@SiobhyB
Copy link
Contributor Author

SiobhyB commented Aug 9, 2021

A temporary workaround for this issue was introduced in #33057. The workaround prevents an "undo level" from being created after a featured image is set via the image block. Tapping undo or redo immediately after setting a featured image via the image block no longer has any effect.

This isn't a perfect solution for the issue outlined here. In fact, it introduces a new UX issue, since the undo/redo buttons won’t work as the user would expect i.e. an undo will revert changes they made just before setting a featured image, rather than the featured setting, and may be confusing.

#33057 outlines why this workaround was agreed upon, with future considerations for a more permanent fix. I'm keeping this issue as-is so that the original behaviour is documented. It's also remaining open to indicate the fact that a more permanent fix is still needed.

@SiobhyB SiobhyB removed their assignment Aug 9, 2021
@ndiego
Copy link
Member

ndiego commented Jul 19, 2022

Removing the "In Progress" label as there is no active PR.

@ndiego ndiego removed the [Status] In Progress Tracking issues with work in progress label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] History History, undo, redo, revisions, autosave. Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Package] Block library /packages/block-library [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants