157d24db73
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.
76 lines
1.8 KiB
JavaScript
76 lines
1.8 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
experimental: {
|
|
scrollRestoration: true,
|
|
},
|
|
transpilePackages: [],
|
|
async redirects() {
|
|
return [
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/:sectionId/ucg/:articleId',
|
|
destination: '/:sectionId/:articleId',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/docs/introduction',
|
|
destination: '/quick-start',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/introduction',
|
|
destination: '/quick-start',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/docs/installation',
|
|
destination: '/installation',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/docs/usage',
|
|
destination: '/installation',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/usage',
|
|
destination: '/installation',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// To reflect that these are at the top level of the sidebar
|
|
source: '/getting-started/:childId',
|
|
destination: '/:childId',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
// (This is a page that we referred people to quite often)
|
|
source: '/gen/editor/Editor-class',
|
|
destination: '/reference/editor/Editor',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
// (This is a page that we referred people to quite often)
|
|
source: '/gen/editor/ShapeUtil-class',
|
|
destination: '/reference/editor/ShapeUtil',
|
|
permanent: true,
|
|
},
|
|
{
|
|
// For reverse compatibility with old links
|
|
source: '/gen/:slug*',
|
|
destination: '/reference/:slug*',
|
|
permanent: true,
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|