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

Insert blocks at top of post when post title is selected #1201

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

mchowning
Copy link
Contributor

Summary

This PR updates the behavior when inserting a block which the post's title is selected. Previously, the block would be inserted at the bottom of the post, but now it will be inserted at the top of the post. This work is being done in advance of addressing #632 (missing "Add New Block" indicator when inserting a block from the post's title) so that we're inserting the post at the proper location before we add an "Add New Block" indicator for the insertion position.

Related gutenberg PR

Before After
before mp4 after mp4

Testing

Post Title selected scenario

  1. Load demo app
  2. Tap on the post Title to select it
  3. Add any block
  4. Observe that the newly added block is inserted at the top of the post

No block selected scenario

  1. Load demo app
  2. Do NOT select any block
  3. Add any block
  4. Observe that the newly added block is inserted at the bottom of the post

Any block selected scenario

  1. Load demo app
  2. Select any block other than the post's Title
  3. Add any block
  4. Observe that the newly added block is inserted below the previously selected block

Update release notes

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

@mchowning mchowning added this to the 1.10 milestone Jul 5, 2019
@mchowning mchowning requested review from etoledom and marecar3 July 5, 2019 20:52
@mchowning mchowning self-assigned this Jul 5, 2019
@mchowning mchowning force-pushed the issue/632-insert-post-from-title-at-start branch 2 times, most recently from 3468608 to 232249a Compare July 8, 2019 10:51
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.

Thank you for taking care of this @mchowning!
Tested via WordPress/gutenberg#16440 (review)

Since this PR targets v1.10, let's wait until the code freeze is finished to merge this and WordPress/gutenberg#16440

@mchowning mchowning force-pushed the issue/632-insert-post-from-title-at-start branch from 232249a to 117eae0 Compare July 9, 2019 17:01
@mchowning mchowning modified the milestones: 1.10, 1.9 Jul 9, 2019
@mchowning
Copy link
Contributor Author

Since this PR targets v1.10, let's wait until the code freeze is finished to merge this

Hey @etoledom ! Based on the conversation we just had, I'm going to go ahead and merge this for 1.9.

@mchowning mchowning merged commit 6a097d0 into develop Jul 9, 2019
@mchowning mchowning deleted the issue/632-insert-post-from-title-at-start branch July 9, 2019 17:14
@mchowning mchowning mentioned this pull request Jul 9, 2019
1 task
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.

2 participants