Uh oh!
There was an error while loading. Please reload this page.
Draft
Add Algolia InstantSearch Integration to TypeComposer Docs#18
Conversation
Co-authored-by: joaodibba <113291032+joaodibba@users.noreply.github.com>
Co-authored-by: joaodibba <113291032+joaodibba@users.noreply.github.com>
Co-authored-by: joaodibba <113291032+joaodibba@users.noreply.github.com>
Co-authored-by: joaodibba <113291032+joaodibba@users.noreply.github.com>
Co-authored-by: joaodibba <113291032+joaodibba@users.noreply.github.com>
Co-authored-by: joaodibba <113291032+joaodibba@users.noreply.github.com>
CopilotAI
changed the title
[WIP] Add Algolia Search to TypeComposer docsAdd Algolia InstantSearch Integration to TypeComposer DocsOct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR integrates Algolia InstantSearch into the TypeComposer documentation to enable fast, relevant search functionality as requested in the issue.
🔍 Features Added
Search Functionality
⌘K(Mac) /Ctrl+K(Windows/Linux) to open search,ESCto closeComponents
1. AlgoliaSearch (
src/components/search/AlgoliaSearch.ts)Core search component implementing Algolia InstantSearch with:
onInit/onDestroyhooksrequestAnimationFramebefore initialization2. SearchModal (
src/components/search/SearchModal.ts)Modal wrapper providing:
3. Custom Styles (
src/components/search/search.scss)Theme-aware styles including:
4. NavBar Updates (
src/components/navbar/NavBar.ts)📚 Documentation & Tooling
Setup Documentation
ALGOLIA_SETUP.md - Comprehensive 175-line setup guide covering:
README.md - Updated project documentation (160 lines) with:
.env.example - Environment variable template for secure credential management
Indexing Script
scripts/index-algolia.js - Automated documentation indexing tool (177 lines) that:
📦 Dependencies
Added two production dependencies:
algoliasearch(v5.x) - Algolia JavaScript client (lite version for optimal bundle size)instantsearch.js(v4.x) - InstantSearch UI library🎨 Screenshots
Search Button in Navbar
The search button is prominently displayed in the navigation bar with a keyboard shortcut indicator (⌘K) for discoverability.
Search Modal Interface
Clean, accessible search modal with blur backdrop. The search input is auto-focused when opened for immediate typing.
Docs Page with Search
Search functionality available across all documentation pages with consistent styling.
🔧 Setup Instructions
The integration uses placeholder Algolia credentials that need to be replaced with actual values:
Create Algolia account at algolia.com
Set up environment variables:
cp .env.example .env # Edit .env with your Algolia credentialsUpdate credentials in
src/components/search/AlgoliaSearch.ts:Index documentation:
✅ Testing
📝 Implementation Notes
requestAnimationFramefor reliable DOM initialization🔗 Related Resources
Closes #[issue_number] (if applicable)
Original prompt
Fixes#17
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.