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

Tapping on an empty editor area creates a new paragraph block #16439

Conversation

marecar3
Copy link
Contributor

@marecar3 marecar3 commented Jul 5, 2019

This PR introduces tappable empty editor area which creates a new paragraph block.

Related Gutenberg PR: wordpress-mobile/gutenberg-mobile#1200

Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works great as expected! 🎉
Nice call using the list footer @marecar3

Great job!

@marecar3
Copy link
Contributor Author

marecar3 commented Jul 8, 2019

Thanks @etoledom !

@marecar3 marecar3 merged commit 1ba5cb5 into master Jul 8, 2019
@marecar3 marecar3 deleted the rnmobile/tapping-on-an-empty-editor-area-creates-empty-paragraph-block branch July 8, 2019 17:51
@mchowning
Copy link
Contributor

mchowning commented Jul 8, 2019

Nice job @marecar3 ! This works very well!

I do see two small issues in testing this.

1: Tapping footer adds block below selected block

If a block is selected, then tapping the footer inserts the new paragraph block underneath that selected block instead of at the end of the post. I observed this behavior on both Android and iOS. My assumption was that we wanted the footer to always insert the new block at the end of the post, but I admittedly didn't see that specifically called out in the discussion of the issue.

Steps to reproduce:

  1. Open demo app.
  2. Select any block other than the last block in the post (The "What is Gutenberg?" heading block is a good candidate).
  3. Scroll to the bottom of the post and tap on the invisible footer.
  4. Note that an empty paragraph block was inserted underneath the previously selected block, and that no block was added to the end of the post.

insert_below_selected mp4

2: Keyboard disappearance and reappearance is more noticeable now

This issue is pretty minor, but on Android when we add an empty paragraph after an already empty paragraph the keyboard is dismissed and immediately reappears. This hasn't been noticeable until now because the add bottom sheet hides it (mostly). It is just more noticeable now when you add an empty paragraph block by tapping the footer after an empty paragraph block because there is no bottom sheet to hide it. Admittedly, this is a very edge case with minimal user impact (and the result of behavior that existed before this PR), but I wanted to point it out.

I do not observe this issue on iOS.

Steps to reproduce:

  1. Open demo app
  2. Add empty paragraph block to end of post
  3. Tap on invisible footer at end of post (after newly added empty paragraph block)
  4. Observe that (a) keyboard dismisses and reappears and (b) screen jumps

add_two_at_end mp4

@etoledom
Copy link
Contributor

etoledom commented Jul 9, 2019

Good catch @mchowning !
I completely missed that one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants