-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
call isMultiSelecting and isNavigationMode selectors where needed #22135
Merged
Conversation
This file contains 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
youknowriad
added
[Type] Performance
Related to performance efforts
[Type] Code Quality
Issues or PRs that relate to code quality
labels
May 6, 2020
Size Change: -2 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
ellatrix
approved these changes
Jun 17, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
youknowriad
force-pushed
the
update/focus-tabbable
branch
from
June 19, 2020 11:41
7bb5a6f
to
f16d2fd
Compare
youknowriad
force-pushed
the
update/focus-tabbable
branch
from
June 19, 2020 12:05
f16d2fd
to
7c217ba
Compare
This was referenced Jun 24, 2020
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Type] Code Quality
Issues or PRs that relate to code quality
[Type] Performance
Related to performance efforts
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.
While working on the BlockWrapper component I noticed that it uses isMultiSelecting and isNavigtionMode flags just to know whether to call "focusTabbable" or not and that it's only important for the "selected block". I also noticed that these two flags are computed very high on the tree and only used here.
Hoping I can improve performance by only computing the value for the selected block and where needed, I did this small refactoring. In the end, it didn't have the performance impact (at least in the numbers returned by the test) that I hoped so I'm not really sure how worth is this PR but it seems a bit cleaner regardless, no?