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

Quote block: Inconsistent handling of block splitting between web and native versions #51122

Open
fluiddot opened this issue May 31, 2023 · 1 comment
Labels
[Block] Quote Affects the Quote 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 31, 2023

Description

Currently, when pressing the enter key within a Quote block, the behavior differs between the two versions.

In the web version, pressing enter on an empty paragraph within a Quote block correctly splits the block and creates a new Paragraph block after it. This behavior ensures content separation.

However, in the native version, the splitting behavior is not applied. Instead, new paragraphs are created within the existing Quote block, and the block remains intact without being split.

In order to achieve a consistent user experience, it would be great to align the behavior of Quote blocks in the native version with that of the web version.

Step-by-step reproduction instructions

  1. Open a post/page in the app.
  2. Add a Quote block.
  3. Add some text to the first paragraph contained in the Quote block.
  4. Press the enter key.
  5. Observe a new paragraph is created within the Quote block.
  6. Press the enter key again.
  7. Observe that another paragraph is created within the Quote block.

Expected behaviour

Pressing enter on an empty paragraph should split the block.

Actual behaviour

Pressing enter on an empty paragraph doesn't split the block.

Screenshots or screen recording (optional)

android-quote-block.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: Samsung Galaxy S20 FE 5G
  • Operating system: Android 13
  • WordPress app version: 22.4 and 22.5-rc-1
@fluiddot fluiddot added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Block] Quote Affects the Quote Block [Type] Bug An existing feature does not function as intended labels May 31, 2023
@fluiddot fluiddot added this to Triage in Mobile Apps via automation May 31, 2023
@fluiddot fluiddot removed this from Triage in Mobile Apps May 31, 2023
@geriux
Copy link
Member

geriux commented May 31, 2023

It looks like there is a missing functionality we currently don’t have, as you can see it was added here a custom useEnter hook within the Paragraph block that works with the other onEnter functionality from the RichText component.

It handles behaviors like going back to a Paragraph block if you hit enter in an empty Quote block, or if you add an empty Paragraph block it will exit the Quote block:

QuoteOnEnter.mov

We should plan to add this as well so we can unify the behaviors as it is mentioned in the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Quote Affects the Quote 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

2 participants