Fix inserter / block directory issues#17517
Merged
Conversation
noisysocks
approved these changes
Sep 26, 2019
Member
noisysocks
left a comment
There was a problem hiding this comment.
Fixes the issues as described—thanks for following up on this! 👍
De Morgan'd, whatever that is Co-Authored-By: Robert Anderson <robert@noisysocks.com>
youknowriad
pushed a commit
that referenced
this pull request
Sep 30, 2019
* Fix flipped `hasItems` value * Only show help panel when blocks are available * Only render the block directory when a search term has been entered * Make boolean logic more readable De Morgan'd, whatever that is Co-Authored-By: Robert Anderson <robert@noisysocks.com>
youknowriad
pushed a commit
that referenced
this pull request
Sep 30, 2019
* Fix flipped `hasItems` value * Only show help panel when blocks are available * Only render the block directory when a search term has been entered * Make boolean logic more readable De Morgan'd, whatever that is Co-Authored-By: Robert Anderson <robert@noisysocks.com>
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.
Description
I started this PR to fix one issue, but noticed a few related to the same piece of code, so it now fixes three 😄
The fixes are as follows:
Code quality - fix incorrect value for
hasItemsvariableA late change in #17431 was to rename
isMenuEmptytohasItems, but we forgot to also flip the value of the variable to match the new meaning.fcb5f74 fixes this by flipping the logic and updating usage of the variable.
Inserter help panel was being displayed when no available blocks in the inserter menu
To reproduce this:
ef0ea34 fixes this by not rendering the help panel when no blocks are available for insert.
Block directory showing a loading spinner when no block available and no search term entered
To reproduce this:
ae562e1 fixes this by not rendering the block directory unless there is a search term. There still seems to be a separate issue that the block directory doesn't respect template locking, and I've added this to the list on #17440.
How has this been tested?
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: