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

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

@marecar3 marecar3 requested review from mchowning and etoledom Jul 5, 2019

@marecar3 marecar3 self-assigned this Jul 5, 2019

@etoledom
Copy link
Contributor

left a comment

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

Great job!

@marecar3

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

Thanks @etoledom !

@marecar3 marecar3 merged commit 1ba5cb5 into master Jul 8, 2019

1 of 2 checks passed

Filter merged Filter merged
Details
Travis CI - Pull Request Build Passed
Details

@marecar3 marecar3 deleted the rnmobile/tapping-on-an-empty-editor-area-creates-empty-paragraph-block branch Jul 8, 2019

@mchowning

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

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
Projects
None yet
4 participants
You can’t perform that action at this time.