Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(search)!: Migrate to new Search UI powered by Meilisearch #240

Merged
merged 19 commits into from
Apr 25, 2023

Conversation

half0wl
Copy link
Collaborator

@half0wl half0wl commented Apr 24, 2023

This replaces the existing tag-based search with site-wide full-text search, powered by Meilisearch Cloud.

  • Index is built using a manually-triggered GH action introduced in Add "Build Search Index" job to GH Actions #235 (actions/build-search-index -> Run Workflow).
  • Results are organized by the hierarchy root: each section in the sidebar maps to a section in results (e.g. "Deploy") with individual results as its children.
  • Re-usability is a key design consideration. We plan to add this to nixpacks docs. The components introduced here contains as little logic as possible, with the core functionality exposed by a useDebouncedSearch hook.

Live demo

railway-docs-docs-pr-240.up.railway.app

Related PRs

Screens

ss 2023-04-24 at 8 13 17 PM

ss 2023-04-24 at 8 13 32 PM

Future Improvements

  • Migrate from Meilisearch Cloud -> Meilisearch on Railway
    • Needs persistent vol. While the index gets nuked on each build, data going away on re-deploys or restarts is a recipe for "nothing shows up in search" class of issues until the build gets triggered again
  • Auto-trigger index build on each deploy
    • Not worth doing a custom build for chaining actions right now
  • Add back hotkey navigation
    • Removed this in favour of moving faster. Definitely a UX regression that should be taken care of.

Rollout

@railway-app
Copy link

railway-app bot commented Apr 24, 2023

This PR is being deployed to Railway 🚅

📚 railway docs: ◻️ REMOVED

Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! I think there should be a follow up PR that fixes the keyboard navigation since that was pretty confusing when I first tried it out.

There also isn't a clear separation between the result items, but that is maybe a Jitachi question?

src/components/Search/Results.tsx Outdated Show resolved Hide resolved
src/components/Search/Results.tsx Outdated Show resolved Hide resolved
src/components/Search/Results.tsx Outdated Show resolved Hide resolved
src/hooks/useDebouncedSearch.ts Show resolved Hide resolved
Copy link

@ndneighbor ndneighbor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing else to add except from JR's comments. I have two nits, but mostly they are stylistic concerns that can be waived away if you don't feel that they are important.

src/components/Search/Modal.tsx Outdated Show resolved Hide resolved
@half0wl half0wl requested a review from coffee-cup April 24, 2023 20:30
@half0wl half0wl merged commit 5413c12 into main Apr 25, 2023
@half0wl half0wl deleted the feat/new-search-ui branch April 25, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants