feat(docs): Add search functionality and component thumbnails#3405
feat(docs): Add search functionality and component thumbnails#3405chrisolsen merged 1 commit intodevfrom
Conversation
ff5f107 to
8c38f67
Compare
✅ Deploy Preview for goa-design-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
8c38f67 to
cc2714e
Compare
cc2714e to
f3c2509
Compare
| badge="/" | ||
| url="/search" | ||
| /> | ||
| <button className="search-menu-button" onClick={openSearch} type="button"> |
There was a problem hiding this comment.
Because the search button is just a rendered button and not using WorkSideMenuItem. There's no aria-label being assigned to it right now. So when the menu is collapsed, there's no indication of what it is for screen readers, because on line 153, the text elements literally disappear from the DOM when the menu is collapsed.
There was a problem hiding this comment.
Added aria-label="Search" to the button so screen readers can identify it when the menu is collapsed.
There was a problem hiding this comment.
@twjeffery You did indeed add this here. But it's also missing in ComponentsSubMenu.tsx on line 219.
There was a problem hiding this comment.
But on that note, I'm not sure why we're duplicating this secondary content in every menu? It looks like it's duplicated in this file, ComponentsSubMenu.tsx, ExampleSubMenu.tsx, and TokensSubMenu.tsx? This issue is in all of these, but currently I don't think the last two are being used, so I didn't highlight them as issues.
There was a problem hiding this comment.
I extracted MenuSecondaryContent to replace the duplicated secondary content across the nav files. The aria-label="Search" fix is in that component. I also deleted ExamplesSubMenu.tsx and TokensSubMenu.tsx since they weren't being used.
f3c2509 to
bd4cd9f
Compare
bd4cd9f to
7328ce4
Compare
|
@ArakTaiRoth I pushed changes as we discussed, it's ready for another review |
7328ce4 to
de8e566
Compare
|
@twjeffery you will need to rebase to get the failing calendar test fix |
|
@chrisolsen This has been done, it's ready to be merged |
- Add ⌘K/Ctrl+K command palette search for components, examples, tokens, and pages - Add component thumbnail images to ComponentsGrid - Search features: filter commands (/c, /e, /t, /g), history, keyboard navigation
de8e566 to
94257e1
Compare
done |
|
@ArakTaiRoth it was failing the test, so it wasn't ready to be merged |
|
🎉 This PR is included in version 1.41.0-dev.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 6.11.0-dev.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 4.11.0-dev.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.11.0-dev.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 7.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0-next.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Two improvements to the docs site:
1. Component Thumbnails
2. Search Functionality (⌘K command palette)
/cfor components,/efor examplesChanges
New files:
docs/public/images/component-thumbnails/*.svg(48 thumbnails)docs/src/components/search/*(13 modules)docs/src/scripts/build-search-index.tsdocs/src/pages/search.astro(fallback page)Deleted orphaned files:
SideNav.tsx,ExamplesSideNav.tsx(replaced by SiteNav)Search.tsx(replaced by new search modal)Test plan
Created with the help of Claude.
Related issue:
#3366