Implement attribute autocomplete in search input #4635

Open
opened 2025-10-01 16:39:27 -05:00 by giteasync · 3 comments
Owner

Originally created by @zadam on GitHub.

Similar to this demo: https://jqueryui.com/autocomplete/#multiple

Originally created by @zadam on GitHub. Similar to this demo: https://jqueryui.com/autocomplete/#multiple
giteasync added the
Difficulty: Easy
label 2025-10-01 16:39:27 -05:00
Author
Owner

@NidhiSharma63 commented on GitHub:

Hii @zadam can you please tell me on which input you want to add autocomplete (or steps to see the input). i didn't find out.

@NidhiSharma63 commented on GitHub: Hii @zadam can you please tell me on which input you want to add autocomplete (or steps to see the input). i didn't find out.
Author
Owner

@zadam commented on GitHub:

Hi @NidhiSharma63, it was meant to be here:

but would also make sense here:

Note that the issue is very old. We now use algolia autocomplete library, although it's an old now unsupported version 0.XX. I guess before tackling this, we should upgrade to the latest version (which I tried, but did not succeed, since it's dramatically different).

@zadam commented on GitHub: Hi @NidhiSharma63, it was meant to be here: ![](https://github.com/zadam/trilium/assets/617641/c41e874e-6e29-45f1-8292-a06295501b5c) but would also make sense here: ![](https://github.com/zadam/trilium/assets/617641/8fb5dab9-64bc-4c87-8417-0fbdb627edcb) Note that the issue is very old. We now use algolia autocomplete library, although it's an old now unsupported version 0.XX. I guess before tackling this, we should upgrade to the latest version (which I tried, but did not succeed, since it's dramatically different).
Author
Owner

@dosubot[bot] commented on GitHub:

The 'Jump to note' modal uses autocomplete.js v0.38.1 (Algolia's old vanilla JS library), managed through a jQuery-based service that handles note suggestions, commands, and UI events. The 'Quick search' input, on the other hand, is a custom Bootstrap dropdown and doesn't use Algolia code at all. There isn't any documentation or code comments about previous attempts to upgrade the autocomplete library or what specific issues were encountered—just that the upgrade path is nontrivial due to major differences between versions. If you need to implement attribute autocomplete (like multi-value or remote data), the requirements and desired behaviors would need to be clarified, since they're not specified in the code or docs yet.
Source: jump_to_note.ts
Source: note_autocomplete.ts
Source: quick_search.ts
Source: package.json

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub: <!-- Answer --> The 'Jump to note' modal uses autocomplete.js v0.38.1 (Algolia's old vanilla JS library), managed through a jQuery-based service that handles note suggestions, commands, and UI events. The 'Quick search' input, on the other hand, is a custom Bootstrap dropdown and doesn't use Algolia code at all. There isn't any documentation or code comments about previous attempts to upgrade the autocomplete library or what specific issues were encountered—just that the upgrade path is nontrivial due to major differences between versions. If you need to implement attribute autocomplete (like multi-value or remote data), the requirements and desired behaviors would need to be clarified, since they're not specified in the code or docs yet. [Source: jump_to_note.ts](https://github.com/TriliumNext/Trilium/blob/20018b9c21f245cafa0ac56e8628fc353d5f4b0b/apps/client/src/widgets/dialogs/jump_to_note.ts) [Source: note_autocomplete.ts](https://github.com/TriliumNext/Trilium/blob/20018b9c21f245cafa0ac56e8628fc353d5f4b0b/apps/client/src/services/note_autocomplete.ts) [Source: quick_search.ts](https://github.com/TriliumNext/Trilium/blob/20018b9c21f245cafa0ac56e8628fc353d5f4b0b/apps/client/src/widgets/quick_search.ts) [Source: package.json](https://github.com/TriliumNext/Trilium/blob/20018b9c21f245cafa0ac56e8628fc353d5f4b0b/apps/client/package.json) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cd3977fb-546d-4586-8084-7cb335af1051?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/4af773a7-9840-4978-96dc-c436f6f437cf/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/TriliumNext/Trilium/issues/39)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TriliumNext/Trilium#4635
No description provided.