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

Show "add block here" placeholder when adding block from title #1219

Merged

Conversation

mchowning
Copy link
Contributor

@mchowning mchowning commented Jul 11, 2019

Summary

Fixes #632 : "Add Block Here" (ABH) indicator isn't shown when title field is focused.

Related gutenberg PR

Before After
image image

Remaining Issue

The ABH indicator is still not shown when a new post is created and a new block is added before the user has interacted with the post content (i.e. if the user either tries to add a block first thing or only interacts with the post title, then adding a new block will not display the ABH indicator). This is because the ABH indicator is attached to our block holders, but until the user taps on the "Start writing..." placeholder text in a new post, the post does not actually contain any blocks (it just has a RichText field that is replaced with a block onTouch). This actually may not be a bad thing since in that scenario we replace the entire "Start writing..." text with whatever block is added, but it is inconsistent with how we handle other similar scenarios. I will reach have reached out for some feedback in the issue and will make any needed updates to address this edge case in a separate PR.

To Test

Main Functionality

  1. Open demo app (or if using the full app, open a post that is not empty in order to avoid ⬆️Remaining Issue⬆️)
  2. Tap on the post's title
  3. Tap the ➕ to bring up the add post bottom sheet
  4. Observe the ABH indicator is shown immediately below the title and above the first block in the post

Regression check

  1. Open demo app (or if using the full app, open a post that is not empty in order to avoid ⬆️Remaining Issue⬆️)
  2. Add an empty paragraph block
  3. Insure that new empty paragraph block is selected
  4. Tap the ➕ to bring up the add post bottom sheet
  5. Observe that the ABH indicator appears above the selected empty paragraph block
  6. Dismiss the add post bottom sheet
  7. Add some content to the paragraph block so that it is not empty
  8. Tap the ➕ to bring up the add post bottom sheet
  9. Observe that the ABH indicator appears below the selected non-empty paragraph block

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

Copy link
Contributor

@marecar3 marecar3 left a comment

Choose a reason for hiding this comment

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

Nice work @mchowning ! 🎉
I think that we are good to go with this 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.

"Add New Block" indicator isn't shown when title field is focused
2 participants