-
Notifications
You must be signed in to change notification settings - Fork 312
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
Fix: autosuggest breaks search blocks #2219
Conversation
Hi @dinhtungdu When the result has more than one item, the list appears cut and I can see just the first item. ep-search.mp4 |
@Rahmon Look like you used 2020 for your test. That issue causes by 2020 styling which set It really depends on the theme styling to fix that issue. The issue doesn't occur on Storefront for example: |
@dinhtungdu got you. Looks good to me. But I would like to have second thought here so I'm adding @JakePT as a reviewer too since he can contribute with your frontend knowledge. |
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.
@dinhtungdu Just added a small suggestion.
6de5091
to
7c150e6
Compare
Description of the Change
Autosuggest changes the frontend markup of the search field to add the suggestion list, while it works for the normal search field, it's breaking the search block styling due to CSS conflict between autosuggest and search block. Because the markup of the search block is predictable, this PR adds a separated behavior for search field in the search blocks that reuses the block markup to add the suggestion list and required class.
Alternate Designs
n/a
Benefits
Make autosuggest work with search block, which is a preparation for full site editing.
Possible Drawbacks
n/a
Verification Process
Checklist:
Applicable Issues
#2211
Changelog Entry
Fixed the styling issue of Autosuggest and search block.