Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !32098

Update search to DocSearch v3

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/shortcuts/feat/docsearch-v3 into main Nov 09, 2020
  • Overview 0
  • Commits 6
  • Pipelines 0
  • Changes 8

Created by: shortcuts

Hello Bootstrap team!

After @mdo requested a DocSearch for the icons website, we thought it was time to bring the Bootstrap search documentation to the next level.

This PR integrates the new version of DocSearch, that better reflects what we think documentation search should be. It has the advantage to bring results from the documentation but also the icon library where we use a dedicated template to display the icons directly in the search making it straightforward to identify the right one.

Description

Reducing users' efforts to get them started integrating your product is key to adoption. We created DocSearch in 2015 as a community effort to solve this problem.

We've had time to try different approaches since then and would like to propose you a new documentation search experience.

This new experience has been well received and is now live on the Docusaurus v2 integrations, TailwindCSS, React Native, and we working closely with some others major OSS projects.

Preview

live

Web Mobile
web-view mobile-view

Changes

You can read about all the new features in the Docusaurus PR (facebook/docusaurus#2815), but here's a summary:

  • We replaced the dropdown list for a modal
  • You can open the search modal with Ctrl+K, ⌘+K or /
  • No hard refresh
  • The experience works on mobile and is close to a native mobile experience
  • Recent searches
  • Favorite searches
  • Selection search
  • Search suggestions
  • Offline detection

The bundle size decreased and we now provide React components which can be lazy loaded.

What's next

This new DocSearch version has been used in production for a couple of months now.

This version is marked as alpha for now because the underlying libraries that we use (e.g., autocomplete-core) are still being worked on at @algolia to make sure that it handles more cases than DocSearch and usual autocomplete search experiences. We plan to go stable in the coming weeks but no major changes will happen to DocSearch.

Let us know what you think!

Possible improvement

Navbar vs Subnav

The SearchBox is currently located in the subnav which is the sticky element.

With this multi-index search, it would make more sense to merge the navs together and make the navbar the sticky one. This feature will allow you to implement your search experience from any pages.

What's this PR doesn't include:

  • It only indexes https://v5.getbootstrap.com/ and https://icons.getbootstrap.com/
    • It is possible to merge the versions where the icons are available under the same config
    • It is possible to setup a contextual search where you give more relevance to the content based on the page you are on. (e.g display icons first when you are on the icon page)

Links

  • Live version of this PR
  • Config file
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/shortcuts/feat/docsearch-v3