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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spacer deselection after dragging #15884

Merged
merged 6 commits into from Jun 4, 2019

Conversation

@talldan
Copy link
Contributor

commented May 29, 2019

Description

Fixes a small issue with the spacer in master that seems to be a regression.

Fix required deleting some code, so seems like a win!

How has this been tested?

Adds an e2e test so this never happens again 馃槇.

Manual steps to repro:

  1. Add a spacer block.
  2. Click and drag the drag handle to resize the spacer block

Expected behaviour (what happens on this branch)
When releasing after resizing using the drag handle, the spacer block should remain selected.

Actual behaviour (what happens in master)
When releasing after resizing using the drag handle, the spacer block becomes deselected. The grey area denoting the size of the spacer becomes invisible, which can be confusing if the spacer is the last block.

Screenshots

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@talldan talldan force-pushed the fix/spacer-deselection branch from c635089 to a950acd May 29, 2019

@noisysocks
Copy link
Member

left a comment

Tests well! Thanks for adding tests 鉁岋笍馃榾

Show resolved Hide resolved packages/e2e-test-utils/README.md Outdated
Show resolved Hide resolved packages/e2e-test-utils/src/drag-and-resize.js Outdated
Update docs
Co-Authored-By: Robert Anderson <robert@noisysocks.com>

@talldan talldan merged commit f8e2bcc into master Jun 4, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@talldan talldan deleted the fix/spacer-deselection branch Jun 4, 2019

@talldan talldan added this to the 5.9 (Gutenberg) milestone Jun 5, 2019

nicolad added a commit to nicolad/gutenberg that referenced this pull request Jun 15, 2019

Fix spacer deselection after dragging (WordPress#15884)
* Fix spacer deselection after dragging

* Add e2e tests

* Move drag utility to e2e-test-utils package

* Update docs

* Fix typo

* Update docs

Co-Authored-By: Robert Anderson <robert@noisysocks.com>

jg314 added a commit to jg314/gutenberg that referenced this pull request Jul 19, 2019

Fix spacer deselection after dragging (WordPress#15884)
* Fix spacer deselection after dragging

* Add e2e tests

* Move drag utility to e2e-test-utils package

* Update docs

* Fix typo

* Update docs

Co-Authored-By: Robert Anderson <robert@noisysocks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.