algolia / algolia/docsearch

Display search dialog with our own function call?

Open
#1,431 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.4k
Forks
439
Avg merge
14h 32m
Merged PRs (30d)
19

Description

Hi everyone - I migrated to the latest version of DocSearch, and one thing I'm not a fan of is the initial 29kb load even if a user isn't actively planning on using search. Is there a way to defer loading of the library by having the search field be invoked via a custom DOM element? I can dynamically load the docsearch script and any initialization code, but I don't know what method to invoke to display the search dialog.

Thanks,
Kirupa

Contributor guide

Open the contributing guide

Research direction

The issue names the DocSearch script, initialization code, and a custom DOM element; start by reviewing the public initialization and search-field integration APIs. Determine whether a supported function can open the dialog after deferred loading, and make the supported entry point or usage guidance clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.