docs-searchbar.js icon indicating copy to clipboard operation
docs-searchbar.js copied to clipboard

Add a scrolling system to see further results

Open bidoubiwa opened this issue 3 years ago • 3 comments

Description Search is limited to X first results. We should be able to scroll inside the popup to see other results

bidoubiwa avatar Jan 26 '22 15:01 bidoubiwa

Any suggestion how this should be implemented?

Because the results could be sorted by relevancy and not by hierarchy, how should the items be added to the popup? Would the headers be duplicated?

F.e with query 'createdAt key' on the meilisearch documentation: ---- First 5 results ----

  1. API reference - Keys - Key object - createdAt
  2. API reference - Keys - Get all keys - Example
  3. API reference - Keys - Create a key - Example
  4. API reference - Keys - Get all keys
  5. Security and permissions - Master key and API keys - Using the master key to manage API keys - Listing API keys

image

--- Next 5 results ---

  1. Security and permissions - Master key and API keys - Communicating with a protected instance - Using default API keys for authorization
  2. Security and permissions - ...
  3. Cookbooks Deployment - ...
  4. API reference - Indexes - Index object <- How should this result be displayed in the popup?
  5. Configuration - ...

ColinFrick avatar Oct 04 '22 08:10 ColinFrick

Because the results could be sorted by relevancy and not by hierarchy, how should the items be added to the popup? Would the headers be duplicated?

This is a very good point you are raising @ColinFrick. There is also the issue that scrolling would conflict with scrolling on the page itself.

I checked how algolia handles it and they did not add the scrolling possibility. See example

This might not be a very good idea after all.

bidoubiwa avatar Oct 04 '22 11:10 bidoubiwa

I'm closing this as it is not a good idea!

bidoubiwa avatar Oct 04 '22 11:10 bidoubiwa