tldraw/apps/docs/utils
Mime Čuvalo 157d24db73
docs: rework search UI (#2723)
Reworks search to not be a page and instead to be inline dropdown.

<img width="763" alt="Screenshot 2024-02-05 at 13 22 58"
src="https://github.com/tldraw/tldraw/assets/469604/4e5a8076-62cd-44bb-b8e7-7f5ecdc4af24">


- rework search completely
- rm Search Results css
- uses Ariakit and add appropriate hooks / styling
- I couldn't use Radix unfortunately since they're still working on
adding a Combox: https://github.com/radix-ui/primitives/issues/1342
- I'm open to other suggestions but Ariakit plays nicely with Radix and
keeps things open to migrate to Radix in the future
- fixes bug with not scrolling to right place when having a direct link
- adds categories in the search results - examples / reference / learn
- and adds category icons. Let me know if there's a better policy for
adding new SVG icons cc @steveruizok

### Change Type

- [x] `minor` — New feature

### Test Plan

1. Test searches using normal method for each type (examples, docs,
refs)
2. Test searches using AI for each type (ditto)

### Release Notes

- Docs: rework the search to be an inline dropdown.
2024-02-05 14:32:50 +00:00
..
vector-db Add docs (#2470) 2024-01-15 12:33:15 +00:00
addAuthors.ts Add docs (#2470) 2024-01-15 12:33:15 +00:00
addContent.ts docs: rework docs site to have different sections (#2686) 2024-01-30 14:19:25 +00:00
assert.ts Add docs (#2470) 2024-01-15 12:33:15 +00:00
autoLinkDocs.ts docs: fix up gen links to point to the new /reference section (#2690) 2024-01-30 15:16:32 +00:00
ContentDatabase.ts docs: more cleanup following restructure (#2702) 2024-02-01 14:16:17 +00:00
ContentVectorDatabase.ts docs: rework docs site to have different sections (#2686) 2024-01-30 14:19:25 +00:00
debounce.ts Add docs (#2470) 2024-01-15 12:33:15 +00:00
nicelog.ts Add docs (#2470) 2024-01-15 12:33:15 +00:00
search-api.ts docs: rework search UI (#2723) 2024-02-05 14:32:50 +00:00