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: Cover block is empty after media is cleared #38674

Closed
mchowning opened this issue Feb 9, 2022 · 2 comments
Closed

Mobile: Cover block is empty after media is cleared #38674

mchowning opened this issue Feb 9, 2022 · 2 comments
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later

Comments

@mchowning
Copy link
Contributor

Description

On the mobile apps, after clearing media from a cover block, the block is empty instead of displaying the add media prompt.

Step-by-step reproduction instructions

  1. Add a cover block to a post on WPAndroid or WPiOS
  2. Observe that the block has a prompt to Add Image or Video
  3. Add media to the cover block
  4. Remove the media from the cover block (block options cog -> Clear Media)
  5. Observe that the cover block does not have the prompt to Add Image or Video

Expected behaviour

After clearing media from a cover block, the UI should return to the same state it was in originally (with the Add Image or Video prompt).

Actual behaviour

After clearing media from a cover block, it is empty.

Screenshots or screen recording (optional)

New cover block After clearing media from a cover block
Screen Shot 2022-02-09 at 11 02 34 AM Screen Shot 2022-02-09 at 11 03 35 AM

WordPress information

Tested on a WordPress.com simple site with the "Blank Canvas" theme selected.

Device information

  • Device: iPhone Xr (14.7.1), Pixel 6 Pro (Android 12)
  • WordPress app version: WPiOS test build (19.2.0.20220207), WPAndroid alpha-342
@mchowning mchowning added [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Feb 9, 2022
@geriux
Copy link
Member

geriux commented Feb 9, 2022

After clearing media from a cover block, the UI should return to the same state it was in originally (with the Add Image or Video prompt).

Cover block contains inner blocks, so it shouldn't go back to the media placeholder when clearing the media once either a media or background was selected. Usually, it's a Paragraph block, but it can contain more than that. As it's in the web editor, if you clear the media you can still see the content of the block.

I recently worked on some Cover changes that changed this to have it consistent with the web editor, but let me know if you think we should revert this.

@mchowning
Copy link
Contributor Author

mchowning commented Feb 9, 2022

Thanks for the context. I don't feel strongly at all, it just struck me as odd when I was working on it. I feel like there are better ways to handle this when the inner blocks are empty, but it's an edge case and, as you note, we're consistent with the web so I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later
Projects
None yet
Development

No branches or pull requests

2 participants