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

Integrate with "Search As You Type" #19

Closed
humitos opened this issue Mar 25, 2023 · 8 comments
Closed

Integrate with "Search As You Type" #19

humitos opened this issue Mar 25, 2023 · 8 comments
Assignees

Comments

@humitos
Copy link
Member

humitos commented Mar 25, 2023

We have a Sphinx extension at https://github.com/readthedocs/readthedocs-sphinx-search that we talked about re-using/migrating/importing from this client. There are some work around making it a js package at readthedocs/readthedocs-sphinx-search#133

In a talk with Anthony we decided to start shipping features without using the flyout yet, since the flyout is one of the most complicated features of this js integration. However, I think we can start working on the search integration to be triggered with / hotkey. That way, it requires zero-configuration nor any kind of integration with the HTML DOM.

ToDo

  • decide whether or not the search js code should live in this repository or not
  • improve the CSS style to follow some common style around all the features (in particular those that are floating, see External version banner initial style #18)
  • make the work to trigger the modal search when hitting /
@humitos humitos self-assigned this Mar 25, 2023
@humitos
Copy link
Member Author

humitos commented Mar 25, 2023

I'd like to add a similar bar than the one we have at the bottom, with some help (keys) and the Read the Docs logo. Also, a magnifier icon and a X in the input.

Screenshot_2023-03-25_12-16-08

@humitos
Copy link
Member Author

humitos commented Mar 25, 2023

Another good example to follow when there are no results

Screenshot_2023-03-25_12-20-10

@humitos
Copy link
Member Author

humitos commented Mar 25, 2023

Recent queries 💯

Screenshot_2023-03-25_17-33-54

humitos added a commit that referenced this issue Mar 25, 2023
- update styles
- integrate under `/`

Related #19
humitos added a commit that referenced this issue Mar 25, 2023
- update styles
- integrate under `/`

I copied all the code from
readthedocs/readthedocs-sphinx-search#132.
However, there are lot of things that are not required for this stage.
I removed some of them and make the integration nicer with the client we are
creating.

These changes are related to the HTML structure and the CSS style. The
functionality is exactly the same.

Related #19
humitos added a commit that referenced this issue Mar 25, 2023
- update styles
- integrate under `/`

I copied all the code from
readthedocs/readthedocs-sphinx-search#132.
However, there are lot of things that are not required for this stage.
I removed some of them and make the integration nicer with the client we are
creating.

These changes are related to the HTML structure and the CSS style. The
functionality is exactly the same.

Related #19
@humitos
Copy link
Member Author

humitos commented Mar 25, 2023

I did some work in this direction in a358e57 and it looks like:

Screenshot_2023-03-25_18-12-17

There are more work to do here, but I wanted to push the progress I have for now.

@humitos
Copy link
Member Author

humitos commented Mar 25, 2023

The Algolia examples comes from https://popper.js.org/docs/v2/

@humitos
Copy link
Member Author

humitos commented Mar 27, 2023

Some progress here:

Peek 2023-03-27 16-51

@ericholscher
Copy link
Member

Beautiful!

@humitos
Copy link
Member Author

humitos commented Mar 30, 2023

This work is already done, I'm going to close this issue. There some extra tweaks we can work on, of course, but the initial work has been done. This is how it currently looks on Docusaurus, for example:

Peek 2023-03-30 13-54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants