Repository navigation
Editor: Handle block merge in withDispatch callback - #12820
Merged
Merged
Conversation
jorgefilipecosta
approved these changes
Dec 12, 2018
jorgefilipecosta
left a comment
Member
There was a problem hiding this comment.
The changes seem fine to me. I did a set of manual tests to the bock merging behaviors and everything seems to work as before.
An end to end test was failing it seems intermittent and not related to the changes, I restarted the tests lets see if we are luckier this time.
| const previousBlockClientId = getPreviousBlockClientId( clientId ); | ||
| const nextBlockClientId = getNextBlockClientId( clientId ); | ||
| // Do nothing when it's the first block. | ||
| if ( |
Member
There was a problem hiding this comment.
Nice refactoring of this logic, the new version is equivalent but simpler.
youknowriad
force-pushed
the
update/block-list-merge-with-dispatch
branch
from
December 21, 2018 09:38
8cbeeef to
b4d532d
Compare
youknowriad
pushed a commit
that referenced
this pull request
Jan 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously: #11899
Related: #11851
Refs #11782
This pull request seeks to refactor the BlockListBlock component to handle merge behaviors in the assigned
withDispatchcallback. This avoids the need to pass a selector function into the component, introduced in #11899, made possible through enhancements in #11851.The changes also make small optimization refactorings to avoid generating calls to both
getPreviousBlockClientIdandgetNextBlockClientIdon a merge, when only one or the other is necessary depending on directionality of the merge.Testing instructions:
Verify there are no regressions in the behavior of block merging.