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

Reusable block: Handle empty content case #32058

Open
fluiddot opened this issue May 20, 2021 · 1 comment
Open

Reusable block: Handle empty content case #32058

fluiddot opened this issue May 20, 2021 · 1 comment
Labels
[Block] Block The "Reusable Block" Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended

Comments

@fluiddot
Copy link
Contributor

fluiddot commented May 20, 2021

Description

Reusable blocks with empty content are not displayed properly.

Design proposed

@iamthomasbishop proposed a solution for this case in this comment, the idea is to use the Warning component when the block is selected but render an outlined empty box when is unselected.

Step-by-step reproduction instructions

  1. Go to manage reusable blocks page in the web version, in WP.com navigate to: https://<YOUR_SITE>.wordpress.com/wp-admin/post-new.php?post_type=wp_block
  2. Add a new reusable block
  3. Set a title and publish it
  4. Go to the mobile app
  5. Open a post/page
  6. Tap on ➕ button
  7. Go to the reusable tab
  8. Tap on the recently created reusable block
  9. Observe that the block is displaying an empty paragraph

Expected behaviour

Empty reusable blocks should show a placeholder telling the user that there's no content.

Actual behaviour

Empty reusable blocks are displaying an empty paragraph that is editable.

Screenshots or screen recording (optional)

Empty reusable block Insert empty reusable block
reusable-block-empty.mp4
reusable-block-insert-empty.mp4

WordPress information

  • WordPress version: N/A
  • Gutenberg version: N/A
  • Are all plugins except Gutenberg deactivated? N/A
  • Are you using a default theme (e.g. Twenty Twenty-One)? N/A

Device information

  • Device: iPhone 11
  • Operating system: iOS 14.2
  • WordPress app version: rnmobile/add/reusable-block-capability
@fluiddot fluiddot 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) [Block] Block The "Reusable Block" Block labels May 20, 2021
@fluiddot fluiddot self-assigned this May 20, 2021
@kathrynwp
Copy link

I'm still able to replicate this with a test site on WordPress.com.

Device: iPad Air 4th Gen
iOS 15.6
WP app v. 20.5

395D5865-16D7-4CCD-988D-F8C0890070AC_1_102_o

@fluiddot fluiddot removed their assignment Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Block The "Reusable Block" Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants