Optimize the insertion point component#12384
Merged
youknowriad merged 1 commit intoperf/avoid-previous-block-selectorfrom Nov 30, 2018
Merged
Optimize the insertion point component#12384youknowriad merged 1 commit intoperf/avoid-previous-block-selectorfrom
youknowriad merged 1 commit intoperf/avoid-previous-block-selectorfrom
Conversation
youknowriad
commented
Nov 28, 2018
| isBlockInsertionPointVisible() && | ||
| insertionPoint.index === insertIndex && | ||
| insertionPoint.rootClientId === rootClientId && | ||
| ! isUnmodifiedDefaultBlock( block ) |
Contributor
Author
There was a problem hiding this comment.
This basically says, we don't show the insertion point indicator if the block is empty (empty paragraph block). I don't really understand why personally in addition to the fact that it harms the performance. @jasmussen Thoughts on that? How does the insertion indicator works on this PR for you?
aduth
approved these changes
Nov 28, 2018
youknowriad
added a commit
that referenced
this pull request
Nov 30, 2018
* Avoid rerending the current block if the previous block change * Always show the sibling inserter * Optimize the insertion point component (#12384)
youknowriad
added a commit
that referenced
this pull request
Nov 30, 2018
* Avoid getBlock in block-list/block * Update data docs * Fix unit tests post rebase :) * Rename props * Clarify the filter position * Avoid repeating the selector dependants * Fix small typo in the docs * Avoid rerending the current block if the previous block change (#12379) * Avoid rerending the current block if the previous block change * Always show the sibling inserter * Optimize the insertion point component (#12384) * Fix lock file * Fix linting
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.
This PR avoids calling the
getBlockselector in theInsertionPointcomponent. I'm not really certain why this call was necessary. It doesn't seem to harm the experience in my testing.This is a 6% performance improvement when typing.