-
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
Move search into inserter tabs #61108
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
96cfa63
Move search into inserter tabs
jeryj f485c1b
Make inserterSearch component
jeryj 94afb1c
focus the search field using a useEffect
scruffian 93f8f86
use request animation frame
scruffian d203d3e
add comment
scruffian 8fda50f
remove unused code
scruffian dcd15b7
change selector for search
scruffian dab64f4
use useRefEffect instead of the requestAnimationFrame
scruffian d6caacb
Only inserter on mount
jeryj cf0e71c
keep the imperative ref and focus once the tabs are done
draganescu 6e9b42f
revert changes to the inserter tabs and leave the tabs contents memoized
draganescu 4b126ef
reset order
scruffian 1de6dfd
remove unneeded change
scruffian 429a0d7
reset order
scruffian eec8797
show message if no blocks and no patterns available, do not auto focu…
draganescu affc8af
fix test
scruffian 489d6a1
fix firefox bug
scruffian 5d7340c
auto focus the inserter when open so that we can tab into it
draganescu ca00872
Remove unused searchRef
jeryj 0b1e2fb
Pin hint to bottom of block tab panel so it doesn't flash
jeryj 3044f5f
Remove unnecessary tab filtering
jeryj 521b732
restore no results message
scruffian fbd8901
Focus first active tab
jeryj 020277c
hide the inserter tabs on the widget editor
scruffian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This change set does multiple things:
showAsTabs
and the code that creates it (e.g. removesshowPatterns
,mediaCategories
,showMedia
,showMediaPanel
)useImperativeHandle
on the ref passed toInserterMenu
by the parent libarary component) - see reasoning in PR descriptionThere 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.
But it introduces breaking changes in the API, like @mattsherman mentioned in this issue.
After these changes, the ref doesn't expose the focusSearch method, which caused the product editor to break.