-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(search): introduced search bar functionality #2502
Conversation
Note.: This search box is rendered on all pages. If you folks prefer it to only show on Learn, maybe UX-wise it would fit somewhere else? |
Codecov Report
@@ Coverage Diff @@
## main #2502 +/- ##
==========================================
- Coverage 91.54% 90.18% -1.37%
==========================================
Files 85 87 +2
Lines 923 968 +45
Branches 249 261 +12
==========================================
+ Hits 845 873 +28
- Misses 78 95 +17
Continue to review full report at Codecov.
|
Please find a preview at: https://staging.nodejs.dev/2502/ |
Hi @ovflowd Thanks for working on this. I like the global search over the /learn specific one. I noticed there are horziontal and vertical scrollbars for the search bar divs. |
Hey @benhalverson quite interesting, let me see if removing the Would you mind telling me if you're using Linux/Windows? Cause on macOS I'm not able to reproduce this, nor on Fedora. |
Also, thanks for enjoying this approach! I thought that a global approach would be easier for people to notice, and also a version that auto-expands doesn't consume that much real-estate 👀 |
I introduced some style fixes and improved how the search container resizes dynamically based on your screen size 😄 |
I was testing on Windows 10 with Chrome |
Please find a preview at: https://staging.nodejs.dev/2502/ |
Gotcha! Hopefully latest changes fix your issue 🙇 |
Please find a preview at: https://staging.nodejs.dev/2502/ |
Please find a preview at: https://staging.nodejs.dev/2502/ |
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.
👍🏻
@benhalverson I updated the SearchInput's CSS to match more the design from the Figma's. I also fixed the results not clearing when collapsing and added a limit of 20 results, so that it doesn't show an infinitude of results. |
Please find a preview at: https://staging.nodejs.dev/2502/ |
Description
This PR introduces (again) a search box for searching content from the Learn Tab. It indexes in the same way and it uses Elastic Lunr.
The original SearchBox component was copied from #1677 and modified both in functionality to work with the plugin and design to be more responsive.
Screenshots
Related Issues
Fixes #413