feat: replace grouped autocomplete with flat list and type badge

Switch wiki-link autocomplete from BlockNote's default grouped suggestion
menu to a custom flat list sorted by relevance. Each item shows the note
type (with its accent color) discretely on the right side. Reduce
MAX_RESULTS from 20 to 10 for a cleaner, more focused list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-02-24 23:42:09 +01:00
parent 9a5b37f602
commit 7736d20b9f
5 changed files with 131 additions and 5 deletions

View File

@@ -77,8 +77,8 @@ describe('constants', () => {
expect(MIN_QUERY_LENGTH).toBe(2)
})
it('MAX_RESULTS is 20', () => {
expect(MAX_RESULTS).toBe(20)
it('MAX_RESULTS is 10', () => {
expect(MAX_RESULTS).toBe(10)
})
})

View File

@@ -1,5 +1,5 @@
export const MIN_QUERY_LENGTH = 2
export const MAX_RESULTS = 20
export const MAX_RESULTS = 10
export interface WikilinkBaseItem {
title: string